/* ==========================================================================
   HACKER HOUSE GOA 2026 (#FrameInGoa) — DESIGN SYSTEM & MAIN STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=JetBrains+Mono:wght@400;500;700;800&family=Outfit:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,700;0,900;1,700;1,900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Default Theme: Emerald Sovereign */
  --bg-dark: #021d12;
  --bg-darker: #01140c;
  --bg-card: rgba(3, 50, 32, 0.75);
  --bg-card-solid: #033420;
  --gold-primary: #f5c842;
  --gold-secondary: #ffd700;
  --gold-light: #fff5b8;
  --gold-dark: #b48512;
  --gold-glow: rgba(245, 200, 66, 0.35);
  --accent-pink: #ff4e79;
  --accent-green: #059669;
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.45);
  --border-gold: rgba(245, 200, 66, 0.3);
  --border-gold-strong: rgba(245, 200, 66, 0.75);
  --card-radius: 24px;
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Theme 2: Sunset Horizon */
[data-theme="sunset"] {
  --bg-dark: #160824;
  --bg-darker: #0d0317;
  --bg-card: rgba(46, 15, 60, 0.75);
  --bg-card-solid: #38133b;
  --gold-primary: #ff8a5c;
  --gold-secondary: #ffd166;
  --gold-light: #ffe5d9;
  --gold-dark: #c74424;
  --gold-glow: rgba(255, 138, 92, 0.4);
  --accent-pink: #f43f5e;
  --accent-green: #fb7185;
  --border-gold: rgba(255, 138, 92, 0.35);
  --border-gold-strong: rgba(255, 138, 92, 0.85);
}

/* Theme 3: Ocean Cyber */
[data-theme="ocean"] {
  --bg-dark: #02182b;
  --bg-darker: #010e1a;
  --bg-card: rgba(5, 47, 76, 0.75);
  --bg-card-solid: #052f4c;
  --gold-primary: #00f2fe;
  --gold-secondary: #4facfe;
  --gold-light: #e0f2fe;
  --gold-dark: #0284c7;
  --gold-glow: rgba(0, 242, 254, 0.4);
  --accent-pink: #38bdf8;
  --accent-green: #06b6d4;
  --border-gold: rgba(0, 242, 254, 0.35);
  --border-gold-strong: rgba(0, 242, 254, 0.85);
}

/* Theme 4: Midnight Cyber */
[data-theme="cyber"] {
  --bg-dark: #080c16;
  --bg-darker: #03050a;
  --bg-card: rgba(22, 18, 45, 0.75);
  --bg-card-solid: #16122d;
  --gold-primary: #10b981;
  --gold-secondary: #06b6d4;
  --gold-light: #d1fae5;
  --gold-dark: #8b5cf6;
  --gold-glow: rgba(16, 185, 129, 0.4);
  --accent-pink: #a855f7;
  --accent-green: #10b981;
  --border-gold: rgba(16, 185, 129, 0.35);
  --border-gold-strong: rgba(16, 185, 129, 0.85);
}

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

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  selection-background-color: var(--gold-primary);
  selection-color: var(--bg-dark);
  transition: background-color 0.5s ease;
}

::selection {
  background: var(--gold-primary);
  color: var(--bg-dark);
}

/* Typography Classes */
.font-serif {
  font-family: 'Playfair Display', 'Cinzel', serif;
}

.font-sans {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Ambient Particles Canvas */
#particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Tropical Background Backdrops */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--bg-card-solid) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
  opacity: 0.95;
}

.bg-tropical-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(80px);
  opacity: 0.6;
}

/* App Header */
.app-header {
  position: relative;
  z-index: 20;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo-frame {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #01140c;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--gold-glow);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-frame svg {
  width: 32px;
  height: 32px;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--gold-primary);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* Header Controls & Theme Picker */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  padding: 0.3rem 0.45rem;
  border-radius: 9999px;
  border: 1px solid var(--border-gold);
}

.theme-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.theme-btn.active {
  border-color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.theme-btn[data-theme-choice="emerald"] { background: linear-gradient(135deg, #059669, #f5c842); }
.theme-btn[data-theme-choice="sunset"] { background: linear-gradient(135deg, #f43f5e, #ff8a5c); }
.theme-btn[data-theme-choice="ocean"] { background: linear-gradient(135deg, #0284c7, #00f2fe); }
.theme-btn[data-theme-choice="cyber"] { background: linear-gradient(135deg, #8b5cf6, #10b981); }

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background: rgba(245, 200, 66, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backdrop-filter: blur(8px);
}

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

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

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  display: inline-block;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  color: #fffdf7;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-primary);
  text-shadow: 0 0 30px var(--gold-glow);
}

.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 1.8rem;
  line-height: 1.6;
}

.hero-description strong {
  color: var(--gold-primary);
}

/* Mode Switcher Tabs */
.mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-gold);
  padding: 0.4rem;
  border-radius: 9999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  margin-bottom: 2.5rem;
}

.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition);
}

.mode-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
  background: var(--gold-primary);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--gold-glow);
  font-weight: 800;
}

/* ==========================================================================
   FRAMES CAROUSEL SELECTOR (Matching Reference UI)
   ========================================================================== */
.frames-carousel-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 15;
}

.frames-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.frames-carousel-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.frames-carousel-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 1.15rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

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

.frames-carousel-track::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 9999px;
}

.frames-carousel-track::-webkit-scrollbar-thumb {
  background: var(--border-gold-strong);
  border-radius: 9999px;
}

.frame-card-item {
  background: #183726;
  border: 1.5px solid rgba(245, 200, 66, 0.25);
  border-radius: 20px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  user-select: none;
}

.frame-card-item:hover {
  border-color: var(--gold-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.frame-card-item.active {
  background: #3e5631;
  border: 2.5px solid #a3e635;
  box-shadow: 0 0 25px rgba(163, 230, 53, 0.35);
  transform: translateY(-4px);
}

.frame-check-badge {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #bef264;
  color: #021d12;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.frame-card-item.active .frame-check-badge {
  display: flex;
}

.frame-thumb-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #010d08;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(245, 200, 66, 0.2);
}

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

.frame-name-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--gold-primary);
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.frame-tag-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: rgba(245, 200, 66, 0.75);
  letter-spacing: 0.05em;
}

/* Main Workspace Grid */
.generator-grid {
  position: relative;
  z-index: 15;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .generator-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Glassmorphic Control Panel */
.controls-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold);
  border-radius: var(--card-radius);
  padding: 1.85rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 1rem;
}

.panel-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-resolution-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--gold-primary);
  opacity: 0.8;
  pointer-events: none;
}

.text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.text-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px var(--gold-glow);
  background: rgba(0, 0, 0, 0.6);
}

.text-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

/* AI Generate Button */
.btn-ai-sparkle {
  background: none;
  border: none;
  color: var(--gold-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-ai-sparkle:hover {
  color: #ffffff;
  text-shadow: 0 0 8px var(--gold-primary);
  transform: translateY(-1px);
}

/* Photo Upload / Camera Buttons */
.photo-actions-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-action-photo {
  flex: 1;
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gold-primary);
  color: var(--bg-dark);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px var(--gold-glow);
}

.btn-action-photo:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--gold-glow);
}

.btn-secondary-photo {
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  border: 1px solid var(--border-gold);
  box-shadow: none;
}

.btn-secondary-photo:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

/* Filter Preset Buttons */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.filter-chip {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 0.45rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.filter-chip:hover, .filter-chip.active {
  background: var(--gold-primary);
  color: var(--bg-dark);
  border-color: var(--gold-primary);
  font-weight: 800;
}

/* Sliders */
.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-slider {
  flex: 1;
  accent-color: var(--gold-primary);
  cursor: pointer;
}

.slider-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--gold-primary);
  min-width: 42px;
  text-align: right;
}

/* Download & Share Actions */
.main-cta-row {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-gold);
}

.btn-download-main {
  flex: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--gold-primary);
  color: var(--bg-dark);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 30px var(--gold-glow);
}

.btn-download-main:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px var(--gold-glow);
}

.btn-share-main {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #000000;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition);
}

.btn-share-main:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-2px);
}

/* Preset Avatars Row */
.preset-avatars-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.avatar-preset-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--border-gold);
  background: #000000;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-preset-btn:hover, .avatar-preset-btn.active {
  border-color: var(--gold-primary);
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--gold-glow);
}

.avatar-preset-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card Preview Container */
.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 1.5rem;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 22;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  border: 2px solid var(--border-gold-strong);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: aspect-ratio 0.3s ease;
}

.canvas-wrapper.is-square {
  aspect-ratio: 1 / 1;
  max-width: 500px;
}

#badge-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 3D Hologram Glare Overlay */
.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: color-dodge;
  border-radius: var(--card-radius);
  z-index: 5;
}

/* Interactive Pan/Zoom Guide (Positioned below canvas, zero overlap) */
.canvas-interaction-guide {
  position: static;
  margin-top: 0.85rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-gold);
  border-radius: 9999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.74rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Floating Tropical Stickers */
.floating-sticker {
  position: absolute;
  z-index: 12;
  cursor: pointer;
  transition: transform 0.2s ease-out;
  user-select: none;
}

.floating-sticker svg {
  display: block;
  filter: drop-shadow(4px 8px 12px rgba(0, 0, 0, 0.45));
}

.sticker-popped {
  animation: pop-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop-bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.3) rotate(8deg); }
  100% { transform: scale(1); }
}

/* Sticker Coordinates */
.sticker-sun {
  top: 6%;
  right: 5%;
  width: 95px;
  height: 95px;
}

.sticker-stamp {
  top: 18%;
  left: 3%;
  width: 105px;
  height: 105px;
}

.sticker-coconut {
  top: 48%;
  right: 3%;
  width: 100px;
  height: 100px;
}

.sticker-signpost {
  bottom: 12%;
  left: 4%;
  width: 120px;
  height: 120px;
}

.sticker-scooter {
  bottom: 8%;
  right: 5%;
  width: 130px;
  height: 130px;
}

@media (max-width: 1200px) {
  .sticker-signpost, .sticker-scooter {
    display: none;
  }
}

@media (max-width: 768px) {
  .sticker-stamp, .sticker-coconut {
    display: none;
  }
  .sticker-sun {
    width: 65px;
    height: 65px;
    top: 3%;
    right: 3%;
  }
  .frames-carousel-track {
    grid-template-columns: repeat(6, 140px);
  }
}

/* App Footer */
.app-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border-gold);
  background: var(--bg-darker);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.footer-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-sub a {
  color: var(--gold-primary);
  text-decoration: underline;
  font-weight: 700;
}

.footer-disclaimer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Modals & Popups */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card-solid);
  border: 2px solid var(--border-gold);
  border-radius: var(--card-radius);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-gold);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--accent-pink);
  color: #ffffff;
}

/* Webcam Container */
.webcam-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000000;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border-gold);
  margin: 1.2rem 0;
}

#webcam-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#camera-countdown {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 900;
  color: var(--gold-primary);
  font-family: 'Outfit', sans-serif;
  text-shadow: 0 0 30px var(--gold-glow);
}

#camera-flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
}

#camera-flash.flashing {
  opacity: 1;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-card-solid);
  border: 1px solid var(--gold-primary);
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1), toast-out 0.3s 2.7s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

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

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