@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════ */
:root {
  --navy: #0a1628;
  --navy-light: #121f38;
  --navy-mid: #1a2d4d;
  --graphite: #2a3444;
  --graphite-light: #3d4a5c;
  --warm-white: #f5f1eb;
  --warm-white-soft: #ede8e0;
  --gold: #c9a84c;
  --gold-light: #d4b96a;
  --gold-dark: #a88a3a;
  --text-primary: #f5f1eb;
  --text-secondary: rgba(245, 241, 235, 0.7);
  --text-muted: rgba(245, 241, 235, 0.45);
  --glass-bg: rgba(16, 28, 50, 0.55);
  --glass-border: rgba(201, 168, 76, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: 0.5s 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-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════
   APP CONTAINER
   ═══════════════════════════════════════ */
#app {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════
   HERO BACKGROUND
   ═══════════════════════════════════════ */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: brightness(0.35) saturate(0.8);
  transition: transform 8s ease;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.5) 0%,
    rgba(10, 22, 40, 0.75) 40%,
    rgba(10, 22, 40, 0.92) 100%
  );
}

/* ═══════════════════════════════════════
   HEADER / LOGO
   ═══════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.logo-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

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

/* ═══════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════ */
.main-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 20px 40px;
  min-height: 100dvh;
}

/* ═══════════════════════════════════════
   SCREEN SYSTEM (quiz steps)
   ═══════════════════════════════════════ */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.screen.slide-in {
  animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.screen.slide-out {
  animation: slideOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes slideOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-20px) scale(0.97); }
}

/* ═══════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════ */
.progress-bar {
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition);
}

.progress-bar.visible { opacity: 1; }

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  border-radius: 0 3px 3px 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

.step-indicator {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════
   HERO SCREEN (#screen-hero)
   ═══════════════════════════════════════ */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s 0.2s both;
}

.hero-title {
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  margin-bottom: 16px;
  animation: fadeInUp 0.6s 0.35s both;
  background: linear-gradient(135deg, var(--warm-white) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
  max-width: 360px;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s 0.5s both;
}

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

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  padding: 18px 32px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: fadeInUp 0.6s 0.65s both;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.15) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(201, 168, 76, 0.45);
}

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

.btn-primary .arrow {
  font-size: 1.2rem;
  transition: transform var(--transition);
}

.btn-primary:hover .arrow { transform: translateX(4px); }

/* ═══════════════════════════════════════
   TRUST BADGES
   ═══════════════════════════════════════ */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  animation: fadeInUp 0.6s 0.8s both;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.trust-item .check {
  color: var(--gold);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════
   GLASS CARD (quiz questions)
   ═══════════════════════════════════════ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--glass-shadow);
  width: 100%;
}

/* ═══════════════════════════════════════
   QUESTION TITLE
   ═══════════════════════════════════════ */
.question-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  margin-bottom: 28px;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════
   OPTION BUTTONS
   ═══════════════════════════════════════ */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.option-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  overflow: hidden;
}

.option-btn .option-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.1);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all var(--transition);
}

.option-btn:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.3);
  transform: translateY(-1px);
}

.option-btn:active {
  transform: scale(0.98);
}

.option-btn.selected {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 4px 16px rgba(201, 168, 76, 0.15);
}

.option-btn.selected .option-icon {
  background: var(--gold);
  color: var(--navy);
}

/* Two-column grid for question 4 */
.options-grid.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.options-grid.grid-2col .option-btn {
  flex-direction: column;
  text-align: center;
  padding: 16px 12px;
  gap: 8px;
}

/* ═══════════════════════════════════════
   RESULT SCREEN
   ═══════════════════════════════════════ */
.result-emoji {
  font-size: 2.5rem;
  margin-bottom: 16px;
  animation: popIn 0.5s var(--bounce);
}

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

.result-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.result-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
}

.result-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.result-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.result-list-item .icon {
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ═══════════════════════════════════════
   FORM
   ═══════════════════════════════════════ */
.form-title {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 16px;
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-privacy {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

.btn-submit {
  width: 100%;
  padding: 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
  margin-top: 8px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(201, 168, 76, 0.45);
}

.btn-submit:active { transform: scale(0.98); }

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

/* ═══════════════════════════════════════
   THANK YOU SCREEN
   ═══════════════════════════════════════ */
.thanks-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: popIn 0.6s var(--bounce);
}

.thanks-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.thanks-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 340px;
}

.messenger-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.btn-messenger {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-telegram {
  background: linear-gradient(135deg, #229ED9, #1E8BC3);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #1DAA57);
}

.btn-messenger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════
   BACK BUTTON
   ═══════════════════════════════════════ */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
  margin-bottom: 16px;
  align-self: flex-start;
}

.btn-back:hover { color: var(--text-secondary); }

/* ═══════════════════════════════════════
   FLOATING PARTICLES
   ═══════════════════════════════════════ */
.particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: float linear infinite;
}

@keyframes float {
  0%   { opacity: 0; transform: translateY(100vh) scale(0); }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ═══════════════════════════════════════
   PULSE RING ANIMATION
   ═══════════════════════════════════════ */
.pulse-ring {
  position: relative;
}

.pulse-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--gold);
  opacity: 0;
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

/* ═══════════════════════════════════════
   DESKTOP ADJUSTMENTS
   ═══════════════════════════════════════ */
@media (min-width: 768px) {
  .main-content {
    padding: 100px 40px 60px;
  }

  .glass-card {
    padding: 40px 36px;
  }

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

  .options-grid.grid-2col {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ═══════════════════════════════════════
   SAFE AREA (iPhone notch)
   ═══════════════════════════════════════ */
@supports (padding-top: env(safe-area-inset-top)) {
  .header {
    padding-top: calc(16px + env(safe-area-inset-top));
  }
  .progress-bar {
    top: calc(65px + env(safe-area-inset-top));
  }
}

/* ═══════════════════════════════════════
   LOADING SHIMMER
   ═══════════════════════════════════════ */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Divider line */
.divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 20px auto;
  border-radius: 2px;
}
