/* ============================================================================
   MIRA AI - Web App Design System
   Dark 18+ Theme with Neon Accents
   ============================================================================ */

/* --------------------------------------------------------------------------
   CSS Variables / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg-primary: #08080e;
  --bg-secondary: #0f0f1a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-hover: rgba(255, 255, 255, 0.1);

  --accent-pink: #ff2d78;
  --accent-pink-glow: rgba(255, 45, 120, 0.4);
  --accent-purple: #b44dff;
  --accent-purple-glow: rgba(180, 77, 255, 0.3);
  --accent-gold: #ffd700;
  --accent-gold-glow: rgba(255, 215, 0, 0.3);
  --accent-cyan: #00e5ff;

  --text-primary: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.6);
  --text-muted: rgba(240, 240, 245, 0.35);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(255, 45, 120, 0.3);

  --success: #00e676;
  --warning: #ffab40;
  --error: #ff5252;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0a0a14 0%, #1a0a20 50%, #0a0a14 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  --gradient-gold: linear-gradient(135deg, #ffd700, #ff8c00);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', var(--font-main);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-pink: 0 0 30px var(--accent-pink-glow);
  --shadow-glow-purple: 0 0 30px var(--accent-purple-glow);
  --shadow-glow-gold: 0 0 20px var(--accent-gold-glow);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  z-index: -2;
}

/* Subtle noise texture overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
}

a {
  color: var(--accent-pink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gold {
  color: var(--accent-gold);
}

.hidden {
  display: none !important;
}

.blur-content {
  filter: blur(12px);
  transition: filter var(--transition-slow);
}

.blur-content.revealed {
  filter: blur(0);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: var(--shadow-glow-pink);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 50px var(--accent-pink-glow);
  text-decoration: none;
}

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

/* Pulsing CTA effect */
.btn-primary.pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px var(--accent-pink-glow);
  }

  50% {
    box-shadow: 0 0 50px var(--accent-pink-glow), 0 0 80px rgba(255, 45, 120, 0.2);
  }
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-pink);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-gold {
  background: var(--gradient-gold);
  color: #1a1a1a;
  box-shadow: var(--shadow-glow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 40px var(--accent-gold-glow);
  text-decoration: none;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.15rem;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* --------------------------------------------------------------------------
   Cards / Glass Panels
   -------------------------------------------------------------------------- */
.glass-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(20px);
  transition: all var(--transition-base);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.glass-card.accent-border {
  border-color: var(--border-accent);
}

.glass-card.accent-border:hover {
  border-color: var(--accent-pink);
  box-shadow: var(--shadow-glow-pink);
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(8, 8, 14, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.app-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  min-width: 0;
  flex-shrink: 1;
}

.logo-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-btn {
  display: none;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: var(--space-md);
  padding: 0.5rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.home-btn:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(181, 62, 238, 0.4);
}

.logo-icon {
  font-size: 1.8rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.balance-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.9rem;
}

.swap-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 45, 120, 0.1);
  border: 1px solid rgba(255, 45, 120, 0.2);
  font-size: 0.8rem;
  color: var(--accent-pink);
  font-weight: 600;
}

.swap-counter.exhausted {
  background: rgba(255, 82, 82, 0.1);
  border-color: rgba(255, 82, 82, 0.3);
  color: var(--error);
  animation: pulse-glow 2s infinite;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.premium-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--gradient-gold);
  color: #1a1a1a;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-glow-gold);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  padding-bottom: 40px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Floating orbs background */
.hero-section::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-pink-glow) 0%, transparent 70%);
  border-radius: 50%;
  top: -100px;
  right: -100px;
  animation: float-orb 8s ease-in-out infinite;
}

.hero-section::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -100px;
  left: -100px;
  animation: float-orb 10s ease-in-out infinite reverse;
}

@keyframes float-orb {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* Split layout: text left, video right */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  max-width: 1200px;
  position: relative;
  z-index: 1;
}

.hero-text {
  text-align: left;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  line-height: 1.6;
  max-width: 480px;
}

/* Hero feature bullet list */
.hero-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-2xl) 0;
  max-width: 520px;
}

.hero-features li {
  padding: 10px 0 10px 16px;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.5;
  border-left: 3px solid transparent;
  transition: all var(--transition-base);
}

.hero-features li:hover {
  border-left-color: var(--accent-pink);
  color: var(--text-primary);
  padding-left: 20px;
}

.hero-features li strong {
  color: var(--text-primary);
  font-weight: 700;
}

.hero-features li+li {
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

/* Hero media column */
.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float-media 6s ease-in-out infinite;
}

@keyframes float-media {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* Preview video container */
.preview-video-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-accent);
  box-shadow: var(--shadow-glow-pink);
  cursor: pointer;
  transition: all var(--transition-base);
}

.preview-video-container:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px var(--accent-pink-glow);
  border-color: var(--accent-pink);
}

.preview-video-container .badge-18 {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--error);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.preview-video {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
  filter: brightness(0.8);
  transition: filter var(--transition-slow);
}

.preview-video-container:hover .preview-video {
  filter: brightness(0.95);
}

/* Live counter */
.live-counter {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* --------------------------------------------------------------------------
   Stats Bar
   -------------------------------------------------------------------------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 500px;
  margin: var(--space-xl) auto;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   App Main Area
   -------------------------------------------------------------------------- */
.app-main {
  padding: 80px 0 var(--space-3xl);
}

/* --------------------------------------------------------------------------
   Workspace Three-Column Layout
   -------------------------------------------------------------------------- */
.workspace-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-xl);
  align-items: center;
  min-height: 60vh;
}

.workspace-left {
  position: sticky;
  top: 100px;
}

.workspace-left-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.workspace-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 180px;
  max-width: 220px;
  padding-top: var(--space-lg);
}

.workspace-right {
  min-height: 300px;
}

/* Workspace panels — only one visible at a time */
.workspace-panel {
  animation: fadeInPanel 0.3s ease-out;
}

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

.panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-align: center;
}

/* Placeholder content */
.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 300px;
  padding: var(--space-2xl);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.placeholder-content h3 {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.placeholder-content p {
  font-size: 0.9rem;
}

/* Face preview in workspace context — NO circular mask */
.workspace-left .face-preview {
  max-width: 100%;
  margin: 0 auto;
}

.workspace-left .face-preview img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 3px solid var(--accent-pink);
  box-shadow: var(--shadow-glow-pink);
  object-fit: cover;
}

/* Responsive: stack vertically on mobile */
@media (max-width: 768px) {
  .workspace-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .workspace-left {
    position: static;
  }

  .workspace-center {
    min-width: unset;
    max-width: 100%;
    width: 100%;
  }

  .workspace-left-inner {
    flex-direction: column;
    align-items: center;
  }

  .workspace-left .face-preview img {
    max-width: 300px;
    height: auto;
  }

  .placeholder-content {
    min-height: 200px;
    padding: var(--space-lg);
  }

  .placeholder-icon {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Upload Zone
   -------------------------------------------------------------------------- */

.upload-zone {
  border: 2px dashed var(--border-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent-pink);
  background: rgba(255, 45, 120, 0.05);
  box-shadow: var(--shadow-glow-pink);
}

.upload-zone .upload-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  display: block;
}

.upload-zone h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.upload-zone p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Paste hint inside upload zone */
.paste-hint {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.paste-kbd {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--accent-pink);
  font-weight: 600;
}

.paste-divider {
  color: rgba(255, 255, 255, 0.15);
  margin: 0 2px;
}

/* Focus state for paste support */
.upload-zone:focus {
  outline: none;
  border-color: var(--accent-pink);
  background: rgba(255, 45, 120, 0.03);
  box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.15);
}

/* Face preview after upload — rectangular, full aspect ratio */
.face-preview {
  position: relative;
  max-width: 100%;
  margin: 0 auto var(--space-lg);
}

.face-preview img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 3px solid var(--accent-pink);
  box-shadow: var(--shadow-glow-pink);
}

.face-preview .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--error);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.face-status {
  text-align: center;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
}

.face-status.success {
  color: var(--success);
}

.face-status.error {
  color: var(--error);
}

/* --------------------------------------------------------------------------
   Action Cards
   -------------------------------------------------------------------------- */
/* Action grid — vertical stack in center column */
.action-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.action-card {
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-pink);
}

.action-card .card-icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-xs, 4px);
  display: block;
}

.action-card h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.action-card p {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.4;
}

.action-card .cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-sm);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 45, 120, 0.1);
  color: var(--accent-pink);
  font-size: 0.7rem;
  font-weight: 600;
}

.action-card.hot::before {
  content: '🔥 HOT';
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--error);
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* VIP-only card */
.action-card.vip-card {
  border: 1px solid rgba(255, 193, 7, 0.3);
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(139, 92, 246, 0.08));
}

.action-card.vip-card:hover {
  border-color: rgba(255, 193, 7, 0.6);
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.15);
}

.vip-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--gradient-gold);
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-gold {
  color: #ffc107;
}

/* --------------------------------------------------------------------------
   Video Options Panel
   -------------------------------------------------------------------------- */
.video-back-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #aaa;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-bottom: var(--space-md);
  transition: all 0.2s;
}

.video-back-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.video-options-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.card-desc {
  font-size: 0.72rem;
  color: #888;
  margin-top: 0.2rem;
}

.video-id-section {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 10px;
}

.video-id-section label {
  display: block;
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 0.5rem;
}

.video-id-input-row {
  display: flex;
  gap: 0.5rem;
}

.video-id-input-row input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.video-id-input-row input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.video-id-input-row .btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Processing State
   -------------------------------------------------------------------------- */
.processing-section {
  text-align: center;
  padding: var(--space-3xl) 0;
}

.processing-animation {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-xl);
  position: relative;
}

.processing-ring {
  width: 100%;
  height: 100%;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.processing-ring::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 2px solid var(--border-subtle);
  border-bottom-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1.5s linear infinite reverse;
}

.processing-text {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.processing-subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.processing-tagline {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  display: inline-block;
  font-style: italic;
  color: var(--text-secondary);
}

/* Progress bar */
.progress-bar-container {
  max-width: 400px;
  margin: var(--space-xl) auto;
}

.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border-subtle);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-accent);
  transition: width 500ms ease;
  box-shadow: 0 0 10px var(--accent-pink-glow);
}

/* --------------------------------------------------------------------------
   Result Section
   -------------------------------------------------------------------------- */
.result-section {
  text-align: center;
  padding: 0;
  max-width: 600px;
  margin: 0 auto;
}

.result-section h2 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.result-image-container {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.result-image-container img,
.result-image-container video {
  max-width: 100%;
  max-height: 70vh;
  display: block;
}

/* Watermark overlay for free users */
.watermark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(-45deg,
      transparent,
      transparent 80px,
      rgba(255, 45, 120, 0.05) 80px,
      rgba(255, 45, 120, 0.05) 82px);
  pointer-events: none;
}

.watermark-text {
  color: rgba(255, 255, 255, 0.15);
  font-size: 1.5rem;
  font-weight: 800;
  transform: rotate(-30deg);
  text-transform: uppercase;
  letter-spacing: 5px;
}

.result-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Blur Preview (Teaser for insufficient balance)
   -------------------------------------------------------------------------- */
.blur-preview-section {
  text-align: center;
  padding: 0;
  max-width: 600px;
  margin: 0 auto;
}

.blur-preview-header {
  margin-bottom: var(--space-md);
}

.blur-preview-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(255, 45, 120, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-pink);
  letter-spacing: 0.5px;
}

.blur-preview-image-container {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(255, 45, 120, 0.15), var(--shadow-lg);
  margin-bottom: var(--space-md);
  border: 2px solid rgba(255, 45, 120, 0.3);
}

.blur-preview-image-container img {
  max-width: 100%;
  max-height: 55vh;
  display: block;
}

.blur-preview-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.blur-lock-icon {
  font-size: 3rem;
  margin-bottom: var(--space-xs);
  animation: lockPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

@keyframes lockPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

.blur-lock-text {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  padding: 4px 14px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.blur-preview-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.blur-preview-info {
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.08), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(255, 45, 120, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  width: 100%;
}

.blur-info-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.blur-info-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.blur-info-desc strong {
  color: var(--accent-pink);
}

.blur-info-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.blur-stat strong {
  color: var(--accent-pink);
}

.blur-stat-divider {
  color: var(--border-subtle);
}

.blur-unlock-btn {
  width: 100%;
  max-width: 320px;
  font-size: 1rem;
  font-weight: 800;
  padding: 14px 28px;
  background: var(--gradient-gold);
  color: #1a1a1a;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.25);
  transition: all var(--transition-base);
}

.blur-unlock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 193, 7, 0.4);
}

@media (max-width: 768px) {
  .blur-preview-image-container img {
    max-height: 45vh;
  }
  
  .blur-lock-icon {
    font-size: 2.5rem;
  }
  
  .blur-info-stats {
    flex-direction: column;
    gap: 4px;
  }
  
  .blur-stat-divider {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Payment Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 300ms ease;
}

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

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-header h2 {
  font-size: 1.3rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Package cards */
.package-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.package-card {
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.package-card:hover {
  border-color: var(--accent-pink);
  background: rgba(255, 45, 120, 0.05);
}

.package-card.popular {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.05);
}

.package-card.popular::before {
  content: '⭐ Most Popular';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-gold);
  color: #1a1a1a;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.package-info h4 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.package-info .bonus {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
}

.package-price {
  text-align: right;
}

.package-price .price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-pink);
}

.package-price .unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Payment Method Tabs */
.payment-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-md);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 4px;
}

.payment-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: calc(var(--radius-md) - 2px);
  transition: all var(--transition-base);
}

.payment-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.payment-tab.active {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 45, 120, 0.3);
}

.payment-tab-content {
  margin-top: var(--space-sm);
}

/* CryptoBot Payment Waiting Overlay */
.crypto-pay-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: slideUp 300ms ease;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.15), var(--shadow-lg);
}

.crypto-pay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 1rem;
}

.crypto-pay-body {
  position: relative;
  min-height: 360px;
  background: var(--bg-primary);
}

.crypto-pay-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.crypto-pay-loading {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: opacity 300ms ease;
}

.crypto-pay-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.crypto-pay-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  min-height: 360px;
}

.crypto-pay-waiting-icon {
  margin-bottom: var(--space-lg);
}

.crypto-pay-waiting-icon .processing-ring {
  width: 56px;
  height: 56px;
  border-width: 3px;
}

.crypto-pay-waiting h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.crypto-pay-waiting .text-muted {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

.crypto-pay-tips {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-width: 280px;
}

.crypto-pay-tip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.crypto-pay-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.crypto-pay-footer {
  padding: var(--space-sm) var(--space-lg);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .crypto-pay-container {
    max-width: 100%;
    margin: var(--space-md);
    border-radius: var(--radius-lg);
  }
}

/* FOMO timer */
.fomo-banner {
  background: rgba(255, 45, 120, 0.1);
  border: 1px solid rgba(255, 45, 120, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.fomo-banner .timer {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-pink);
  font-variant-numeric: tabular-nums;
}

.fomo-banner .fomo-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Login Section
   -------------------------------------------------------------------------- */
.login-section {
  text-align: center;
  padding: var(--space-xl) 0;
}

.login-section h2 {
  font-size: 1.8rem;
  margin-bottom: var(--space-md);
}

.login-section p {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.telegram-login-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

/* Login Tabs */
.login-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-lg);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 4px;
}

.login-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: calc(var(--radius-md) - 2px);
  transition: all var(--transition-base);
}

.login-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.login-tab.active {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 45, 120, 0.3);
}

/* Email Login Form */
.email-login-form {
  max-width: 340px;
  margin: 0 auto;
}

.email-input,
.otp-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  outline: none;
  margin-bottom: var(--space-md);
  box-sizing: border-box;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.email-input:focus,
.otp-input:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.15);
}

.email-input::placeholder,
.otp-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.otp-input {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 6px;
}

.otp-sent-msg {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.otp-sent-msg strong {
  color: var(--accent-pink);
}

.btn-block {
  display: block;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Custom Confirm Modal
   -------------------------------------------------------------------------- */
.confirm-modal-content {
  max-width: 380px;
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
}

.confirm-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.confirm-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.confirm-message {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.confirm-cost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  margin-bottom: var(--space-xl);
}

.confirm-cost-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.confirm-cost-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-pink);
}

.confirm-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.confirm-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* --------------------------------------------------------------------------
   History Section
   -------------------------------------------------------------------------- */
.history-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-xl);
}

.history-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
}

.history-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.history-item:hover {
  border-color: var(--accent-pink);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-pink);
}

.history-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.history-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 2px 6px;
  border-radius: var(--radius-sm, 6px);
}

.history-date {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.8);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  text-align: center;
}

/* --------------------------------------------------------------------------
   Toast Notifications
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 80px;
  right: var(--space-lg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  animation: slideIn 300ms ease, fadeOut 300ms ease 3s forwards;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(50%);
  }
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--error);
}

.toast.warning {
  border-left: 3px solid var(--warning);
}

/* --------------------------------------------------------------------------
   Video Gallery Grid
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg) 0;
}

.gallery-item {
  aspect-ratio: 9/16;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-card);
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-glow-pink);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.gallery-item .cost {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 45, 120, 0.9);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding-top: 70px;
    padding-bottom: var(--space-lg);
  }

  .hero-title {
    font-size: 1.6rem;
    margin-bottom: var(--space-md);
  }

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

  .hero-split {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }

  /* Video shows FIRST on mobile */
  .hero-media {
    order: -1;
  }

  .hero-text {
    text-align: center;
    order: 2;
  }

  .hero-text .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-text .hero-actions {
    justify-content: center;
  }

  .hero-text .live-counter {
    justify-content: center;
  }

  .preview-video-container {
    max-width: 280px;
    margin: 0 auto;
  }

  .preview-video {
    max-height: 35vh;
  }

  .hero-features {
    margin-bottom: var(--space-lg);
  }

  .hero-features li {
    font-size: 0.85rem;
    padding: 6px 0 6px 12px;
  }

  .hero-actions {
    margin-bottom: var(--space-md);
  }

  .action-grid {
    max-width: 100%;
  }

  .stats-bar {
    gap: var(--space-sm);
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .modal-content {
    margin: var(--space-md);
    padding: var(--space-lg);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-sm);
  }

  .app-header .container {
    padding: 0 var(--space-sm);
    gap: var(--space-sm);
  }

  .app-header {
    padding: var(--space-sm) 0;
  }

  .logo {
    font-size: 0.85rem;
    gap: 4px;
    min-width: 0;
    flex-shrink: 1;
  }

  .logo-text {
    display: none;
  }

  .logo::after {
    content: 'Mira AI';
    white-space: nowrap;
    font-size: 0.85rem;
  }

  .logo-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
  }

  .home-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    margin-right: var(--space-xs);
    flex-shrink: 0;
  }

  .header-right {
    gap: var(--space-xs);
    flex-shrink: 0;
  }

  .balance-badge {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  .premium-badge {
    padding: 3px 8px;
    font-size: 0.6rem;
  }

  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .swap-counter {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  /* Face preview constraints on mobile */
  .face-preview {
    max-width: 260px;
  }

  .face-preview img {
    max-height: 300px;
    object-fit: cover;
  }

  .workspace-left .face-preview img {
    max-width: 260px;
    max-height: 300px;
  }

  /* Action grid: 2 columns on mobile */
  .action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .action-card {
    padding: var(--space-sm) var(--space-xs);
  }

  .action-card .card-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
  }

  .action-card h3 {
    font-size: 0.75rem;
  }

  .action-card .cost-badge {
    font-size: 0.6rem;
    padding: 2px 8px;
    margin-top: 4px;
  }

  .panel-title {
    font-size: 0.95rem;
  }

  /* Upload zone compact on mobile */
  .upload-zone {
    padding: var(--space-xl) var(--space-md);
  }

  .upload-zone .upload-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
  }

  .upload-zone h3 {
    font-size: 1rem;
  }

  .upload-zone p {
    font-size: 0.8rem;
  }

  .paste-hint {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.4rem;
    margin-bottom: var(--space-sm);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  .hero-actions .btn-lg {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .btn-lg {
    width: 100%;
    max-width: 300px;
  }

  .preview-video-container {
    max-width: 240px;
  }

  .preview-video {
    max-height: 30vh;
  }

  .hero-media {
    animation: none;
  }

  .hero-features li {
    font-size: 0.8rem;
    padding: 4px 0 4px 10px;
  }

  .logo {
    font-size: 0.75rem;
  }

  .home-btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  /* Face preview even more constrained on small phones */
  .face-preview {
    max-width: 220px;
  }

  .face-preview img {
    max-height: 260px;
  }

  .workspace-left .face-preview img {
    max-width: 220px;
    max-height: 260px;
  }
}

/* --------------------------------------------------------------------------
   Section transitions (for SPA feel)
   -------------------------------------------------------------------------- */
.app-section {
  animation: sectionIn 400ms ease;
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-glass) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* --------------------------------------------------------------------------
   Help Floating Action Button
   -------------------------------------------------------------------------- */
.help-fab {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: 2px solid rgba(168, 85, 247, 0.5);
  border-radius: 50px;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  animation: helpPulse 2s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s;
}

.help-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(124, 58, 237, 0.6);
}

.help-fab-icon { font-size: 1.2rem; }

@keyframes helpPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(168, 85, 247, 0.7), 0 0 40px rgba(124, 58, 237, 0.2); }
}

/* --------------------------------------------------------------------------
   Help Modal
   -------------------------------------------------------------------------- */
.help-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.help-modal-overlay.hidden { display: none; }

.help-modal {
  background: linear-gradient(145deg, #1a1a2e, #16162a);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: helpSlideUp 0.3s ease-out;
}

.help-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

.help-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: #999;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.help-modal-close:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.help-modal-title {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.help-modal-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.help-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.help-step {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.help-step-num {
  min-width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}

.help-step strong {
  color: #e0e0e0;
  font-size: 0.95rem;
}

.help-step p {
  color: #888;
  font-size: 0.82rem;
  margin-top: 2px;
  line-height: 1.4;
}

.help-tips {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.help-tips h3 {
  font-size: 0.9rem;
  color: #a78bfa;
  margin-bottom: 0.6rem;
}

.help-tips ul {
  list-style: none;
  padding: 0;
}

.help-tips li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.8;
}

.help-tips li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4ade80;
  font-weight: 700;
}

.help-modal-gotit {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
}

/* Help Sections */
.help-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}

.help-section:last-of-type { border-bottom: none; }

.help-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(139, 92, 246, 0.2);
}

.help-feature {
  margin-bottom: 0.8rem;
}

.help-feature h4 {
  font-size: 0.9rem;
  color: #d4d4d4;
  margin-bottom: 0.5rem;
}

.help-vip-tag {
  font-size: 0.7rem;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.help-highlight {
  color: #fbbf24 !important;
  font-style: italic;
}

/* Pricing Grid */
.help-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.help-price-card {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  padding: 0.8rem 1rem;
}

.help-price-card h4 {
  font-size: 0.85rem;
  color: #d4d4d4;
  margin-bottom: 0.4rem;
}

.help-price-card ul {
  list-style: none;
  padding: 0;
}

.help-price-card li {
  font-size: 0.8rem;
  color: #aaa;
  line-height: 1.7;
}

.help-price-card li strong {
  color: #4ade80;
}

/* Mobile adjustments for help button */
@media (max-width: 768px) {
  .help-fab {
    bottom: 1rem;
    left: 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  .help-modal { padding: 1.5rem; max-width: 95vw; }
  .help-modal-body {
    grid-template-columns: 1fr;
  }
  .help-price-grid {
    grid-template-columns: 1fr;
  }
}