/* ============================================================
   FutureFace — AI Powered Face Age Progression
   Designed to match the high-fidelity UI reference & Shwet Patel's Portfolio (heyshwet.me)
   Supports full Light & Dark mode, mobile & laptop responsiveness, and touch gestures.
   ============================================================ */

/* ------------------------------------------------------------
   COLOR SYSTEM & VARIABLES
   ------------------------------------------------------------ */
:root {
  /* Light Theme (Default clean dashboard matching attachment) */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-color-strong: #cbd5e1;
  --border-focus: #6366f1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --primary: #5548ea;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  --primary-glow: rgba(99, 102, 241, 0.2);
  
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  
  --badge-bg: #eef2ff;
  --badge-text: #4f46e5;
  --badge-border: #c7d2fe;
  
  --card-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 12px 30px -4px rgba(99, 102, 241, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  --modal-backdrop: rgba(15, 23, 42, 0.6);
  
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-border: #e2e8f0;
  
  --slider-track: #e2e8f0;
  --slider-fill: #6366f1;
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme (Deep Indigo-Zinc matching heyshwet.me) */
html.dark {
  --bg-page: #0b0f19;
  --bg-card: #131927;
  --bg-card-subtle: #192235;
  --bg-card-hover: #1e283d;
  --border-color: #232d42;
  --border-color-strong: #334155;
  --border-focus: #818cf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-border: rgba(99, 102, 241, 0.35);
  --primary-glow: rgba(99, 102, 241, 0.35);
  
  --badge-bg: rgba(99, 102, 241, 0.16);
  --badge-text: #a5b4fc;
  --badge-border: rgba(99, 102, 241, 0.3);
  
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --card-shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.6);
  --modal-backdrop: rgba(3, 7, 18, 0.8);
  
  --nav-bg: rgba(11, 15, 25, 0.85);
  --nav-border: #1e293b;
  
  --slider-track: #232d42;
  --slider-fill: #818cf8;
}

/* ------------------------------------------------------------
   BASE & RESET
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Atmosphere */
.background-glow {
  position: fixed;
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 65%);
  filter: blur(90px);
  z-index: -2;
  pointer-events: none;
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -1;
  pointer-events: none;
}

/* General Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Reusable Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

/* Utility Hidden */
.hidden {
  display: none !important;
}

/* ------------------------------------------------------------
   BUTTONS & CONTROLS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-strong);
  transform: translateY(-1px);
}

.btn-large {
  padding: 0.85rem 1.6rem;
  font-size: 1.02rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-xs);
}

.btn-block {
  width: 100%;
}

/* ------------------------------------------------------------
   HEADER & NAVIGATION
   ------------------------------------------------------------ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  transition: var(--transition);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Brand */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.45rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-btn-link {
  font-family: inherit;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* GPU Status Pill */
.system-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Portfolio Badge Link */
.portfolio-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
}

.portfolio-badge-link:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-strong);
  color: var(--primary);
}

.moon-icon { display: none; }
.sun-icon { display: block; }
html.dark .moon-icon { display: block; }
html.dark .sun-icon { display: none; }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ------------------------------------------------------------
   MAIN LAYOUT CONTAINER
   ------------------------------------------------------------ */
.app-main-content {
  max-width: 1360px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  width: 100%;
}

/* ------------------------------------------------------------
   SECTION: TOP DASHBOARD (Hero + Try Now Generator)
   ------------------------------------------------------------ */
.top-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
  align-items: stretch;
}

/* HERO SHOWCASE CARD (Left) */
.hero-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  align-self: flex-start;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 0.4rem;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.8rem;
  line-height: 1.25;
}

.hero-description {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

/* Trust Badges */
.hero-trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trust-badge svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* Hero Visual Split Showcase (Interactive Preview) */
.hero-visual-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.hero-split-slider {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
  border: 3px solid var(--border-color);
  user-select: none;
  cursor: ew-resize;
  background: #000;
}

.hero-img-after,
.hero-img-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero-img-before-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  pointer-events: none;
  transition: clip-path 0.05s ease-out;
}

.hero-age-pill {
  position: absolute;
  bottom: 16px;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-age-pill.pill-left {
  left: 16px;
}

.hero-age-pill.pill-right {
  right: 16px;
}

.hero-split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 10;
  transform: translateX(-50%);
}

.hero-split-handle .handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border: 2px solid var(--primary);
}

.hero-arrows-arc {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   GENERATOR WORKSPACE CARD (Right)
   ------------------------------------------------------------ */
.generator-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Step Navigation Bar */
.step-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.5rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.step-node {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.45;
  transition: var(--transition);
}

.step-node.active {
  opacity: 1;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.step-node.active .step-num {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.step-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 0.85rem;
  transition: var(--transition);
}

.step-line.completed {
  background: var(--primary);
}

/* Generator Body 2-Column Grid */
.generator-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.generator-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
}

.col-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Mini Tab Switcher */
.mini-tabs {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  gap: 2px;
}

.mini-tab-btn {
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
}

.mini-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Modern Dropzone */
.dropzone-modern {
  border: 2px dashed var(--border-color-strong);
  border-radius: var(--radius-md);
  padding: 2.2rem 1.25rem;
  text-align: center;
  background: var(--bg-card-subtle);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone-modern:hover,
.dropzone-modern.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-cloud-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dropzone-text-primary {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dropzone-text-secondary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.highlight-browse {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.dropzone-support {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Dropzone Preview */
.dropzone-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.dropzone-preview img {
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Camera Viewport - Full View with Visible Boundary Corners */
.camera-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 280px;
  max-height: 480px;
  border-radius: var(--radius-md);
  background: #060911;
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: aspect-ratio 0.25s ease, border-color 0.25s ease;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.camera-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.cam-p1 {
  font-size: 0.88rem;
  color: #94a3b8;
}

#webcamVideo,
.snapshot-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Full camera frame visible - every single corner in view! */
  transform: scaleX(-1); /* mirror selfie view */
  background: #000;
}

/* Camera boundary corner guides */
.camera-corner-guides {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.2s ease;
}

.camera-viewport.state-off .camera-corner-guides {
  display: none;
}

.cam-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #38bdf8;
  border-style: solid;
  opacity: 0.9;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
}

.cam-corner-tl {
  top: 0;
  left: 0;
  border-width: 2.5px 0 0 2.5px;
  border-top-left-radius: 4px;
}

.cam-corner-tr {
  top: 0;
  right: 0;
  border-width: 2.5px 2.5px 0 0;
  border-top-right-radius: 4px;
}

.cam-corner-bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 2.5px 2.5px;
  border-bottom-left-radius: 4px;
}

.cam-corner-br {
  bottom: 0;
  right: 0;
  border-width: 0 2.5px 2.5px 0;
  border-bottom-right-radius: 4px;
}

.camera-live-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.face-guide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.face-guide-oval {
  width: 140px;
  height: 190px;
  border: 2px dashed rgba(6, 182, 212, 0.75);
  border-radius: 50% 50% 45% 45%;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.35);
}

.guide-text {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 8px;
  border-radius: 9999px;
}

/* Camera Viewport State Machine */
.camera-viewport.state-off #webcamVideo,
.camera-viewport.state-off .face-guide-overlay,
.camera-viewport.state-off .snapshot-preview {
  display: none;
}

.camera-viewport.state-streaming .camera-placeholder,
.camera-viewport.state-streaming .snapshot-preview {
  display: none;
}

.camera-viewport.state-captured .camera-placeholder,
.camera-viewport.state-captured #webcamVideo,
.camera-viewport.state-captured .face-guide-overlay {
  display: none;
}

.camera-controls,
.snapshot-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* Demo Samples Picker */
.demo-samples-picker {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.samples-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-chips-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.demo-sample-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  object-fit: cover;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.demo-sample-thumb:hover {
  border-color: var(--primary);
  transform: scale(1.08);
}

/* Right Column: Age Estimation & Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.current-age-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.face-thumb-mini {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.thumb-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-mini-placeholder {
  color: var(--text-muted);
}

.age-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  flex-wrap: wrap;
}

.current-age-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
  line-height: 1;
}

.age-unit-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Target Age Controls */
.target-age-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.target-age-badge {
  padding: 0.25rem 0.75rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

/* Custom Range Slider */
.slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: var(--slider-track);
  outline: none;
  transition: var(--transition);
  cursor: pointer;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
  cursor: pointer;
  transition: var(--transition);
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  font-family: var(--font-mono);
  padding: 0 4px;
}

/* Quick Preset Chips */
.custom-range-slider:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.custom-range-slider:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.preset-chips-wrap {
  margin-top: 0.25rem;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.no-presets-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.2rem 0;
}

.preset-chip {
  padding: 0.35rem 0.7rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.preset-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Target Summary Pill */
.target-summary-pill {
  padding: 0.65rem 0.95rem;
  background: var(--bg-card-subtle);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 0.25rem;
}

.generate-btn-wrap {
  margin-top: 0.5rem;
}

/* ------------------------------------------------------------
   GENERATED RESULT PRESENTATION
   ------------------------------------------------------------ */
.result-presentation-box {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-divider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.success-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.result-view-toggles {
  display: inline-flex;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.result-toggle-btn {
  padding: 0.4rem 0.85rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
}

.result-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.result-panel {
  display: none;
}

.result-panel.active {
  display: block;
}

/* Split Slider Result Layout (Labels placed safely above/outside slider) */
.split-slider-header-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0 4px;
}

.slider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-cyan { background: #06b6d4; }
.dot-purple { background: #8b5cf6; }

.split-slider-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--border-color);
  user-select: none;
  cursor: ew-resize;
  background: #000;
}

.split-img-after,
.split-img-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.split-img-before-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  pointer-events: none;
  transition: clip-path 0.05s ease-out;
}

.split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 10;
  transform: translateX(-50%);
}

.split-handle .handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--primary);
}

.slider-caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Comparison Poster (Box to Box fit) */
.poster-preview-wrapper {
  display: flex;
  justify-content: center;
}

.poster-preview-img {
  max-width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  object-fit: contain;
}

/* Result Actions & Stats Bar */
.result-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.result-stats-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.stat-item {
  padding: 0.3rem 0.6rem;
  background: var(--bg-card-subtle);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-color);
}

.stat-item.highlight {
  color: var(--accent-purple);
  border-color: rgba(139, 92, 246, 0.3);
}

.stat-item.success {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.stat-arrow {
  color: var(--text-light);
  font-size: 0.8rem;
}

.result-buttons-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ------------------------------------------------------------
   SECTION: HOW IT WORKS
   ------------------------------------------------------------ */
.section-block {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.85rem;
}

.hiw-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
}

.hiw-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-border);
}

.hiw-step-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.hiw-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.hiw-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.hiw-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hiw-arrow {
  color: var(--text-light);
  font-size: 1.25rem;
  font-weight: bold;
}

/* ------------------------------------------------------------
   SECTION: EXAMPLE RESULTS (Exact files: 27_age to 87_age)
   ------------------------------------------------------------ */
.example-sequence-card {
  padding: 1.75rem;
  overflow: hidden;
}

.sequence-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-card-subtle);
}

.sequence-track::-webkit-scrollbar {
  height: 6px;
}

.sequence-track::-webkit-scrollbar-thumb {
  background: var(--border-color-strong);
  border-radius: 9999px;
}

.sequence-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.sequence-avatar-box {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.sequence-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sequence-item:hover .sequence-avatar-box {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--primary-glow);
}

.sequence-item:hover .sequence-avatar-box img {
  transform: scale(1.06);
}

.sequence-age-tag {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.sequence-chevron {
  color: var(--text-light);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   SECTION: BOTTOM DASHBOARD (Gallery, Key Features, About)
   ------------------------------------------------------------ */
.bottom-dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.1fr;
  gap: 1.75rem;
  align-items: stretch;
}

/* GALLERY CARD (Left) */
.gallery-card {
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gallery-filters {
  display: inline-flex;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.filter-btn {
  padding: 0.35rem 0.7rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
}

.gallery-pair {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  width: 100%;
  aspect-ratio: 16 / 9;
}

.gallery-face {
  width: 50%;
  height: 100%;
  object-fit: cover;
}

.gallery-divider-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.gallery-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* KEY FEATURES CARD (Center) */
.features-card {
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.features-2x2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature-tile {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  transition: var(--transition);
}

.feature-tile:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.feature-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.feature-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ABOUT CARD (Right - With heyshwet.me link instead of Research) */
.about-card {
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.about-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.about-stats-chips {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.95rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.stat-chip svg {
  color: var(--primary);
  flex-shrink: 0;
}

.stat-chip div {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.stat-chip strong {
  font-size: 0.92rem;
  color: var(--text-main);
}

.stat-chip span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.about-actions-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   FEEDBACK MODAL
   ------------------------------------------------------------ */
.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

.feedback-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 1.85rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.modal-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.star-rating {
  display: flex;
  gap: 0.45rem;
  font-size: 1.75rem;
  color: var(--border-color-strong);
  cursor: pointer;
  user-select: none;
}

.star-rating .star {
  transition: var(--transition);
}

.star-rating .star.active {
  color: #f59e0b;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.95rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.modal-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ------------------------------------------------------------
   PROGRESS RADAR OVERLAY
   ------------------------------------------------------------ */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.progress-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Enhanced Biometric Scanner Modal */
.enhanced-scanner-modal {
  max-width: 490px;
  padding: 1.6rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55), 0 0 35px rgba(56, 189, 248, 0.15);
  gap: 0.95rem;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-top-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scanner-top-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.28rem 0.85rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.estimated-duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.85rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.02em;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.estimated-duration-pill strong {
  color: #7dd3fc;
  font-weight: 800;
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseGlow 1.2s infinite alternate;
}

/* Face Scanner Viewport */
.face-scanner-viewport {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0.15rem auto;
  background: #000000;
  border: 2px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25), inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.scanner-live-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

.scanner-face-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) brightness(0.95);
  transition: filter 0.5s ease;
}

/* Laser Scan Line */
.scanner-laser-beam {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, #ffffff, #38bdf8, transparent);
  box-shadow: 0 0 14px #38bdf8, 0 0 24px #38bdf8;
  animation: laserSweep 2s ease-in-out infinite alternate;
  z-index: 5;
  pointer-events: none;
}

@keyframes laserSweep {
  0% { top: 3%; opacity: 0.3; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 96%; opacity: 0.3; }
}

/* Neural Landmark Mesh */
.neural-landmark-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.landmark-wireframe {
  width: 100%;
  height: 100%;
  opacity: 0.75;
  animation: wireframePulse 2.5s ease-in-out infinite alternate;
}

@keyframes wireframePulse {
  0% { opacity: 0.35; }
  100% { opacity: 0.85; }
}

.landmark-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8, 0 0 10px #ffffff;
  transform: translate(-50%, -50%);
  animation: dotBlink 1.4s ease-in-out infinite alternate;
}

.dot-eye-left { top: 38%; left: 36%; }
.dot-eye-right { top: 38%; left: 64%; }
.dot-nose { top: 54%; left: 50%; animation-delay: 0.2s; }
.dot-mouth-left { top: 72%; left: 40%; animation-delay: 0.4s; }
.dot-mouth-right { top: 72%; left: 60%; animation-delay: 0.4s; }
.dot-chin { top: 88%; left: 50%; animation-delay: 0.6s; }

.pixel-reticle {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px dashed #38bdf8;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  pointer-events: none;
  transition: top 0.25s ease-out, left 0.25s ease-out;
}

@keyframes dotBlink {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

/* HUD Corner Brackets */
.hud-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #38bdf8;
  z-index: 6;
  pointer-events: none;
}

.hud-top-left { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.hud-top-right { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.hud-bottom-left { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.hud-bottom-right { bottom: 6px; right: 6px; border-left: none; border-top: none; }

/* HUD Telemetry Labels */
.hud-telemetry {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.75);
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  z-index: 6;
  pointer-events: none;
}

.hud-tl { top: 8px; left: 16px; }
.hud-tr { top: 8px; right: 16px; }
.hud-bl { bottom: 8px; left: 16px; }
.hud-br { bottom: 8px; right: 16px; }

/* Real-Time Changing Pixel Telemetry Box */
.live-pixel-telemetry-box {
  width: 100%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #94a3b8;
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telemetry-lbl {
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

.telemetry-val {
  color: #f1f5f9;
  font-weight: 600;
}

.telemetry-val.highlight-val {
  color: #38bdf8;
  font-weight: 700;
}

.estimating-pulse {
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  animation: pulseGlow 1.2s infinite alternate;
}

/* Scanner Text Group */
.scanner-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: center;
}

.scanner-text-group h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.scanner-text-group p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Progress Bar Container */
.progress-bar-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.progress-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 9999px;
  background: var(--bg-card-subtle);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
  border-radius: 9999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.progress-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Real-Time Live Stopwatch Timer (Under that run timer) */
.live-stopwatch-container {
  width: 100%;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.stopwatch-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary);
  text-transform: uppercase;
}

.stopwatch-counter {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  line-height: 1.1;
}

.stopwatch-footnote {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Scanner Terminal Log Stream */
.scanner-terminal-log {
  width: 100%;
  max-height: 60px;
  overflow-y: hidden;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: left;
}

.log-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: fadeInLog 0.2s ease-out;
}

.log-line.active-log {
  color: #38bdf8;
}

@keyframes fadeInLog {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   ERROR TOAST NOTIFICATION
   ------------------------------------------------------------ */
.error-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ef4444;
  color: #ffffff;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 300;
  max-width: 420px;
  font-size: 0.88rem;
  font-weight: 600;
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.app-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 2.2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-col-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.footer-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.footer-brand-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.copyright {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-link {
  color: var(--primary);
  font-weight: 600;
}

.footer-col-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-models-info {
  font-size: 0.75rem;
  color: var(--text-light);
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------
   MOBILE & RESPONSIVE BREAKPOINTS
   ------------------------------------------------------------ */
@media (max-width: 1120px) {
  .top-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .bottom-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-card {
    grid-column: span 2;
  }

  .how-it-works-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .hiw-arrow {
    display: none;
  }
}

@media (max-width: 860px) {
  .generator-body-grid {
    grid-template-columns: 1fr;
  }

  .bottom-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    grid-column: span 1;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-col-right {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0.65rem 1rem;
  }

  .system-status .status-text {
    display: none;
  }

  .system-status {
    padding: 0.35rem 0.55rem;
  }

  .portfolio-badge-link span {
    display: none;
  }

  .portfolio-badge-link {
    padding: 0.35rem 0.55rem;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    gap: 0.75rem;
    z-index: 9999;
  }

  .nav-menu.open {
    display: flex !important;
  }

  .nav-menu .nav-link {
    width: 100%;
    text-align: center;
    padding: 0.85rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    display: block;
  }

  .nav-menu .nav-link.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .app-main-content {
    padding: 1rem 0.85rem 3rem;
    gap: 2rem;
  }

  .card,
  .hero-card,
  .generator-card,
  .gallery-card,
  .features-card,
  .about-content-card,
  .feedback-form-card,
  .example-sequence-card,
  .home-cta-banner {
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }

  .hero-title {
    font-size: clamp(2rem, 7.5vw, 2.8rem);
    line-height: 1.15;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .hero-cta-row {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .hero-cta-row .btn {
    width: 100%;
  }

  .hero-trust-badges {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.78rem;
  }

  #heroSplitSlider {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
  }

  .how-it-works-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .step-nav-bar {
    padding: 0.25rem 0 0.85rem;
    justify-content: space-between;
  }

  .step-node {
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
    text-align: center;
  }

  .step-num {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .step-name {
    font-size: 0.7rem;
    font-weight: 700;
    display: block;
  }

  .step-line {
    margin: 0 0.25rem 1.1rem;
  }

  .dropzone-modern {
    min-height: 160px;
    padding: 1.25rem 0.75rem;
  }

  .camera-viewport {
    height: 220px;
    width: 100%;
  }

  .demo-chips-scroll {
    gap: 0.6rem;
    padding: 0.4rem 0.1rem;
  }

  .demo-sample-thumb {
    width: 52px;
    height: 52px;
  }

  .split-slider-container {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
  }

  .split-slider-header-labels {
    font-size: 0.78rem;
  }

  .poster-preview-img {
    max-height: 320px;
    width: 100%;
  }

  .result-stats-group {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0.35rem;
  }

  .result-buttons-group {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }

  .result-buttons-group .btn {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .features-2x2-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .side-by-side-wrapper {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about-combined-img {
    width: 100%;
    height: auto;
    max-height: 350px;
  }

  .about-page-title,
  .try-now-title,
  .feedback-page-title {
    font-size: clamp(2rem, 7vw, 2.6rem);
  }

  .about-page-subtitle,
  .try-now-desc,
  .feedback-page-desc {
    font-size: 0.95rem;
  }

  .about-bottom-cta {
    flex-direction: column;
    width: 100%;
  }

  .about-bottom-cta .btn {
    width: 100%;
  }

  .success-actions-row {
    flex-direction: column;
    width: 100%;
  }

  .success-actions-row .btn {
    width: 100%;
  }
}


/* ============================================================
   PAGE-SPECIFIC STYLES: HOME, TRY NOW, ABOUT, FEEDBACK
   ============================================================ */

/* ------------------------------------------------------------
   1. HOME PAGE
   ------------------------------------------------------------ */
.home-hero-section {
  padding: 1rem 0;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
}

.home-hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.hero-slider-hint {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.home-bottom-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.75rem;
  align-items: stretch;
}

.home-cta-banner {
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-subtle) 100%);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.home-cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.cta-banner-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-badge {
  display: inline-flex;
  padding: 0.3rem 0.8rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.cta-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.2;
}

.cta-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ------------------------------------------------------------
   2. TRY NOW PAGE
   ------------------------------------------------------------ */
.try-now-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.try-now-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.try-now-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.try-now-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   3. ABOUT & PROJECT JOURNEY PAGE (Pixel-perfect matching mockups)
   ------------------------------------------------------------ */
.about-page-container {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  width: 100%;
}

.about-hero-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.about-page-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.15;
}

.about-page-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  max-width: 680px;
}

.about-links-row {
  display: flex;
  gap: 0.85rem;
  margin: 0.4rem 0 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Showcase Card with Combine.png */
.showcase-frame-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  border-radius: var(--radius-lg);
}

.showcase-img-wrap {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.about-combined-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

.showcase-caption-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* Main Cards in About Page */
.journey-main-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-radius: var(--radius-lg);
}

.card-headline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.85rem;
  margin-bottom: 0.35rem;
}

.card-icon-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.title-svg-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.card-main-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.card-sub-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  text-align: justify;
  text-justify: inter-word;
}

.quote-callout-box {
  border-left: 4px solid var(--primary);
  background: var(--bg-card-subtle);
  padding: 1.25rem 1.6rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 0.5rem 0;
}

.quote-content {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  text-align: justify;
  text-justify: inter-word;
}

.journey-lead-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-main);
  text-align: justify;
  text-justify: inter-word;
}

.journey-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: justify;
  text-justify: inter-word;
}

.journey-text strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Ensure all descriptive body text across About page is strictly justified */
.about-page-container p {
  text-align: justify;
  text-justify: inter-word;
}

/* Captions under images stay centered */
.about-page-container .stage-caption-text,
.about-page-container .side-caption-text,
.about-page-container .showcase-caption-text {
  text-align: center;
}

/* Inner Stage Cards (Stages 1 and 2) */
.inner-stage-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 0.5rem;
}

.stage-title-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stage-circle-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 2px 8px var(--primary-glow);
  flex-shrink: 0;
}

.stage-heading {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text-main);
}

.stage-media-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.stage-img-box {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.stage-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

.stage-caption-text,
.side-caption-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* Challenge Blocks */
.challenge-topic-block {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.challenge-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topic-warn-icon {
  color: #f59e0b;
  font-size: 1.1rem;
}

.topic-warn {
  color: #f59e0b;
  font-size: 1.12rem;
  font-weight: 700;
}

.topic-check-icon {
  color: var(--accent-emerald);
  font-weight: 800;
  font-size: 1.15rem;
}

.topic-success {
  color: var(--accent-emerald);
  font-size: 1.15rem;
  font-weight: 800;
}

.journey-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.25rem 0;
}

/* Side by Side Image Comparisons (Matching screenshots) */
.journey-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 0.75rem 0 0.5rem;
  align-items: stretch;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.col-tag-header {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  gap: 0.45rem;
  min-height: 28px;
  margin-bottom: 0.25rem;
}

.tag-badge-blue {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tag-sub-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tag-label-red {
  color: #ef4444;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
}

.tag-label-green {
  color: var(--accent-emerald);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
}

.tag-label-blue {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
}

.journey-img-frame {
  width: 100%;
  flex: 1 1 auto;
  min-height: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.journey-img-frame:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
}

.full-view-img {
  max-width: 100%;
  max-height: 480px;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

.about-bottom-cta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.challenge-subcard.success-card {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

.challenge-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.challenge-title.highlight-title {
  color: var(--accent-emerald);
}

/* Side by Side Image Comparisons */
.side-by-side-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 0.75rem 0;
}

.comparison-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.column-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-align: center;
}

.badge-given {
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
}

.badge-error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.comparison-img-box {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  margin: 0 auto;
  box-sizing: border-box;
}

.comparison-img-box img {
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  transition: transform 0.3s ease;
}

.comparison-img-box.box-full-image {
  aspect-ratio: auto !important;
  min-height: auto;
}

.comparison-img-box.box-full-image img {
  height: auto !important;
  max-height: 560px;
  object-fit: contain !important;
}

.comparison-img-box:hover img {
  transform: scale(1.02);
}

.column-filename {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-light);
}

.caption-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

.caption-note.success-note {
  color: var(--accent-emerald);
  font-weight: 600;
  font-style: normal;
}


/* ------------------------------------------------------------
   4. FEEDBACK PAGE
   ------------------------------------------------------------ */
.feedback-page-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.feedback-page-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.feedback-page-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.feedback-page-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.feedback-layout-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2rem;
  align-items: start;
}

.feedback-form-card {
  padding: 2.2rem;
}

.standalone-feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.required-mark {
  color: #ef4444;
  margin-left: 2px;
}

.rating-label-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.feedback-success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 2rem 1rem;
  animation: fadeIn 0.3s ease-out;
}

.success-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.feedback-success-state h3 {
  font-size: 1.45rem;
  font-weight: 800;
}

.feedback-success-state p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.6;
}

.success-actions-row {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.feedback-info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.info-card {
  padding: 1.85rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}

.developer-portfolio-card {
  min-height: 275px;
}

.project-repo-card {
  min-height: 190px;
}

.info-card:hover {
  border-color: var(--border-focus);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

html.dark .info-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card-header-badge-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dev-avatar-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.repo-icon-circle {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  color: #ffffff;
}

.dev-header-titles {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dev-role-subtitle {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-card-title {
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--text-main);
  line-height: 1.3;
}

.info-card-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.dev-links-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.btn-portfolio-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  height: 46px;
  padding: 0 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.28);
}

.btn-portfolio-main:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

.dev-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: 100%;
}

.btn-social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-linkedin-pill {
  background: rgba(10, 102, 194, 0.1);
  color: #0a66c2;
  border: 1.5px solid rgba(10, 102, 194, 0.3);
}

html.dark .btn-linkedin-pill {
  background: rgba(10, 102, 194, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.btn-linkedin-pill:hover {
  background: #0a66c2;
  color: #ffffff;
  border-color: #0a66c2;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(10, 102, 194, 0.28);
}

html.dark .btn-linkedin-pill:hover {
  background: #0a66c2;
  color: #ffffff;
  border-color: #0a66c2;
  box-shadow: 0 4px 14px rgba(10, 102, 194, 0.35);
}

.btn-github-pill {
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
}

.btn-github-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-strong);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.btn-repo-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  height: 44px;
  padding: 0 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-card-subtle);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-repo-main:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-strong);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.external-arrow {
  margin-left: 2px;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

a:hover .external-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* Responsive adjustments for new pages */
@media (max-width: 900px) {
  .home-hero-grid,
  .home-bottom-grid,
  .feedback-layout-grid {
    grid-template-columns: 1fr;
  }

  .stages-summary-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .stage-arrow {
    text-align: center;
    transform: rotate(90deg);
  }
}

@media (max-width: 768px) {
  .journey-side-by-side {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .journey-img-frame {
    min-height: auto;
  }

  .inner-stage-card {
    padding: 1.15rem;
  }

  .journey-main-card {
    padding: 1.35rem;
  }

  .about-links-row {
    flex-direction: column;
    width: 100%;
  }

  .about-links-row .btn {
    width: 100%;
    justify-content: center;
  }

  .full-view-img {
    max-height: 380px;
  }
}

@media (max-width: 640px) {
  .journey-side-by-side,
  .side-by-side-wrapper {
    grid-template-columns: 1fr;
  }

  .about-content-card,
  .journey-main-card,
  .feedback-form-card {
    padding: 1.2rem;
  }

  .about-page-title,
  .try-now-title,
  .feedback-page-title {
    font-size: 1.9rem;
  }

  .about-page-subtitle {
    font-size: 1.05rem;
  }

  .card-main-title {
    font-size: 1.3rem;
  }

  .stage-heading {
    font-size: 1.1rem;
  }

  .dev-social-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FACE ANGLE & PHOTO GUIDELINES TUTORIAL POPUP MODAL
   ============================================================ */
.try-now-guide-action {
  display: flex;
  justify-content: center;
  margin-top: 0.95rem;
}

.guide-pill-btn {
  border-radius: 9999px;
  padding: 0.45rem 1.25rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.12);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.guide-pill-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.modal-backdrop-guide {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
}

.guide-modal-box {
  position: relative;
  max-width: 640px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65), 0 0 35px rgba(56, 189, 248, 0.15);
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}

.guide-modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.guide-modal-close:hover {
  background: var(--border-focus);
  color: var(--text-main);
  transform: scale(1.08);
}

.guide-modal-header {
  text-align: left;
}

.guide-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.85rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.guide-modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.guide-modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.guide-image-showcase {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}

.guide-img-wrapper {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
  padding: 0.65rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
}

.guide-visual-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.guide-angles-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
}

.legend-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
}

.legend-acceptable {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.legend-recommended {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.dot-yellow {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}

.dot-green {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.legend-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.legend-text strong {
  color: var(--text-main);
  font-size: 0.82rem;
}

.legend-text span {
  color: var(--text-muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.guide-checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.checklist-col {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.col-dos {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.col-donts {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.checklist-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.title-do {
  color: #10b981;
}

.title-dont {
  color: #ef4444;
}

.checklist-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.checklist-items strong {
  color: var(--text-main);
}

.guide-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.guide-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

@media (max-width: 640px) {
  .guide-modal-box {
    padding: 1.5rem 1.25rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .guide-angles-legend,
  .guide-checklist-grid {
    grid-template-columns: 1fr;
  }

  .guide-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-modal-footer .btn {
    width: 100%;
  }
}

/* ==========================================================================
   SAFEZONE CROP EDITOR MODAL & GRID STYLES
   ========================================================================== */

.preview-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.btn-safezone-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0284c7;
  background: rgba(14, 165, 233, 0.1);
  border: 1.5px solid rgba(14, 165, 233, 0.38);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: auto;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

html.dark .btn-safezone-pill {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
}

.btn-safezone-pill:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

html.dark .btn-safezone-pill:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}

.btn-safezone-pill svg {
  flex-shrink: 0;
}

.btn-outline {
  background: transparent;
  color: #38bdf8;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #ffffff;
}

/* Safezone Modal Backdrop */
.safezone-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.safezone-modal-backdrop.hidden {
  display: none !important;
}

.safezone-modal-container {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 660px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUpSafezone 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUpSafezone {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.safezone-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #131d35;
}

.safezone-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.safezone-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.safezone-modal-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.safezone-modal-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
}

.safezone-modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
}

.safezone-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.safezone-modal-body {
  padding: 1rem;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  max-height: 60vh;
  overflow: hidden;
  user-select: none;
}

.safezone-canvas-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.safezone-stage {
  position: relative;
  display: inline-block;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
  border-radius: 4px;
}

#safezoneSourceImg {
  display: block;
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
  pointer-events: none;
}

/* Crop Rect Box with 3x3 Grid */
.safezone-crop-rect {
  position: absolute;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.7), 0 0 15px rgba(56, 189, 248, 0.35);
  cursor: move;
  touch-action: none;
  box-sizing: border-box;
  z-index: 10;
}

/* Rule of Thirds Grid Lines */
.crop-grid-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.crop-grid-h1 { top: 33.33%; }
.crop-grid-h2 { top: 66.66%; }

.crop-grid-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.crop-grid-v1 { left: 33.33%; }
.crop-grid-v2 { left: 66.66%; }

/* Corner Handles */
.crop-hndl {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 2.5px solid #0284c7;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  z-index: 20;
}

.crop-hndl-tl { top: -9px; left: -9px; cursor: nwse-resize; }
.crop-hndl-tr { top: -9px; right: -9px; cursor: nesw-resize; }
.crop-hndl-bl { bottom: -9px; left: -9px; cursor: nesw-resize; }
.crop-hndl-br { bottom: -9px; right: -9px; cursor: nwse-resize; }

.crop-badge-indicator {
  position: absolute;
  top: -24px;
  left: 0;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  pointer-events: none;
  white-space: nowrap;
}

.safezone-modal-footer {
  padding: 0.85rem 1.25rem;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.safezone-footer-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
