@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323:wght@400&display=swap');

/* I have spent almost 3 goddamn hours trying to make this gradient look right. */

:root {
  --deep-night:     #0F172A;
  --shadow-depth:   #1E293B;
  --arcane-core:    #1E293B;
  --mystic-border:  #1e40af;
  --royal-purple:   #467FFF;
  --arcane-glow:    #22D3EE;
  --elven-light:    #22D3EE;
  --ethereal-white: #E2E8F0;
  --elven-gold:     #60A5FA;
  --spirit-text:    #E2E8F0;
  --text-fade:      rgba(226, 232, 240, 0.5);
  --pixel:          "Press Start 2P", monospace;
  --mono:           "VT323", monospace;
  --transition:     all 0.15s steps(1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--deep-night);
  color: var(--spirit-text);
  font-family: var(--mono);
  font-size: 20px;
  overflow-x: hidden;
  cursor: crosshair;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,.18) 3px,
    rgba(0,0,0,.18) 4px
  );
  z-index: 9999;
}

body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,0,204,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,0,204,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
}

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

.site { position: relative; z-index: 2; }

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 0, 16, 0.9);
  border-bottom: 3px solid var(--mystic-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  backdrop-filter: blur(8px);
  image-rendering: pixelated;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle .hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--spirit-text);
  position: relative;
}
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--spirit-text);
}
.nav-toggle .hamburger::before { top: -6px; }
.nav-toggle .hamburger::after { top: 6px; }

@media (max-width: 768px) {
  nav {
    padding: 0 1rem;
  }
}

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

.nav-logo img {
  width: 40px; height: 40px;
  image-rendering: pixelated;
}

.nav-logo span {
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--elven-light);
  letter-spacing: 2px;
  text-shadow: 0 0 12px var(--arcane-glow);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

/* Mobile: hide nav and show toggle */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px;
    right: -320px;
    width: 260px;
    height: calc(100% - 64px);
    background: rgba(10,0,16,0.98);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transition: right 250ms ease;
    box-shadow: -8px 0 24px rgba(0,0,0,0.6);
    z-index: 200;
  }
  .nav-links.open {
    right: 0;
  }
  .nav-links li { margin: 0; }
}

@media (max-width: 600px) {
  .nav-links {
    gap: 0.75rem;
  }
}

.nav-links a {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--spirit-text);
  text-decoration: none;
  letter-spacing: 1px;
  padding: 6px 10px;
  border: 2px solid transparent;
  transition: all .15s steps(1);
  text-transform: uppercase;
  display: inline-block;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--elven-light);
  border-color: var(--royal-purple);
  background: rgba(124,0,204,.2);
  box-shadow: 0 0 12px var(--royal-purple);
  outline: none;
}

.nav-links a.active {
  background: rgba(124,0,204,0.25);
  border-color: var(--royal-purple);
  color: var(--ethereal-white);
}

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,0,204,.35) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: .7; }
  50%       { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-glow {
    animation: none;
  }
}

.hero-logo {
  width: 120px; height: 120px;
  image-rendering: pixelated;
  position: relative;
  z-index: 2;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--arcane-glow));
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo {
    animation: none;
  }
}

.hero-title {
  font-family: var(--pixel);
  font-size: clamp(16px, 4vw, 32px);
  color: var(--elven-light);
  text-shadow:
    4px 4px 0 var(--royal-purple),
    0 0 40px var(--arcane-glow),
    0 0 80px var(--royal-purple);
  margin: 1.5rem 0 .5rem;
  position: relative; z-index: 2;
  animation: flicker 6s infinite;
  letter-spacing: 4px;
}

@keyframes flicker {
  0%,95%,97%,100% { opacity: 1; }
  96%             { opacity: .7; }
  96.5%           { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title {
    animation: none;
  }
}

.hero-season {
  font-family: var(--pixel);
  font-size: 9px;
  color: var(--elven-gold);
  letter-spacing: 6px;
  text-transform: uppercase;
  position: relative; z-index: 2;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px var(--elven-gold);
}

.hero-sub {
  font-family: var(--mono);
  font-size: clamp(18px, 1.25vw, 22px);
  color: var(--ethereal-white);
  max-width: 560px;
  line-height: 1.5;
  position: relative; z-index: 2;
  margin-bottom: 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  position: relative; z-index: 2;
}

@media (max-width: 600px) {
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

.btn {
  font-family: var(--pixel);
  font-size: 8px;
  padding: 14px 24px;
  border: 3px solid;
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .1s steps(1);
  display: inline-block;
  image-rendering: pixelated;
  cursor: pointer;
}

.btn:focus {
  outline: 2px solid var(--elven-gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--royal-purple);
  border-color: var(--elven-light);
  color: #fff;
  box-shadow: 5px 7px 0 var(--deep-night), 6px 6px 0 var(--elven-light);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--arcane-glow);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--deep-night), 8px 8px 0 var(--elven-light);
}

.btn-outline {
  background: transparent;
  border-color: var(--arcane-glow);
  color: var(--elven-light);
  box-shadow: 4px 4px 0 var(--royal-purple);
}

.btn-outline:hover,
.btn-outline:focus {
  background: rgba(160,64,255,.15);
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--royal-purple);
}

.px-divider {
  width: 100%;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--royal-purple) 0, var(--royal-purple) 8px,
    transparent 8px, transparent 16px
  );
  margin: 0;
  opacity: .5;
}

section {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 5vw, 3rem);
}

@media (max-width: 600px) {
  section {
    padding: 3rem 1.5rem;
  }
}

.section-label {
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--arcane-glow);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.section-title {
  font-family: var(--pixel);
  font-size: clamp(12px, 2.5vw, 18px);
  color: var(--elven-light);
  text-shadow: 3px 3px 0 var(--royal-purple);
  margin-bottom: 2rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  margin-top: 12px;
  width: 80px;
  height: 4px;
  background: var(--royal-purple);
  box-shadow: 0 0 12px var(--royal-purple);
}

.panel {
  background: var(--arcane-core);
  border: 3px solid var(--mystic-border);
  padding: 2rem;
  position: relative;
  box-shadow: 5px 7px 0 rgba(58,0,96,.6);
}

.panel::before {
  content: "";
  position: absolute;
  top: -3px; left: -3px;
  right: -3px; bottom: -3px;
  border: 1px solid rgba(200,128,255,.1);
  pointer-events: none;
}

.panel p {
  line-height: 1.7;
  color: var(--spirit-text);
  font-size: 21px;
}

.lore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.8rem;
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  .lore-grid { grid-template-columns: 1fr; }
}

.lore-card {
  background: var(--arcane-core);
  border: 3px solid var(--mystic-border);
  padding: 1.5rem;
  box-shadow: 4px 4px 0 rgba(58,0,96,.6);
  transition: transform .1s steps(1), box-shadow .1s steps(1);
  clip-path: polygon(0% 0%, 100% 0%, 98% 100%, 0% 100%);
}

.lore-card:hover,
.lore-card:focus-within {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--royal-purple);
  border-color: var(--arcane-glow);
}

.lore-card h3 {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--elven-gold);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.lore-card p {
  font-size: 19px;
  line-height: 1.6;
  color: var(--spirit-text);
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.season-stat {
  background: var(--arcane-core);
  border: 3px solid var(--royal-purple);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 4px 4px 0 var(--royal-purple);
  transition: all .1s steps(1);
}

.season-stat:hover,
.season-stat:focus {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--arcane-glow);
}

.season-stat .stat-val {
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--elven-gold);
  text-shadow: 0 0 10px var(--elven-gold);
  display: block;
  margin-bottom: 8px;
}

.season-stat .stat-label {
  font-family: var(--pixel);
  font-size: 6px;
  color: var(--elven-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}

.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--arcane-core);
  border: 2px solid var(--mystic-border);
  transition: all .1s steps(1);
  font-size: 19px;
}

.rules-list li:hover,
.rules-list li:focus-within {
  border-color: var(--arcane-glow);
  background: rgba(124,0,204,.1);
}

.rules-list li .rule-num {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--arcane-glow);
  min-width: 28px;
  padding-top: 4px;
}

.rules-list li .rule-text {
  color: var(--spirit-text);
  line-height: 1.5;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--arcane-core);
  border: 3px solid var(--mystic-border);
  box-shadow: 4px 4px 0 rgba(58,0,96,.5);
  transition: all .1s steps(1);
}

.step:hover,
.step:focus-within {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--royal-purple);
  border-color: var(--arcane-glow);
}

@media (max-width: 600px) {
  .step {
    flex-direction: column;
    gap: 0.75rem;
  }
}

.step-num {
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--arcane-glow);
  text-shadow: 2px 2px 0 var(--royal-purple);
  min-width: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.step-content h3 {
  font-family: var(--pixel);
  font-size: 8px;
  color: var(--elven-gold);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.step-content p {
  font-size: 19px;
  color: var(--spirit-text);
  line-height: 1.5;
}

.step-content a {
  color: var(--elven-light);
  text-decoration: none;
  transition: all .1s steps(1);
}

.step-content a:hover,
.step-content a:focus {
  color: var(--ethereal-white);
  text-decoration: underline;
  outline: none;
}

.cta-container {
  text-align: center;
  margin-top: 2.5rem;
}

footer {
  border-top: 3px solid var(--mystic-border);
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--shadow-depth);
  position: relative;
  z-index: 2;
}

footer img {
  width: 48px; height: 48px;
  image-rendering: pixelated;
  opacity: .7;
  margin-bottom: 12px;
}

footer p {
  font-family: var(--pixel);
  font-size: 7px;
  color: rgba(200,128,255,.4);
  letter-spacing: 2px;
}

.blink {
  animation: blink 1s steps(1) infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .blink {
    animation: none;
    opacity: 1;
  }
}

.bg-alt { background: var(--shadow-depth); }

.full-section {
  position: relative;
  z-index: 2;
}

.full-section.bg-alt {
  border-top: 2px solid var(--mystic-border);
  border-bottom: 2px solid var(--mystic-border);
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--elven-light);
  animation: twinkle var(--d, 3s) steps(1) infinite var(--delay, 0s);
}

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

.shooting-star {
  animation: shoot 2s steps(1) infinite !important;
}

@keyframes shoot {
  0% { transform: translateX(0) translateY(0); opacity: 0; }
  10% { transform: translateX(100px) translateY(-50px); opacity: 1; }
  20% { transform: translateX(200px) translateY(-100px); opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .star {
    animation: none;
    opacity: 0.5;
  }
}

/* One-line custom scrollbar for modern browsers (Firefox will pick this up) */
html { scrollbar-color: #467FFF transparent; }

/* Creeper visual: brief green flash overlay and logo shake */
body.creeper-flash::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(100,255,100,0.55);
  pointer-events: none;
  z-index: 10002;
  animation: creeperFlash 0.7s ease-in-out;
}

@keyframes creeperFlash {
  0% { opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.shake {
  animation: shake 0.7s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0) rotate(-1deg); }
  30%, 50%, 70% { transform: translate3d(-2px, 0, 0) rotate(1deg); }
  40%, 60% { transform: translate3d(1px, 0, 0); }
}

/* Full-resolution voice art (no pixelation) */
.voice-art {
  image-rendering: auto;
  width: auto;
  max-width: 720px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: none;
}

/* Glitch overlay video (does not block clicks) */
.glitch-overlay {
  position: fixed;
  inset: 0;
  z-index: 10005;
  pointer-events: none;
}
.glitch-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: screen;
  opacity: 0.98;
}
