:root {
  --bg: #0b1330;
  --bg-soft: #101a3d;
  --bg-soft-2: #142047;
  --text-page: #ffffff;
  --text-page-muted: #aab2c5;
  --card-soft: #f5f6f8;
  --navy-950: #0b1330;
  --navy-800: #1c2540;
  --navy-700: #2a3452;
  --navy-600: #3d4863;
  --navy-400: #6b7590;
  --navy-200: #aab2c5;
  --border: #e7e8ec;
  --border-strong: #d8dae1;
  --white: #ffffff;
  --accent: #ff5a36;
  --accent-2: #ff8a66;
  --accent-soft: #fff0eb;
  --thumb-1: #0b1330;
  --thumb-2: #3d4ea6;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10,19,48,0.05);
  --shadow-md: 0 12px 28px -12px rgba(10,19,48,0.14);
  --shadow-lg: 0 30px 70px -24px rgba(10,19,48,0.28);
  --max-width: 1240px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The `hidden` attribute loses to any author `display` rule on the same
   element (e.g. `.confirm-banner { display: inline-flex }`), so without this
   an element toggled via `.hidden = true/false` in JS never actually hides. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text-page);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.btn-outline {
  background: var(--white);
  color: var(--navy-950);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--navy-600);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--navy-400);
  padding: 11px 14px;
}
.btn-ghost:hover { color: var(--navy-950); }

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 48, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-header .logo { color: var(--white); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  color: var(--navy-950);
  display: flex;
  align-items: center;
}
.logo-word {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.01em;
}
.logo-mark {
  background: var(--navy-950);
  color: var(--white);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-mark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-mark svg {
  width: 18px;
  height: 18px;
}

.main-nav {
  display: flex;
  gap: 30px;
}
.main-nav a {
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-page-muted);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--white); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-actions .btn-ghost { color: var(--text-page-muted); }
.header-actions .btn-ghost:hover { color: var(--white); }
.header-actions .btn-primary {
  opacity: 0;
  transform: translateY(-8px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(.16,1,.3,1), transform 0.4s cubic-bezier(.16,1,.3,1);
}
.site-header.scrolled .header-actions .btn-primary {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 88px;
  overflow: hidden;
  background: var(--bg);
}

.liquid-blobs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.liquid-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.liquid-blob.b1 {
  width: 560px;
  height: 560px;
  top: -220px;
  left: -140px;
  background: radial-gradient(circle, rgba(255,90,54,0.5), transparent 70%);
  animation: blobDrift 22s ease-in-out infinite;
}
.liquid-blob.b2 {
  width: 480px;
  height: 480px;
  top: 20px;
  right: -180px;
  background: radial-gradient(circle, rgba(140,110,255,0.4), transparent 70%);
  animation: blobDrift 27s ease-in-out infinite -8s;
}
.liquid-blob.b3 {
  width: 420px;
  height: 420px;
  bottom: -220px;
  left: 32%;
  background: radial-gradient(circle, rgba(79,168,255,0.35), transparent 70%);
  animation: blobDrift 19s ease-in-out infinite -4s;
}
@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(34px, -24px) scale(1.08); }
  66% { transform: translate(-28px, 26px) scale(0.94); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 60px;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--white);
}

.hero h1 .highlight {
  color: var(--accent-2);
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 480px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-page-muted);
}

.hero-cta {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  justify-content: center;
}

/* Decorative floating glass mockup below the fold, echoing the template gallery */
.hero-mockup {
  margin: 56px auto 0;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-lg);
}
.hero-mockup-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding-left: 2px;
}
.hero-mockup-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.hero-mockup-caption {
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero-mockup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hero-mockup-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.hero-mockup-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-mockup-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--white);
  background: rgba(11, 19, 48, 0.55);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 999px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Slim stats strip, sits below the hero */
.hero-stats-strip {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.stat strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
}
.stat span {
  font-size: 12.5px;
  color: var(--text-page-muted);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slower "drop down from above" variant, for elements that should feel like
   they're settling into place rather than rising up. */
.reveal-drop {
  transform: translateY(-40px);
  transition: opacity 1.1s cubic-bezier(.16,1,.3,1), transform 1.1s cubic-bezier(.16,1,.3,1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .liquid-blob { animation: none; }
}

.gradient-text {
  background: linear-gradient(90deg, #ff5f6d, #ff9a44, #ffd93d, #35c98f, #4fa8ff, #8f7bff, #ff6dd0);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  animation: gradientShift 6s ease-in-out infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Section heading ---------- */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-heading h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.section-heading p {
  margin-top: 6px;
  color: var(--text-page-muted);
  font-size: 14.5px;
}
.section-heading.center {
  flex-direction: column;
  text-align: center;
  align-items: center;
  margin-bottom: 36px;
}

/* ---------- Templates ---------- */
.templates {
  padding: 80px 0;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.tab {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy-600);
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab:hover { border-color: var(--navy-400); color: var(--navy-950); }
.tab.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.template-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.template-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: 180% 180%;
  background-position: 30% 20%;
}

.thumb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes thumbHoverPan {
  0%   { background-position: 15% 10%; }
  50%  { background-position: 85% 75%; }
  100% { background-position: 15% 10%; }
}
.template-card:hover .thumb {
  animation: thumbHoverPan 3.2s ease-in-out infinite;
}

.thumb-figure {
  width: 44px;
  height: 44px;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

@keyframes figureDance {
  0%   { transform: translateY(0) rotate(-6deg); }
  25%  { transform: translateY(-7px) rotate(5deg); }
  50%  { transform: translateY(0) rotate(-3deg); }
  75%  { transform: translateY(-5px) rotate(6deg); }
  100% { transform: translateY(0) rotate(-6deg); }
}
.template-card:hover .thumb-figure {
  animation: figureDance 0.9s ease-in-out infinite;
}

.thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 19, 48, 0.55);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.thumb-hover {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.use-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--white);
  background: rgba(11, 19, 48, 0.4);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 999px;
  transform: translateY(-4px);
  opacity: 0;
  transition: all 0.2s ease;
}
.template-card:hover .use-pill {
  transform: translateY(0);
  opacity: 1;
}

.thumb-info {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 6px 6px 10px;
  border-radius: 999px;
  background: rgba(11, 19, 48, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}
.thumb-info-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb-info-duration {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.14);
  padding: 3px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.compare-frame {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.compare-frame-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding-left: 2px;
}
.compare-frame-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.compare-body {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 28px;
  align-items: center;
}

.compare-video-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--navy-950);
}
.compare-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--white);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(11, 19, 48, 0.65);
  backdrop-filter: blur(6px);
}
.compare-tag-vimic {
  background: var(--accent);
}

.compare-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 0 8px;
}
.compare-transform-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255,90,54,0.16);
  border: 1px solid rgba(255,90,54,0.4);
  box-shadow: 0 0 32px rgba(255,90,54,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
}
.compare-transform-icon svg { width: 32px; height: 32px; }
.compare-tagline {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--white);
  line-height: 1.3;
}
.compare-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #4ee6b8;
  background: rgba(78,230,184,0.1);
  border: 1px solid rgba(78,230,184,0.35);
  padding: 6px 14px;
  border-radius: 999px;
}
.compare-badge svg { width: 13px; height: 13px; }

/* ---------- Custom dance section ---------- */
.custom-dance {
  padding: 80px 0;
  background: var(--bg-soft-2);
}

.feature-box {
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-lg);
}
.feature-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 12px;
  border-radius: 999px;
}
.feature-box h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}
.feature-box > p {
  font-size: 14px;
  color: var(--text-page-muted);
  line-height: 1.6;
}
.feature-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-page-muted);
  line-height: 1.5;
}
.feature-list li svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--accent-2);
}

.prompt-input {
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--navy-950);
  font-family: var(--font);
  resize: vertical;
  min-height: 60px;
}
.prompt-input::placeholder { color: var(--navy-400); }
.prompt-input:focus {
  outline: none;
  border-color: var(--accent);
}
/* ---------- How it works ---------- */
.how-it-works {
  background: var(--bg);
  padding: 80px 0;
}

.steps-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 480px;
  margin: 0 auto;
}
.step-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.step-arrow {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-arrow svg { width: 16px; height: 16px; }
.step-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--white);
}
.step-card p {
  font-size: 13.5px;
  color: var(--text-page-muted);
  line-height: 1.6;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  color: var(--text-page-muted);
  padding: 56px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.footer-brand .logo { color: var(--white); }
.footer-brand p { margin-top: 10px; font-size: 13.5px; color: var(--text-page-muted); }
.footer-links { display: flex; gap: 56px; }
.footer-links h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-links a {
  display: block;
  font-size: 13.5px;
  color: var(--text-page-muted);
  margin-bottom: 10px;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 12.5px;
  color: var(--text-page-muted);
}

/* ---------- Creation modal ---------- */
/* ---------- Create (liquid stage) ---------- */
.create-shell {
  position: relative;
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.create-top-tabs { display: flex; gap: 6px; justify-content: center; }
.create-main { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.create-history {
  flex: 1;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-page-muted);
  font-size: 13.5px;
}
.create-top-tab {
  padding: 6px 14px;
  border-radius: 999px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-page-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.create-top-tab:hover { color: var(--white); }
.create-top-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.22);
}

.create-more-templates { margin-top: 8px; }
.create-more-templates-label {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 14px;
}

/* Discover: long hero with 3 animated steps */
.create-discover {
  min-height: 74vh;
  width: 100%;
  padding: 40px 32px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}
.discover-steps {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}
.discover-arrow { width: 40px; height: 40px; flex-shrink: 0; color: rgba(255, 255, 255, 0.3); }
.discover-step {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 26px 36px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  color: var(--white);
  animation: stepGlow 6s ease-in-out infinite;
}
.discover-step:nth-of-type(2) { animation-delay: 2s; }
.discover-step:nth-of-type(3) { animation-delay: 4s; }
@keyframes stepGlow {
  0%, 28% {
    border-color: rgba(255, 90, 54, 0.75);
    background: rgba(255, 90, 54, 0.14);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px -20px rgba(255, 90, 54, 0.6);
  }
  36%, 100% {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    transform: none;
    box-shadow: none;
  }
}
.discover-num {
  position: absolute;
  top: 14px;
  left: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.discover-step h3 { font-size: 23px; font-weight: 800; margin-top: 26px; }
.discover-step p { font-size: 15px; color: var(--text-page-muted); margin-top: 8px; }
.discover-visual {
  position: relative;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dv-cards span {
  width: 92px;
  height: 150px;
  border-radius: 12px;
  margin: 0 -8px;
  background: linear-gradient(155deg, #1b2a66, #4d63a8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.dv-cards span:nth-child(1) { transform: rotate(-9deg); }
.dv-cards span:nth-child(3) { transform: rotate(9deg); background: linear-gradient(155deg, #8a2e1c, #ff8a66); }
.dv-cards span:nth-child(2) {
  z-index: 1;
  background: linear-gradient(155deg, #ff5a36, #ff8a5c);
  animation: dvPick 6s ease-in-out infinite;
}
@keyframes dvPick {
  0%, 30% { transform: translateY(-14px) scale(1.12); box-shadow: 0 0 0 4px rgba(255, 90, 54, 0.4); }
  40%, 100% { transform: none; box-shadow: none; }
}
.dv-drop { flex-direction: column; }
.dv-photo {
  width: 92px;
  height: 118px;
  padding: 4px 4px 8px;
  border-radius: 10px;
  background: var(--white);
  animation: dvDrop 6s ease-in-out infinite;
  animation-delay: 2s;
}
.dv-photo::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(155deg, #ff5a36, #ff8a66);
}
.dv-plus {
  margin-top: 14px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  font-size: 22px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes dvDrop {
  0% { transform: translateY(-40px) rotate(-8deg); opacity: 0; }
  10%, 26% { transform: translateY(0) rotate(-4deg); opacity: 1; }
  40%, 100% { transform: translateY(0) rotate(-4deg); opacity: 1; }
}
.dv-play svg {
  width: 62px;
  height: 62px;
  padding: 30px;
  box-sizing: content-box;
  border-radius: 50%;
  background: rgba(255, 90, 54, 0.2);
  border: 1px solid rgba(255, 90, 54, 0.5);
  color: var(--white);
  animation: dvPulse 6s ease-in-out infinite;
  animation-delay: 4s;
}
@keyframes dvPulse {
  0%, 30% { box-shadow: 0 0 0 0 rgba(255, 90, 54, 0.6), 0 0 40px rgba(255, 90, 54, 0.5); }
  50%, 100% { box-shadow: 0 0 0 18px rgba(255, 90, 54, 0); }
}
/* Compact version inside the Create stage */
.create-stage .discover-steps { gap: 10px; padding: 0 16px; }
.create-stage .discover-arrow { width: 22px; height: 22px; }
.create-stage .discover-step {
  min-height: 0;
  max-width: 300px;
  padding: 40px 12px 24px;
  border-radius: 26px;
}
.create-stage .discover-visual { height: 230px; zoom: 0.72; }
.create-stage .discover-step h3 { font-size: 19px; margin-top: 18px; }
.create-stage .discover-step p { font-size: 13px; }
.create-stage .create-stage-anim { padding: 0; }
@media (max-width: 900px) {
  .discover-steps { flex-direction: column; }
  .discover-arrow { transform: rotate(90deg); }
}
.create-more-templates .template-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }

.create-empty {
  flex: 1;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  color: var(--text-page-muted);
}
.create-empty p { font-size: 13.5px; }

.create-workspace {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 18px;
}

/* -- Left: template + aspect ratio + background -- */
.create-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.create-template-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
}
.create-template-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(9px);
  transform: scale(1.12);
  transition: filter 0.3s ease, transform 0.3s ease;
}
.create-template-card:hover video { filter: none; transform: none; }
.create-template-card-name {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(11, 19, 48, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 700;
}
.create-template-change {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(11, 19, 48, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.create-template-change:hover { background: rgba(255, 90, 54, 0.55); }

.create-aspect { position: relative; align-self: stretch; }
.create-aspect-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.create-aspect-trigger:hover { border-color: rgba(255, 90, 54, 0.5); background: rgba(255, 90, 54, 0.08); }
.create-aspect-value { flex: 1; text-align: left; }
.create-aspect-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-page-muted);
}
.create-aspect-icon svg { width: 16px; height: 16px; display: block; }
.create-aspect-value { font-size: 11.5px; font-weight: 700; }
.create-aspect-trigger .create-aspect-chevron { width: 11px; height: 11px; color: var(--text-page-muted); flex-shrink: 0; }

.create-aspect-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #141d42;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
}
.create-aspect-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 9px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.create-aspect-option:hover { background: rgba(255, 255, 255, 0.08); }
.create-aspect-option-left { display: flex; align-items: center; gap: 8px; }
.create-aspect-option-left svg { width: 16px; height: 16px; color: var(--text-page-muted); flex-shrink: 0; }
.create-aspect-option .create-aspect-check { width: 13px; height: 13px; opacity: 0; flex-shrink: 0; }
.create-aspect-option.selected .create-aspect-check { opacity: 1; }

.create-photo-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.create-slot {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.create-slot:hover, .create-slot.dragover {
  border-color: rgba(255, 90, 54, 0.5);
  background: rgba(255, 90, 54, 0.08);
}
.create-slot-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}
.create-slot-plus {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 300;
}
.create-slot-filled { position: absolute; inset: 0; }
.create-slot-filled img { width: 100%; height: 100%; object-fit: cover; display: block; }
.create-slot-optional {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(11, 19, 48, 0.5);
  color: rgba(255, 255, 255, 0.7);
  font-size: 7.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.create-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 19, 48, 0.65);
  color: var(--white);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.create-thumb-remove:hover { background: rgba(11, 19, 48, 0.9); }

/* -- Center: the stage -- */
.create-stage {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  min-height: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-blobs { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.drop-blob { position: absolute; border-radius: 50%; filter: blur(60px); animation: blobDrift 20s ease-in-out infinite; }
.drop-blob.d1 {
  width: 280px; height: 280px; top: -90px; left: -70px;
  background: radial-gradient(circle, rgba(255,90,54,0.45), transparent 70%);
}
.drop-blob.d2 {
  width: 230px; height: 230px; bottom: -80px; right: -60px;
  background: radial-gradient(circle, rgba(140,110,255,0.38), transparent 70%);
  animation-delay: -7s;
}
.drop-blob.d3 {
  width: 180px; height: 180px; top: 30%; right: 10%;
  background: radial-gradient(circle, rgba(79,168,255,0.3), transparent 70%);
  animation-delay: -12s;
}

.create-storage-btn {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(11, 19, 48, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.create-storage-btn:hover { background: rgba(255, 90, 54, 0.5); }
.create-storage-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.storage-modal {
  position: relative;
  background: #101a3d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  width: 60vw;
  height: 60vh;
  max-width: 900px;
  max-height: 700px;
  min-width: 320px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  padding: 28px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}
.modal-overlay.open .storage-modal { transform: translateY(0) scale(1); }
.storage-modal .modal-close {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--white);
}
.storage-modal .modal-close:hover { background: rgba(255, 255, 255, 0.18); }
.storage-modal-head { margin-bottom: 18px; }
.storage-modal-head h3 { font-size: 18px; font-weight: 800; color: var(--white); }
.storage-modal-head p { font-size: 12.5px; color: var(--text-page-muted); margin-top: 4px; }

.create-storage-panel {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.create-storage-empty {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-page-muted);
  text-align: center;
  padding: 40px 4px;
}
.create-storage-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
}
.create-storage-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.create-storage-item-actions {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(11, 19, 48, 0.75);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.create-storage-item:hover .create-storage-item-actions { opacity: 1; }
.create-storage-item-actions button {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
.create-storage-item-actions button:hover { background: rgba(255, 255, 255, 0.3); }

/* idle "drop a photo, hit generate" loop */
.create-stage-anim {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.stage-anim-photo {
  position: absolute;
  width: 60px;
  height: 78px;
  padding: 4px 4px 8px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  animation: stageDropIn 3.6s ease-in-out infinite;
}
.stage-anim-photo::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(155deg, #ff5a36, #ff8a66);
}
@keyframes stageDropIn {
  0% { transform: translateY(-70px) rotate(-8deg); opacity: 0; }
  20% { transform: translateY(-16px) rotate(-4deg); opacity: 1; }
  50% { transform: translateY(-16px) rotate(-4deg); opacity: 1; }
  68% { transform: translateY(-6px) rotate(-4deg); opacity: 1; }
  78%, 100% { transform: translateY(-16px) rotate(-4deg); opacity: 0; }
}
.stage-anim-pill {
  position: absolute;
  transform: translateY(46px);
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  animation: stagePillPulse 3.6s ease-in-out infinite;
}
@keyframes stagePillPulse {
  0%, 68% { box-shadow: 0 0 0 0 rgba(255, 90, 54, 0.5); transform: translateY(46px) scale(1); }
  74% { transform: translateY(46px) scale(0.92); }
  80% { box-shadow: 0 0 0 10px rgba(255, 90, 54, 0); transform: translateY(46px) scale(1); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 54, 0); transform: translateY(46px) scale(1); }
}
.stage-anim-cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: 0;
  animation: stageCursorMove 3.6s ease-in-out infinite;
}
@keyframes stageCursorMove {
  0%, 60% { transform: translate(64px, 76px) scale(1); opacity: 0; }
  68% { transform: translate(20px, 50px) scale(1); opacity: 1; }
  76% { transform: translate(10px, 46px) scale(0.85); opacity: 1; }
  84% { transform: translate(10px, 46px) scale(1); opacity: 1; }
  100% { transform: translate(64px, 76px) scale(1); opacity: 0; }
}
.create-stage-hint {
  position: absolute;
  bottom: 20px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.create-stage-photo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.create-polaroid {
  position: relative;
  width: 170px;
  padding: 8px 8px 16px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}
.create-polaroid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.create-polaroid .create-thumb-remove { top: -8px; right: -8px; background: rgba(11, 19, 48, 0.85); }

.create-stage-loading {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.create-loading-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 1.1s linear infinite;
}
.create-loading-ring img { width: 32px; height: 32px; border-radius: 8px; animation: spin 1.1s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.create-stage-loading span { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.75); }

.create-stage-result {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.create-stage-result video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
}

.create-error {
  font-size: 12.5px;
  font-weight: 600;
  color: #ff8a8a;
  background: rgba(255, 90, 90, 0.1);
  border: 1px solid rgba(255, 90, 90, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
}

.create-generate-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.create-generate-btn { display: inline-flex; align-items: center; gap: 10px; }
.create-generate-logo { width: 20px; height: 20px; border-radius: 6px; }
.create-generate-cost {
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 9px;
  border-radius: 999px;
}
.create-left .create-generate-bar { margin-top: auto; }
.create-left .create-generate-btn { width: 100%; justify-content: center; }
.create-prompt-input {
  width: 100%;
  height: 120px;
  resize: none;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}
.create-prompt-input::placeholder { color: rgba(255, 255, 255, 0.4); }
.create-prompt-input:focus { outline: none; border-color: rgba(255, 90, 54, 0.6); background: rgba(255, 255, 255, 0.08); }

.create-result-actions { display: flex; gap: 10px; justify-content: flex-start; }

/* ---------- Auth pages ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  background: var(--bg-soft-2);
}
.auth-logo { justify-content: center; color: var(--white); }

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 36px 32px;
  text-align: center;
}
.auth-card h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-950);
  letter-spacing: -0.02em;
}
.auth-sub {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--navy-400);
}

.auth-form {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.auth-form label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-400);
  margin-top: 12px;
}
.auth-form input {
  font-family: var(--font);
  font-size: 14px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  color: var(--navy-950);
}
.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}
.auth-form .btn { margin-top: 20px; width: 100%; }

.auth-status {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--navy-400);
  min-height: 16px;
}
.auth-status.error { color: #d94848; }

.auth-switch {
  margin-top: 22px;
  font-size: 13px;
  color: var(--navy-400);
}
.auth-switch a { color: var(--accent); font-weight: 600; }

/* ---------- Dashboard ---------- */
.dashboard-shell {
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(900px circle at 6% -10%, rgba(255, 90, 54, 0.18), transparent 55%),
    radial-gradient(700px circle at 100% 100%, rgba(124, 147, 255, 0.13), transparent 55%),
    var(--bg-soft);
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  z-index: 40;
  top: 0;
  height: 100vh;
  transition: width 0.2s ease, padding 0.2s ease;
}
.sidebar-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 20px;
}
.sidebar-logo { padding: 0; }

.sidebar-toggle {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid rgba(11, 19, 48, 0.12);
  color: var(--navy-600);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}
.sidebar-toggle svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.8); color: var(--navy-950); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-600);
  transition: background 0.15s ease, color 0.15s ease;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255, 255, 255, 0.85); color: var(--navy-950); }
.sidebar-link.active { background: var(--accent-soft); color: var(--accent); }

.sidebar-create {
  background: var(--accent);
  color: var(--white);
  margin-bottom: 10px;
}
.sidebar-create:hover { background: var(--accent); filter: brightness(1.08); color: var(--white); }
.sidebar-create.active { background: var(--accent); color: var(--white); }

.sidebar-user {
  border-top: 1px solid rgba(11, 19, 48, 0.1);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-user-email {
  font-size: 12px;
  color: var(--navy-600);
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sidebar-logout svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Collapsed state */
.sidebar.collapsed { width: 76px; padding-left: 10px; padding-right: 10px; }
.sidebar.collapsed .sidebar-logo-row { flex-direction: column; gap: 12px; padding: 6px 0 20px; }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar.collapsed .logo-word,
.sidebar.collapsed .sidebar-link-label,
.sidebar.collapsed .sidebar-user-email { display: none; }
.sidebar.collapsed .sidebar-link { justify-content: center; padding: 9px; overflow: visible; }
.sidebar.collapsed .sidebar-user { align-items: center; }
.sidebar.collapsed .sidebar-logout {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  position: relative;
  overflow: visible;
}

/* Floating name tooltips on hover, only while collapsed */
.sidebar-tooltip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #141d42;
  color: var(--white);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.sidebar.collapsed .sidebar-link:hover .sidebar-tooltip,
.sidebar.collapsed .sidebar-logo:hover .sidebar-tooltip,
.sidebar.collapsed .sidebar-logout:hover .sidebar-tooltip { opacity: 1; }
.sidebar.collapsed .sidebar-logo { position: relative; overflow: visible; }

.dashboard-main {
  flex: 1;
  min-width: 0;
  padding: 24px 0;
}
.dashboard-main .container { max-width: none; padding: 0 20px; }

.dashboard-view { display: none; }
.dashboard-view.active { display: block; }

.dashboard-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.dashboard-panel-head h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-950);
}
.dashboard-panel-note {
  font-size: 13.5px;
  color: var(--navy-400);
}

.confirm-banner {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  background: #fff8eb;
  border: 1px solid #f0dca8;
  border-radius: 999px;
  font-size: 12.5px;
  color: #8a6414;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 0 16px;
  text-align: center;
}
.empty-state p { font-size: 13.5px; color: var(--navy-400); }

/* ---------- Admin panel ---------- */
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.admin-head h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy-950);
}
.admin-count {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-400);
}

.admin-table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-400);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--navy-950);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-empty { color: var(--navy-400); text-align: center; padding: 28px 16px; }

.admin-thumb {
  position: relative;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
}
.admin-thumb-tag {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(11, 19, 48, 0.55);
  border-radius: 999px;
  padding: 2px 0;
}

.admin-row-actions { text-align: right; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy-600);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.modal-close:hover { background: var(--card-soft); color: var(--navy-950); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 48, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 32px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}
.modal-overlay.open .admin-modal {
  transform: translateY(0) scale(1);
}
.admin-modal h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-950);
  margin-bottom: 20px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-400);
}
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="file"],
.admin-form select {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  color: var(--navy-950);
}
.admin-form input:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}
.admin-checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}
.admin-checkbox input { width: 16px; height: 16px; }
.admin-checkbox span {
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--navy-950);
}
.admin-current-video {
  font-size: 12px;
  color: var(--navy-400);
  margin-top: -6px;
}
.admin-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.admin-form-actions .btn { flex: 1; }
.admin-status {
  font-size: 12.5px;
  color: #d94848;
  min-height: 16px;
}

@media (max-width: 800px) {
  .sidebar { display: none; }
  .dashboard-main { padding: 24px 0 60px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .template-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
  .template-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 44px; }
  .create-workspace { grid-template-columns: 1fr; }
  .create-template-card { max-width: 220px; }
  .create-more-templates .template-grid { grid-template-columns: repeat(3, 1fr); }
  .storage-modal { width: 80vw; height: 70vh; }
  .compare-body { grid-template-columns: 1fr; gap: 20px; }
  .compare-video-wrap { max-width: 320px; margin: 0 auto; width: 100%; }
  .compare-center { padding: 20px 0; }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .create-more-templates .template-grid { grid-template-columns: repeat(2, 1fr); }
  .storage-modal { width: 92vw; height: 80vh; padding: 20px; }
  .hero h1 { font-size: 34px; }
  .hero-stats { gap: 26px; flex-wrap: wrap; }
  .compare-frame { padding: 16px; }
  .compare-tagline { font-size: 17px; }
}
