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

/* =============================================
   STELLAR PLUS — Portal CSS v6
   Premium captive portal — no JS libs needed
   ============================================= */

:root {
  --gold:          #f5a623;
  --gold-light:    #f7c948;
  --gold-dark:     #d4890a;
  --gold-faint:    rgba(245,166,35,0.08);
  --bg:            #09090e;
  --surface:       rgba(255,255,255,0.038);
  --surface2:      rgba(255,255,255,0.07);
  --surface3:      rgba(255,255,255,0.10);
  --border:        rgba(255,255,255,0.075);
  --border-gold:   rgba(245,166,35,0.40);
  --text:          #eeeef5;
  --text-muted:    rgba(238,238,245,0.52);
  --text-faint:    rgba(238,238,245,0.28);
  --success:       #34d399;
  --error:         #f87171;
  --radius:        18px;
  --radius-sm:     11px;
  --spring:        cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth:        cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   BACKGROUND LAYERS
   ============================================= */

/* Grain overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Animated aurora */
.portal-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% -15%, rgba(245,166,35,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 55% 45% at 10% 85%, rgba(120,60,220,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 95% 55%, rgba(245,166,35,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 30% 30% at 50% 105%, rgba(100,40,180,0.06) 0%, transparent 70%);
  animation: auroraFloat 16s ease-in-out infinite alternate;
}

@keyframes auroraFloat {
  0%   { transform: scale(1) translateY(0px);    opacity: 1;    }
  50%  { transform: scale(1.04) translateY(-8px); opacity: 0.88; }
  100% { transform: scale(0.97) translateY(6px);  opacity: 1;    }
}

/* Star field */
.stars-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(90,50,180,0.10) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(40,20,100,0.08) 0%, transparent 60%),
    linear-gradient(180deg, #09090e 0%, #0d0d1c 50%, #09090e 100%);
}
.stars-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 20%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 10%, rgba(255,255,255,0.40) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 35%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 15%, rgba(255,255,255,0.28) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 62%, rgba(255,255,255,0.42) 0%, transparent 100%),
    radial-gradient(1px 1px at 62% 80%, rgba(255,255,255,0.30) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 85%, rgba(255,255,255,0.46) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.36) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 45%, rgba(245,166,35,0.42) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 25% 75%, rgba(245,166,35,0.30) 0%, transparent 100%);
  animation: twinkle 9s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0%   { opacity: 0.55; }
  100% { opacity: 1;    }
}

/* =============================================
   LAYOUT
   ============================================= */

.container {
  max-width: 440px;
  margin: 0 auto;
  padding: 24px 18px 44px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* =============================================
   SCREENS
   ============================================= */

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  flex: 1;
  animation: fadeSlideIn 0.4s var(--smooth) both;
}
.screen.active { display: flex; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* =============================================
   PORTAL HEADER (main screen)
   ============================================= */

.portal-header {
  text-align: center;
  margin-bottom: 34px;
  padding-top: 18px;
  position: relative;
}

/* Radial glow behind the whole header */
.portal-header::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 180px;
  background: radial-gradient(ellipse at 50% 10%, rgba(245,166,35,0.13) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.portal-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 10px;
}

/* Glowing star container — premium rotating ring */
.portal-logo .logo-star {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  font-size: 22px;
  -webkit-text-fill-color: var(--gold);
  color: var(--gold);
  flex-shrink: 0;
  isolation: isolate;
  animation: starFloat 3.5s ease-in-out infinite;
}

/* Spinning conic gradient ring */
.portal-logo .logo-star::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 15px;
  background: conic-gradient(from 0deg,
    rgba(247,201,72,1)    0%,
    rgba(245,166,35,0.55) 30%,
    rgba(245,166,35,0.05) 50%,
    rgba(245,166,35,0.55) 70%,
    rgba(247,201,72,1)    100%
  );
  animation: ringRotate 2.2s linear infinite;
  z-index: -1;
}

/* Inner background fill so only the ring shows */
.portal-logo .logo-star::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(245,166,35,0.14), rgba(245,166,35,0.05));
  z-index: -1;
}

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

@keyframes starFloat {
  0%, 100% {
    transform: translateY(0px);
    filter: drop-shadow(0 0 8px  rgba(245,166,35,0.45));
  }
  50% {
    transform: translateY(-5px);
    filter: drop-shadow(0 4px 18px rgba(245,166,35,0.70));
  }
}

.portal-tagline {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
  display: block;
}

.portal-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.20);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  letter-spacing: 0.3px;
}

.online-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulseGreen 2.2s ease-in-out infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1;    transform: scale(1);    }
  50%       { opacity: 0.5;  transform: scale(1.5);  }
}

/* =============================================
   LOGO SMALL (other screens)
   ============================================= */

.logo-small {
  text-align: center;
  margin-bottom: 18px;
  padding-top: 28px;
}

.logo-small .logo-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-small .logo-mark::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold), var(--gold-light), var(--gold), transparent 70%, var(--gold));
  animation: logoRotate 5s linear infinite;
  opacity: 0.35;
}

.logo-small .logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bg);
}

.logo-small .logo-star {
  position: relative;
  z-index: 2;
  font-size: 22px;
  color: var(--gold);
  filter: drop-shadow(0 0 14px rgba(245,166,35,0.50));
}

.logo-small h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2.5px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 55%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Social proof counter */
.social-proof {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 14px;
  background: rgba(245,166,35,0.07);
  border: 1px solid rgba(245,166,35,0.16);
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  animation: fadeSlideIn 0.5s var(--smooth) both;
}
.social-proof #proof-count {
  color: var(--gold);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
}
.proof-fire { font-size: 13px; }

/* =============================================
   SECTION TITLE
   ============================================= */

.plans-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-faint);
  margin-bottom: 12px;
  width: 100%;
}

/* =============================================
   PLAN CARDS
   ============================================= */

.plans {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition:
    border-color 0.28s var(--smooth),
    box-shadow   0.28s var(--smooth),
    background   0.28s var(--smooth),
    transform    0.35s var(--spring);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-user-select: none;
  user-select: none;
}

/* Hover lift */
.plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245,166,35,0.25);
  background: rgba(255,255,255,0.055);
}

/* Tap feedback */
.plan-card:active {
  transform: scale(0.98) translateY(0);
  transition-duration: 0.12s;
}

/* ── Selected state ─────────────────────────── */
.plan-card.selected {
  border-color: var(--gold);
  background: rgba(245,166,35,0.07);
  transform: translateY(-2px) scale(1.015);
  box-shadow:
    0 0 0 1px rgba(245,166,35,0.50),
    0 8px 32px  rgba(245,166,35,0.18),
    0 2px 8px   rgba(0,0,0,0.30);
}

/* ── Best-value top accent line ─────────────── */
.plan-card.best-value {
  border-top-color: rgba(245,166,35,0.50);
}
.plan-card.best-value::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--gold) 40%, var(--gold-light) 60%, transparent 95%);
  opacity: 0.95;
}

/* ── Best-value badge ───────────────────────── */
.plan-card.best-value::after {
  content: attr(data-badge);
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: #000;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 5px 13px;
  border-radius: 0 var(--radius) 0 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── "Le plus choisi" badge (plan 1d) ──────── */
.plan-card.most-popular::before {
  content: attr(data-popular);
  position: absolute;
  top: 0; left: 0;
  background: linear-gradient(135deg, rgba(52,211,153,0.90), rgba(16,185,129,0.90));
  color: #000;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 5px 13px;
  border-radius: var(--radius) 0 10px 0;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Shimmer sweep (.plan-shine div) ────────── */
.plan-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  transition: left 0.65s var(--smooth);
  pointer-events: none;
}
.plan-card:hover .plan-shine { left: 150%; }

/* ── Plan icon circle ───────────────────────── */
.plan-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(245,166,35,0.09);
  border: 1px solid rgba(245,166,35,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  transition: background 0.25s, border-color 0.25s, transform 0.35s var(--spring);
}

.plan-card.selected .plan-icon {
  background: rgba(245,166,35,0.15);
  border-color: rgba(245,166,35,0.40);
  transform: scale(1.06);
}

/* ── Plan text ──────────────────────────────── */
.plan-info {
  flex: 1;
  min-width: 0;
}

.plan-info .plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.1px;
  line-height: 1.2;
  transition: color 0.2s;
}

.plan-card.selected .plan-info .plan-name {
  color: #fff;
}

.plan-info .plan-duration {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 400;
  line-height: 1.3;
}

.plan-info .plan-value {
  font-size: 10.5px;
  color: var(--gold);
  margin-top: 5px;
  font-weight: 600;
  opacity: 0.85;
  line-height: 1.3;
}

/* ── Price (right side) ─────────────────────── */
.plan-right {
  text-align: right;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.plan-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.5px;
}

.plan-card.best-value .plan-price {
  font-size: 34px;
}

.plan-currency {
  font-size: 9.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 3px;
  font-weight: 600;
}

/* ── Checkmark (pops in on selection) ──────── */
.plan-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform: scale(0) rotate(-45deg);
  opacity: 0;
  transition:
    transform 0.4s var(--spring),
    opacity   0.25s ease;
  margin-left: 8px;
}

.plan-card.selected .plan-check {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

.plan-check svg {
  width: 13px;
  height: 13px;
  color: #000;
}

/* ── Skeleton loaders ───────────────────────── */
.skeleton-plan {
  height: 82px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  animation: skeletonPulse 1.6s ease-in-out infinite;
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 0.80; }
}

/* =============================================
   PHONE INPUT
   ============================================= */

.phone-input {
  width: 100%;
  margin-bottom: 20px;
}

.phone-input label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.phone-field {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.phone-field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(245,166,35,0.40), 0 4px 24px rgba(245,166,35,0.10);
}

.country-select {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 17px 6px 17px 16px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  border-right: 1.5px solid var(--border);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 22px;
  min-width: 98px;
  max-width: 118px;
}

.country-select option {
  background: #141420;
  color: #fff;
  font-size: 14px;
}

.phone-field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  padding: 17px 16px;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 2px;
}

.phone-field input::placeholder {
  color: var(--text-faint);
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* =============================================
   PRIMARY BUTTON
   ============================================= */

.btn-primary {
  width: 100%;
  padding: 19px;
  border: none;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  background-size: 200% auto;
  color: #09090e;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  font-family: 'Space Grotesk', sans-serif;
  transition:
    background-position 0.5s ease,
    transform           0.2s var(--spring),
    box-shadow          0.3s ease,
    opacity             0.2s ease;
  box-shadow: 0 4px 22px rgba(245,166,35,0.00);
}

/* Pulse glow when active */
.btn-primary:not(:disabled) {
  box-shadow: 0 4px 22px rgba(245,166,35,0.30);
  animation: btnPulseGlow 2.8s ease-in-out infinite;
}

@keyframes btnPulseGlow {
  0%, 100% { box-shadow: 0 4px 22px rgba(245,166,35,0.28); }
  50%       { box-shadow: 0 6px 36px rgba(245,166,35,0.52), 0 0 0 4px rgba(245,166,35,0.08); }
}

/* Shimmer sweep */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 70%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transition: left 0.55s ease;
  pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
  background-position: right center;
  transform: translateY(-1px);
}
.btn-primary:hover:not(:disabled)::after { left: 130%; }

.btn-primary:active:not(:disabled) {
  transform: scale(0.97) translateY(0);
  animation: none;
  box-shadow: 0 2px 12px rgba(245,166,35,0.22);
  transition-duration: 0.1s;
}

.btn-primary:disabled {
  opacity: 0.20;
  cursor: not-allowed;
  box-shadow: none;
  animation: none;
}

/* =============================================
   ACCOUNT BUTTON
   ============================================= */

.btn-account {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  margin-top: 10px;
  transition:
    background     0.2s,
    border-color   0.2s,
    color          0.2s,
    transform      0.3s var(--spring);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-account:hover {
  background: var(--surface2);
  border-color: rgba(255,255,255,0.14);
  color: var(--text);
  transform: translateY(-1px);
}
.btn-account:active { transform: scale(0.98); }

/* =============================================
   FOOTER
   ============================================= */

.footer-text {
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  margin-top: 20px;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.footer-links a {
  font-size: 11px;
  color: var(--text-faint);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-muted); }

.footer-links a svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.footer-divider {
  width: 3px;
  height: 3px;
  background: var(--text-faint);
  border-radius: 50%;
  opacity: 0.4;
}

/* =============================================
   SECURITY FOOTER
   ============================================= */

.security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}
.security-footer svg {
  width: 12px;
  height: 12px;
  stroke: var(--text-faint);
  fill: none;
  stroke-width: 2;
}

/* =============================================
   LANGUAGE SWITCHER
   ============================================= */

.lang-switcher {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin-top: 16px;
  background: rgba(255,255,255,0.035);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  width: fit-content;
  align-self: center;
}

.lang-btn {
  padding: 5px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1.5px;
  font-family: 'Space Grotesk', sans-serif;
  transition: background 0.2s var(--smooth), color 0.2s;
}
.lang-btn.active {
  background: rgba(245,166,35,0.15);
  color: var(--gold);
}

/* =============================================
   WAITING SCREEN
   ============================================= */

.waiting-animation {
  margin: 38px 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Outer glow ring */
.waiting-animation::before {
  content: '';
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,166,35,0.10) 0%, transparent 70%);
  animation: waitGlow 2s ease-in-out infinite alternate;
}

@keyframes waitGlow {
  from { transform: scale(0.9); opacity: 0.6; }
  to   { transform: scale(1.1); opacity: 1;   }
}

.spinner-premium {
  width: 78px;
  height: 78px;
  position: relative;
}

.spinner-premium .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.spinner-premium .ring-1 {
  border-top-color: var(--gold);
  animation: spin 1.1s linear infinite;
}
.spinner-premium .ring-2 {
  inset: 7px;
  border-right-color: var(--gold-light);
  animation: spin 1.7s linear infinite reverse;
}
.spinner-premium .ring-3 {
  inset: 14px;
  border-bottom-color: var(--gold-dark);
  animation: spin 2.5s linear infinite;
}
.spinner-premium .dot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 9px; height: 9px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--gold), 0 0 40px rgba(245,166,35,0.30);
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: translate(-50%,-50%) scale(0.8); }
  50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.3); }
}

.screen h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.waiting-text {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.8;
  margin: 10px 0 28px;
  white-space: pre-line;
}

/* =============================================
   INFO CARD
   ============================================= */

.info-card {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  font-size: 14px;
}
.info-row:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.045);
}
.info-row .label {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12.5px;
}
.info-row .value {
  font-weight: 700;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
}

/* =============================================
   SUCCESS SCREEN
   ============================================= */

.success-badge {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,211,153,0.16) 0%, rgba(52,211,153,0.03) 100%);
  border: 2px solid rgba(52,211,153,0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px 0 16px;
  position: relative;
  animation: successPop 0.6s var(--spring) both;
}

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

/* Outer glow ring */
.success-badge::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,211,153,0.10), transparent 70%);
  animation: successGlow 2.5s ease-in-out infinite alternate;
}

/* Second outer ring */
.success-badge::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(52,211,153,0.16);
  animation: successRing 2.5s ease-in-out infinite alternate;
}

@keyframes successGlow {
  from { transform: scale(0.9); opacity: 0.7; }
  to   { transform: scale(1.1); opacity: 1;   }
}
@keyframes successRing {
  from { transform: scale(0.95); opacity: 0.4; }
  to   { transform: scale(1.05); opacity: 1;   }
}

.success-badge svg {
  width: 40px;
  height: 40px;
  stroke: var(--success);
  stroke-width: 2.5;
  fill: none;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkDraw 0.55s ease 0.3s both;
}

@keyframes checkDraw {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0;   }
}

/* Sparkle particles */
.success-badge ~ * {
  position: relative;
}

/* Floating sparkles around success badge via body::after trick — use separate spans */

.connected-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.20);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  margin-top: 8px;
  margin-bottom: 22px;
  letter-spacing: 0.5px;
  font-family: 'Space Grotesk', sans-serif;
  animation: fadeSlideIn 0.5s var(--smooth) 0.5s both;
}
.connected-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulseGreen 2s ease infinite;
}

/* =============================================
   COUNTDOWN RING
   ============================================= */

.countdown-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 22px;
}
.countdown-svg { display: block; }

.countdown-track {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 4.5;
}

.countdown-progress {
  fill: none;
  stroke: url(#gold-grad);
  stroke-width: 4.5;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 4px rgba(245,166,35,0.40));
}

.countdown-text {
  position: absolute;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
  pointer-events: none;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* =============================================
   ERROR SCREEN
   ============================================= */

.error-badge {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248,113,113,0.14) 0%, rgba(248,113,113,0.03) 100%);
  border: 2px solid rgba(248,113,113,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px 0 16px;
  position: relative;
  animation: successPop 0.5s var(--spring) both;
}
.error-badge::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248,113,113,0.08), transparent 70%);
}
.error-badge span {
  font-size: 38px;
  color: var(--error);
  filter: drop-shadow(0 0 8px rgba(248,113,113,0.40));
}
.error-text {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin: 6px 0 28px;
  line-height: 1.7;
}

/* =============================================
   DIVIDER
   ============================================= */

.divider {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 18px auto;
  opacity: 0.30;
}
