/* iPhone Creator — full smartphone spec builder */

.creator-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ---- Power strip ---- */
.power-strip {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.power-strip-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.power-label-text {
  font-weight: 700;
  font-family: 'Press Start 2P', sans-serif;
  font-size: 0.6rem;
}

.power-bar-track {
  height: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 7px;
  overflow: hidden;
}

.power-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 7px;
  transition: width 0.3s, background 0.3s;
  background: var(--neon-cyan);
}

.power-strip-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-top: 0.4rem;
  color: var(--text-dim);
}

.power-strip-stats strong {
  color: var(--text);
}

/* ---- Creator panel ---- */
.creator-panel {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.creator-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-group {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.option-group h3 {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin: 0 0 0.6rem;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.option-btn {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.68rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.option-btn.selected {
  border-color: var(--neon-cyan);
  background: rgba(0, 245, 212, 0.1);
  color: var(--neon-cyan);
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--border);
  cursor: pointer;
  transition: border-color 0.1s, transform 0.1s;
}

.color-swatch.selected {
  border-color: var(--neon-cyan);
  transform: scale(1.15);
}

/* ---- Text input in options ---- */
.spec-text-input {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.78rem;
  font-family: inherit;
}

.spec-text-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

/* ---- Sliders ---- */
.slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.slider-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-align: center;
}

.spec-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  outline: none;
  cursor: pointer;
}

.spec-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--neon-cyan);
  border: 3px solid var(--bg);
  box-shadow: 0 0 8px rgba(0, 245, 212, 0.4);
  cursor: pointer;
}

.spec-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--neon-cyan);
  border: 3px solid var(--bg);
  box-shadow: 0 0 8px rgba(0, 245, 212, 0.4);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: var(--text-dim);
  padding: 0 2px;
}

/* ---- Preview column ---- */
.creator-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 80px;
}

.phone-preview-svg {
  width: 200px;
  filter: drop-shadow(0 10px 30px rgba(0, 245, 212, 0.25));
}

.action-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  max-width: 200px;
}

.randomize-btn {
  background: var(--bg-panel);
  color: var(--text);
  border: 2px solid var(--border);
}

.randomize-btn:hover {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
}

.test-btn {
  background: var(--neon-magenta);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.test-btn:hover {
  filter: brightness(1.15);
}

/* ---- Test results ---- */
.test-results {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.test-header {
  font-family: 'Press Start 2P', sans-serif;
  font-size: 0.75rem;
  color: var(--neon-magenta);
  margin-bottom: 1.25rem;
  text-align: center;
}

.test-row {
  display: grid;
  grid-template-columns: 140px 1fr 50px;
  grid-template-rows: auto auto;
  gap: 0.2rem 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.test-name {
  font-size: 0.75rem;
  font-weight: 700;
}

.test-bar-wrap {
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  overflow: hidden;
}

.test-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s;
}

.test-score {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.test-detail {
  grid-column: 1 / -1;
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.test-overall {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem 0;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.test-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem;
  margin-top: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.75rem;
  text-align: center;
}

/* ---- Save panel ---- */
.creator-save-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.creator-save-panel h3 {
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
}

.save-form {
  display: flex;
  gap: 0.5rem;
  max-width: 360px;
  margin: 0 auto;
}

.save-form input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.75rem;
  font-family: inherit;
}

.save-form input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.15);
}

.save-form button {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: none;
  background: var(--neon-cyan);
  color: #021a1a;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.save-feedback {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  min-height: 1em;
}

/* ---- Gallery ---- */
.gallery-section {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.gallery-section h2 {
  font-size: 0.85rem;
  margin: 0 0 1rem;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.gallery-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.gallery-card svg {
  width: 100px;
}

.gallery-card .gal-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

.gallery-card .gal-by {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.gallery-card .gal-power {
  font-size: 0.6rem;
  color: var(--neon-cyan);
  font-weight: 700;
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
  .creator-panel {
    grid-template-columns: 1fr;
  }

  .creator-preview {
    position: static;
    order: -1;
  }

  .test-row {
    grid-template-columns: 1fr 50px;
  }

  .test-name {
    grid-column: 1 / -1;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .power-strip-stats {
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
  }
}
