/* ── Auth ── */
.auth-view {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; padding: 2rem 1.25rem; gap: 1.75rem;
  min-height: 100vh;
}
.auth-logo { text-align: center; }
.auth-logo-text {
  font-size: 2.5rem; font-weight: 900;
  background: var(--grad-btn);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; letter-spacing: -0.03em;
  filter: drop-shadow(0 0 20px rgba(232,18,92,0.5));
}
.auth-logo-sub { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.3rem; }

.auth-card {
  background: rgba(14,0,25,0.7);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
}
.auth-form {
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}

/* ── Home ── */
.home-header {
  padding: 1.25rem 1.25rem 0.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.home-greeting { font-size: 1.125rem; font-weight: 800; }
.home-balance {
  font-size: 0.9rem; color: var(--accent); font-weight: 800;
  background: rgba(232,18,92,0.12);
  border: 1px solid rgba(232,18,92,0.3);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.875rem;
}

/* home hero glow bar */
.home-hero-glow {
  height: 2px;
  background: var(--grad-btn);
  box-shadow: 0 0 20px var(--accent-glow);
  margin: 0.5rem 1.25rem 0;
  border-radius: 1px;
  opacity: 0.6;
}

/* ── Upload ── */
.upload-view {
  flex: 1; display: flex; flex-direction: column;
  padding: 1.25rem; gap: 1rem;
}
.upload-preview {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-glass);
  max-height: 300px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow-card);
}
.upload-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ── Generate ── */
.generate-view { flex: 1; display: flex; flex-direction: column; }
.generate-step { flex: 1; display: flex; flex-direction: column; }
.generate-step-hidden { display: none; }

.step-header {
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 1px solid var(--border-glass);
}
.step-indicator { display: flex; gap: 0.375rem; align-items: center; margin-bottom: 0.5rem; }
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s, box-shadow 0.2s;
}
.step-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.step-dot.done { background: var(--primary-dim); }

.step-content { flex: 1; overflow-y: auto; padding-bottom: 1rem; }

.config-section { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-glass); }
.config-section-label {
  font-size: 0.75rem; color: var(--text-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem;
}

.cost-display {
  background: rgba(232,18,92,0.07);
  border: 1px solid rgba(232,18,92,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem; margin: 1rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
}
.cost-label { color: var(--text-muted); font-size: 0.875rem; }
.cost-value {
  font-size: 1.375rem; font-weight: 900;
  background: var(--grad-btn);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.generate-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-glass);
  background: rgba(8,0,16,0.6);
  backdrop-filter: blur(10px);
}

/* ── Progress view ── */
.progress-view {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem 1.25rem; gap: 1.25rem; text-align: center;
}
.progress-icon { filter: drop-shadow(0 0 16px var(--accent-glow)); line-height: 0; }
.progress-title { font-size: 1.25rem; font-weight: 800; }
.progress-status { font-size: 0.875rem; color: var(--text-muted); }

.spinning-cog {
  width: 3.5rem; height: 3.5rem;
  color: var(--accent, #e8125c);
  animation: cog-spin 2.4s linear infinite;
  display: block;
}
@keyframes cog-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Result ── */
.result-video {
  width: 100%; border-radius: var(--radius-lg);
  background: #000; max-height: 60vh;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 30px rgba(232,18,92,0.15);
}

/* ── Profile ── */
.profile-view {
  flex: 1; display: flex; flex-direction: column; padding: 1.25rem; gap: 1rem;
}
.profile-stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border-glass);
  font-size: 0.9rem;
}
.profile-stat-row:last-child { border-bottom: none; }

/* ── Shop ── */
.shop-view { flex: 1; display: flex; flex-direction: column; }
.pack-list { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.625rem; }

/* ── Gallery ── */
.gallery-view { flex: 1; display: flex; flex-direction: column; }
.gallery-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.75rem; padding: 2rem;
  color: var(--text-muted); text-align: center; font-size: 0.9rem;
}
.gallery-empty-icon { font-size: 3rem; opacity: 0.4; }

/* ── Video modal ── */
.video-modal-content { display: flex; flex-direction: column; gap: 1rem; }
.video-modal-player {
  width: 100%; border-radius: var(--radius); background: #000;
  max-height: 55vh;
  box-shadow: 0 4px 24px rgba(0,0,0,0.8);
}

/* ── Generate step-1: full-height layout so footer never scrolls away ── */
.gen-layout {
  display: flex;
  flex-direction: column;
  min-height: 100svh;   /* fills viewport; body does NOT scroll */
}
.gen-scroll {
  flex: 1;
  min-height: 0;        /* allow flex child to shrink */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1024px) {
  .gen-layout {
    min-height: 0;
    height: 100%;        /* 100% of #main-content = 100vh */
  }
}

/* ── Desktop view overrides ── */
@media (min-width: 1024px) {
  /* Generate: taller style previews (overrides inline height) */
  .style-card img { height: 150px !important; }

  /* Generate: step header more padding */
  .step-header { padding: 1.25rem 1.5rem; }

  /* Generate footer: not full-width button */
  .generate-footer {
    position: static;
    padding: 1rem 1.5rem;
  }
  .generate-footer .btn {
    width: auto;
    min-width: 220px;
  }

  /* Config sections: more padding */
  .config-section { padding: 1rem 1.5rem; }
  .cost-display   { margin: 1rem 1.5rem; }

  /* Progress view: more vertical breathing room */
  .progress-view { padding: 4rem 2rem; }

  /* Auth: center the card */
  .auth-view { align-items: center; }
  .auth-card { width: 100%; max-width: 440px; }

  /* Profile: constrain width */
  .profile-view { max-width: 640px; }

  /* Gallery: more padding */
  .gallery-grid { padding: 1.25rem; }

  /* Result video: taller on desktop */
  .result-video { max-height: 70vh; }
}

/* ── Glow divider ── */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
  margin: 0.5rem 0;
}
