:root {
  --bg-base: #0D0D0D;
  --bg-surface: #1A1A1A;
  --bg-surface-2: #1E1E1E;
  --bg-surface-3: #242424;
  --border: #2A2A2A;
  --accent: #FF8C00;
  --accent-hot: #FF6600;
  --accent-glow: rgba(255,140,0,0.6);
  --text-light: #F1F1F1;
  --text-muted: #AAAAAA;
  --text-dim: #777777;
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: #0D0D0D;
  min-height: 100vh;
  color: var(--text-light);
  overflow-x: hidden;
}

/* Atmospheric dark background — subtle orange glow pools + grid */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(255,140,0,0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 90%, rgba(255,80,0,0.08) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 54px, rgba(255,255,255,0.015) 54px, rgba(255,255,255,0.015) 55px),
    repeating-linear-gradient(90deg, transparent, transparent 54px, rgba(255,255,255,0.015) 54px, rgba(255,255,255,0.015) 55px),
    linear-gradient(160deg, #0D0D0D 0%, #121212 40%, #0A0A0A 100%);
  pointer-events: none;
  z-index: 0;
}

#root {
  position: relative;
  z-index: 1;
}

/* ===== Glitch title ===== */
@keyframes glitch1 {
  0%, 100% { clip-path: inset(0 0 95% 0); transform: translate(-2px, 0); }
  20% { clip-path: inset(20% 0 60% 0); transform: translate(3px, 0); }
  40% { clip-path: inset(50% 0 30% 0); transform: translate(-1px, 0); }
  60% { clip-path: inset(70% 0 10% 0); transform: translate(2px, 0); }
  80% { clip-path: inset(10% 0 80% 0); transform: translate(-3px, 0); }
}

@keyframes glitch2 {
  0%, 100% { clip-path: inset(95% 0 0 0); transform: translate(2px, 0); }
  20% { clip-path: inset(60% 0 20% 0); transform: translate(-3px, 0); }
  40% { clip-path: inset(30% 0 50% 0); transform: translate(1px, 0); }
  60% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 0); }
  80% { clip-path: inset(80% 0 10% 0); transform: translate(3px, 0); }
}

@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 20px rgba(255,140,0,0.5), 0 0 45px rgba(255,80,0,0.25); }
  50% { text-shadow: 0 0 32px rgba(255,140,0,0.85), 0 0 65px rgba(255,80,0,0.45); }
}

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

@keyframes progressStripe {
  0% { background-position: 0 0; }
  100% { background-position: 40px 0; }
}

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

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255,140,0,0.4); }
  50% { box-shadow: 0 0 40px rgba(255,140,0,0.7); }
}

.title-glitch {
  position: relative;
  font-family: 'Archivo Black', sans-serif;
  animation: titlePulse 3s ease-in-out infinite;
}

.title-glitch::before,
.title-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.title-glitch::before {
  color: #ff0040;
  animation: glitch1 3s infinite linear;
  opacity: 0.7;
}

.title-glitch::after {
  color: #00ffff;
  animation: glitch2 3s infinite linear;
  opacity: 0.7;
}

.fade-in { animation: fadeInUp 0.6s ease-out forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }
.fade-in-delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ===== Surface cards ===== */
.surface-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 8px 30px rgba(0,0,0,0.5);
}

.tutorial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.tutorial-card button:hover { background: rgba(255,140,0,0.06) !important; }

.step-row {
  background: var(--bg-surface-3);
  border: 1px solid var(--border);
}

/* ===== Progress bar ===== */
.progress-bar-animated {
  background-image: linear-gradient(
    45deg,
    rgba(0,0,0,0.25) 25%,
    transparent 25%,
    transparent 50%,
    rgba(0,0,0,0.25) 50%,
    rgba(0,0,0,0.25) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progressStripe 1s linear infinite;
}

/* ===== Effect cards ===== */
.card-glow { transition: all 0.3s ease; }
.card-glow:hover {
  transform: translateY(-3px);
  border-color: rgba(255,140,0,0.5) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

/* ===== Fire CTA button ===== */
.btn-fire {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #FF6600, #FF8C00);
  color: #0D0D0D;
  animation: ctaPulse 2.5s ease-in-out infinite;
}

.btn-fire::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 60%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.btn-fire:hover::before { transform: scale(1); }

.btn-fire:hover {
  transform: scale(1.05);
  box-shadow: 0 0 45px rgba(255,140,0,0.8);
}

.btn-fire.is-disabled,
.btn-fire:disabled {
  background: #2A2A2A;
  color: #555;
  cursor: not-allowed;
  animation: none;
  transform: none !important;
  box-shadow: none !important;
}
.btn-fire.is-disabled::before,
.btn-fire:disabled::before { display: none; }

/* ===== Import / drop zone ===== */
.drop-zone {
  border: 3px dashed rgba(255,140,0,0.45);
  background: #121212;
  transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(255,140,0,0.06);
  box-shadow: 0 0 30px rgba(255,140,0,0.15) inset;
}

.import-btn {
  background: rgba(255,140,0,0.12);
  border: 2px solid rgba(255,140,0,0.5);
  color: var(--accent);
}
.drop-zone:hover .import-btn {
  background: var(--accent);
  color: #0D0D0D;
  box-shadow: 0 0 20px rgba(255,140,0,0.6);
}

.remove-btn {
  background: rgba(220,50,50,0.15);
  border: 1px solid rgba(220,50,50,0.4);
  color: #ff8080;
}
.remove-btn:hover {
  background: rgba(220,50,50,0.5);
  color: #fff;
}

/* ===== Power buttons ===== */
.power-btn {
  background: var(--bg-surface-2);
  border: 2px solid var(--border);
  color: var(--text-muted);
}
.power-btn:hover {
  border-color: rgba(255,140,0,0.5);
  color: var(--text-light);
}
.power-btn.active {
  background: linear-gradient(135deg, #FF6600, #FF8C00);
  color: #0D0D0D;
  border-color: transparent;
  box-shadow: 0 0 28px rgba(255,140,0,0.5);
}

/* ===== Start over button ===== */
.startover-btn {
  background: var(--bg-surface-3);
  border: 2px solid var(--border);
  color: var(--text-light);
}
.startover-btn:hover {
  background: #2E2E2E;
  border-color: rgba(255,140,0,0.4);
}

/* ===== Footer ===== */
.footer-link { color: #888; }
.footer-link:hover { color: var(--accent); }

/* ===== Spinner ===== */
.spinner { animation: spin 1s linear infinite; }

/* ===== Scrollbar (dark) ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0D0D0D; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }