/* Orbitron */
@font-face { font-family: 'Orbitron'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/orbitron-400.ttf') format('truetype'); }
@font-face { font-family: 'Orbitron'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/orbitron-600.ttf') format('truetype'); }
@font-face { font-family: 'Orbitron'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/orbitron-700.ttf') format('truetype'); }
@font-face { font-family: 'Orbitron'; font-weight: 900; font-style: normal; font-display: swap; src: url('../fonts/orbitron-900.ttf') format('truetype'); }

/* Inter */
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/inter-400.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/inter-500.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/inter-600.ttf') format('truetype'); }

:root {
  --bg-primary: #0F172A;
  --bg-deep: #080e1b;
  --green-primary: #4ADE80;
  --green-secondary: #86EFAC;
  --green-accent: #10B981;
  --green-dark: #166534;
  --green-darker: #14532D;
  --text-primary: #D1D5DB;
  --text-dim: #9CA3AF;
  --border-light: rgba(74,222,128,0.1);
  --glow: 0 0 30px rgba(74,222,128,0.15);
}

* { margin:0; padding:0; box-sizing:border-box; }

/* Skip link (a11y) */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-primary);
  color: var(--bg-primary);
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 0 0 4px 4px;
  z-index: 100;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: top 0.2s, opacity 0.2s;
}
.skip-link:focus { top: 0; opacity: 1; pointer-events: auto; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  padding: 24px 0;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(74,222,128,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

body::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.title-area {
  text-align: center;
  animation: fadeInDown 0.8s ease-out;
}

.phantom-logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 6px;
  color: var(--green-primary);
  text-shadow: 0 0 40px rgba(74,222,128,0.3);
  margin-bottom: 6px;
}

.phantom-logo span { color: var(--green-secondary); opacity: 0.6; }

.subtitle {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 12px;
  animation: fadeInDown 0.8s ease-out 0.15s both;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(74,222,128,0.15);
  background: rgba(16,185,129,0.03);
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.08);
  color: var(--green-accent);
}

.lang-btn.active {
  border-color: rgba(16,185,129,0.6);
  background: rgba(16,185,129,0.15);
  color: var(--green-accent);
  box-shadow: 0 0 15px rgba(16,185,129,0.1);
}

.lang-flag {
  display: inline-flex;
  align-items: center;
}
.lang-flag svg {
  width: 24px;
  height: 16px;
}

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.5s ease;
  pointer-events: none;
  height: 32px;
}
.step-indicator.visible { opacity: 1; transform: translateY(0); }

.step-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--text-dim);
  background: transparent;
  transition: all 0.4s ease;
  position: relative;
}
.step-dot.active { border-color: var(--green-primary); background: var(--green-primary); box-shadow: 0 0 12px rgba(74,222,128,0.5); }
.step-dot.done { border-color: var(--green-accent); background: var(--green-accent); }
.step-dot.done::after { content: '\2713'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 7px; color: var(--bg-primary); font-weight: 700; }

.step-line { width: 50px; height: 2px; background: var(--text-dim); transition: background 0.4s ease; }
.step-line.done { background: var(--green-accent); }

.step-label { font-family: 'Orbitron', monospace; font-size: 12px; letter-spacing: 3px; color: var(--text-dim); text-transform: uppercase; transition: color 0.3s; font-weight: 600; }
.step-label.active { color: var(--green-primary); }
.step-label.done { color: var(--green-accent); }

.current-step-title {
  font-family: 'Orbitron', monospace;
  font-size: 18px; letter-spacing: 5px;
  font-weight: 700;
  color: var(--green-primary);
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(74,222,128,0.4), 0 0 60px rgba(74,222,128,0.15);
  height: 28px; display: none;
  transition: all 0.5s ease;
}
.current-step-title.visible { display: block; }

/* Wheel */
.wheel-wrapper {
  position: relative; width: 420px; height: 420px;
  opacity: 0; transform: scale(0.85);
  transition: all 0.7s cubic-bezier(0.34,1.56,0.64,1);
  display: none;
}
.wheel-wrapper.visible { opacity: 1; transform: scale(1); display: block; }

.pointer {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%); z-index: 10;
  width: 0; height: 0;
  border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 32px solid var(--green-primary);
  filter: drop-shadow(0 0 12px rgba(74,222,128,0.6));
  transition: filter 0.2s;
}
.pointer::after { content:''; position:absolute; top:-36px; left:-8px; width:16px; height:8px; background:var(--green-secondary); border-radius:4px 4px 0 0; }
.spinning .pointer { filter: drop-shadow(0 0 24px rgba(74,222,128,1)); }

canvas#wheel {
  width: 420px; height: 420px; border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(74,222,128,0.2), 0 0 0 8px rgba(74,222,128,0.05), var(--glow), inset 0 0 60px rgba(0,0,0,0.3);
  cursor: pointer; transition: box-shadow 0.3s, transform 0.2s;
}
canvas#wheel:hover { box-shadow: 0 0 0 4px rgba(74,222,128,0.35), 0 0 0 8px rgba(74,222,128,0.1), 0 0 50px rgba(74,222,128,0.2), inset 0 0 60px rgba(0,0,0,0.3); }
.spinning canvas#wheel { box-shadow: 0 0 0 4px rgba(74,222,128,0.5), 0 0 0 8px rgba(74,222,128,0.2), 0 0 80px rgba(74,222,128,0.35), inset 0 0 60px rgba(0,0,0,0.3); }

.center-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1a2744, var(--bg-deep));
  border: 3px solid rgba(74,222,128,0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.5), 0 0 15px rgba(74,222,128,0.15);
  pointer-events: none; z-index: 5;
}
.center-hub svg { width: 32px; height: 32px; fill: var(--green-primary); opacity: 0.9; }

.tick-flash {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 430px; height: 430px; border-radius: 50%;
  border: 2px solid transparent; pointer-events: none; z-index: 4;
  transition: border-color 0.05s;
}
.tick-flash.active { border-color: rgba(74,222,128,0.15); }

/* Button */
.phantom-btn {
  font-family: 'Orbitron', monospace; font-weight: 700; font-size: 14px;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--green-primary), var(--green-accent));
  border: none; padding: 14px 48px; border-radius: 4px;
  cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s;
}
.phantom-btn::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform 0.6s;
}
.phantom-btn:hover::before { transform: translateX(100%); }
.phantom-btn:hover { box-shadow: 0 0 30px rgba(74,222,128,0.4), 0 4px 15px rgba(0,0,0,0.3); transform: translateY(-2px); }
.phantom-btn:active { transform: translateY(0); }
.phantom-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.phantom-btn:disabled:hover::before { transform: translateX(-100%); }

/* Back to home link */
.back-home {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  padding: 10px 24px;
  border: 1px solid rgba(74,222,128,0.12);
  border-radius: 4px;
  transition: all 0.3s ease;
}
.back-home:hover {
  color: var(--green-accent);
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.05);
}

/* Privacy notice link */
.privacy-notice {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.privacy-notice:hover {
  opacity: 1;
  color: var(--green-accent);
}

/* Start screen */
.start-screen {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  transition: all 0.5s ease;
}
.start-screen.hidden { opacity: 0; transform: scale(0.9); pointer-events: none; position: absolute; }

/* Spin area */
.spin-area {
  display: none; flex-direction: column; align-items: center; gap: 8px; height: 120px;
  opacity: 0; transition: opacity 0.5s ease;
}
.spin-area.visible { display: flex; opacity: 1; }

.step-result { height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.step-result-name {
  font-family: 'Orbitron', monospace; font-weight: 700; font-size: 20px;
  color: var(--green-secondary); text-shadow: 0 0 30px rgba(74,222,128,0.4);
  opacity: 0; transform: scale(0.8);
  transition: all 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.step-result-name.visible { opacity: 1; transform: scale(1); }
.step-result-meta { font-size: 11px; color: var(--text-dim); opacity: 0; transition: opacity 0.5s 0.2s; }
.step-result-meta.visible { opacity: 1; }
.step-result-meta a { color: var(--green-accent); text-decoration: none; border-bottom: 1px solid rgba(16,185,129,0.3); }

/* Final panel */
.final-panel {
  display: none; flex-direction: column; align-items: center; gap: 24px;
  animation: fadeInUp 0.6s ease-out;
}
.final-panel.visible { display: flex; }

.final-title {
  font-family: 'Orbitron', monospace; font-weight: 700; font-size: 18px;
  letter-spacing: 5px; color: var(--green-primary);
  text-shadow: 0 0 30px rgba(74,222,128,0.4), 0 0 60px rgba(74,222,128,0.15); text-transform: uppercase;
}
.final-cards { display: flex; gap: 24px; }
.final-card {
  border: 1px solid rgba(74,222,128,0.15); background: rgba(16,185,129,0.03);
  border-radius: 6px; padding: 20px 32px; text-align: center; min-width: 180px;
  position: relative; overflow: hidden;
  opacity: 0; transform: translateY(15px); transition: all 0.5s ease;
}
.final-card.visible { opacity: 1; transform: translateY(0); }
.final-card::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:linear-gradient(90deg,transparent,var(--green-primary),transparent); }
.final-card-role { font-family:'Orbitron',monospace; font-size:9px; letter-spacing:3px; color:var(--text-dim); text-transform:uppercase; margin-bottom:8px; }
.final-card-name { font-family:'Orbitron',monospace; font-weight:700; font-size:20px; color:var(--green-secondary); text-shadow:0 0 20px rgba(74,222,128,0.3); margin-bottom:6px; }
.final-card-crypto { font-size:11px; color:var(--text-dim); }
.final-card-url a { font-size:11px; color:var(--green-accent); text-decoration:none; border-bottom:1px solid rgba(16,185,129,0.3); }

.route-arrow {
  font-family:'Orbitron',monospace; font-size:24px; color:var(--green-primary);
  align-self:center; opacity:0; transition:opacity 0.5s 0.3s;
  text-shadow:0 0 15px rgba(74,222,128,0.4);
}
.route-arrow.visible { opacity: 1; }

.particle { position:fixed; width:2px; height:2px; background:var(--green-primary); border-radius:50%; pointer-events:none; opacity:0; z-index:0; }

@keyframes celebratePulse {
  0%,100%{box-shadow:0 0 0 4px rgba(74,222,128,0.2),0 0 30px rgba(74,222,128,0.15)}
  50%{box-shadow:0 0 0 4px rgba(74,222,128,0.5),0 0 60px rgba(74,222,128,0.3)}
}
.celebrate canvas#wheel { animation: celebratePulse 1s ease-in-out 3; }
@keyframes fadeInDown { from{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)} }

/* ── Responsive ── */

/* Tablet */
@media (max-width: 768px) {
  .container { gap: 20px; padding: 16px; }
  .wheel-wrapper { width: 360px; height: 360px; }
  canvas#wheel { width: 360px; height: 360px; }
  .center-hub { width: 64px; height: 64px; }
  .center-hub svg { width: 28px; height: 28px; }
  .tick-flash { width: 370px; height: 370px; }
  .phantom-logo { font-size: 24px; letter-spacing: 4px; }
  .subtitle { font-size: 10px; letter-spacing: 3px; }
  .current-step-title { font-size: 15px; letter-spacing: 4px; }
  .final-card { padding: 16px 24px; min-width: 150px; }
  .final-card-name { font-size: 17px; }
  .step-result-name { font-size: 17px; }
  .phantom-btn { padding: 12px 36px; font-size: 13px; }
}

/* Mobile */
@media (max-width: 520px) {
  .container { gap: 16px; padding: 12px; }
  .wheel-wrapper { width: 280px; height: 280px; }
  canvas#wheel { width: 280px; height: 280px; }
  .center-hub { width: 48px; height: 48px; }
  .center-hub svg { width: 22px; height: 22px; }
  .tick-flash { width: 290px; height: 290px; }
  .pointer { border-left-width: 12px; border-right-width: 12px; border-top-width: 24px; top: -14px; }
  .pointer::after { top: -28px; left: -6px; width: 12px; height: 6px; }
  .phantom-logo { font-size: 20px; letter-spacing: 3px; }
  .subtitle { font-size: 9px; letter-spacing: 2px; }
  .current-step-title { font-size: 13px; letter-spacing: 3px; }
  .lang-btn { font-size: 12px; padding: 8px 12px; }
  .lang-flag svg { width: 20px; height: 14px; }
  .step-label { font-size: 10px; letter-spacing: 2px; }
  .step-line { width: 30px; }
  .step-dot { width: 12px; height: 12px; }
  .phantom-btn { padding: 12px 32px; font-size: 12px; letter-spacing: 3px; }
  .final-cards { flex-direction: column; gap: 16px; }
  .final-card { padding: 14px 20px; min-width: auto; }
  .final-card-name { font-size: 16px; }
  .route-arrow { transform: rotate(90deg); font-size: 20px; }
  .step-result-name { font-size: 16px; }
  .back-home { font-size: 10px; padding: 8px 18px; }
  body::after { width: 400px; height: 400px; }
}

/* Small mobile */
@media (max-width: 360px) {
  .wheel-wrapper { width: 240px; height: 240px; }
  canvas#wheel { width: 240px; height: 240px; }
  .center-hub { width: 40px; height: 40px; }
  .center-hub svg { width: 18px; height: 18px; }
  .tick-flash { width: 250px; height: 250px; }
  .phantom-logo { font-size: 17px; letter-spacing: 2px; }
  .lang-btn { font-size: 11px; padding: 6px 10px; gap: 6px; }
  .final-card { padding: 12px 16px; }
  .final-card-name { font-size: 14px; }
}
