:root {
  --bg: #0c0c1d;
  --bg2: #111128;
  --bg3: #1a1a3e;
  --text: #e0e0ff;
  --text-dim: #7a7aaa;
  --cyan: #00f0ff;
  --magenta: #ff00ff;
  --yellow: #ffe600;
  --green: #39ff14;
  --red: #ff3131;
  --orange: #ff8c00;
  --white: #ffffff;
  --pixel: 'Press Start 2P', monospace;
  --shadow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 40px rgba(0, 240, 255, 0.2);
  --shadow-magenta: 0 0 10px rgba(255, 0, 255, 0.5), 0 0 40px rgba(255, 0, 255, 0.2);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--pixel);
  background: var(--bg);
  color: var(--text);
  line-height: 2;
  overflow-x: hidden;
  image-rendering: pixelated;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: all 0.2s;
}

a:hover {
  color: var(--white);
  text-shadow: var(--shadow-cyan);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
}

.crt-flicker {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  animation: flicker 0.15s infinite;
  opacity: 0;
}

@keyframes flicker {
  0% { opacity: 0; }
  5% { opacity: 0.02; background: rgba(255, 255, 255, 0.01); }
  10% { opacity: 0; }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.8rem 0;
  background: var(--bg);
  border-bottom: 3px solid var(--cyan);
  box-shadow: var(--shadow-cyan);
  transition: all 0.3s;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  background: rgba(12, 12, 29, 0.95);
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--pixel);
  font-size: 1rem;
  color: var(--cyan) !important;
  text-shadow: var(--shadow-cyan);
  letter-spacing: 0.1em;
}

.nav-logo span {
  color: var(--magenta);
  text-shadow: var(--shadow-magenta);
}

.nav-discovery {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-disc-label {
  font-family: var(--pixel);
  font-size: 0.4rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.nav-disc-bar {
  width: 80px;
  height: 8px;
  background: var(--bg3);
  border: 2px solid var(--cyan);
  position: relative;
  overflow: hidden;
}

.nav-disc-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-disc-value {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--yellow);
  text-shadow: 0 0 6px rgba(255, 230, 0, 0.4);
  min-width: 28px;
  text-align: right;
}

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

.nav-links a {
  color: var(--text-dim);
  font-family: var(--pixel);
  font-size: 0.65rem;
  transition: all 0.2s;
  padding: 0.3rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
  text-shadow: var(--shadow-cyan);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--cyan);
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.pixel-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.hero-frame {
  position: relative;
  border: 3px solid var(--cyan);
  padding: 3rem 2rem;
  background: rgba(12, 12, 29, 0.8);
  box-shadow: var(--shadow-cyan), inset 0 0 60px rgba(0, 240, 255, 0.05);
}

.frame-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid var(--magenta);
}

.frame-tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.frame-tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.frame-bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.frame-br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.hero-greeting {
  font-size: 0.7rem;
  color: var(--green);
  margin-bottom: 1rem;
  letter-spacing: 0.2em;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.hero-name {
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  letter-spacing: 0.1em;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--cyan);
  text-shadow: var(--shadow-cyan);
  animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { text-shadow: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 40px rgba(0, 240, 255, 0.2); }
  to { text-shadow: 0 0 20px rgba(0, 240, 255, 0.8), 0 0 60px rgba(0, 240, 255, 0.3), 0 0 100px rgba(0, 240, 255, 0.1); }
}

.hero-divider {
  margin: 1rem 0;
  font-size: 0.8rem;
  color: var(--magenta);
  letter-spacing: 0.3em;
  text-shadow: var(--shadow-magenta);
}

.hero-tagline {
  font-size: clamp(0.55rem, 1.5vw, 0.75rem);
  color: var(--yellow);
  margin-bottom: 2rem;
  line-height: 2.2;
  min-height: 2em;
}

.cursor-blink {
  animation: blink 0.8s step-end infinite;
  color: var(--yellow);
}

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

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--pixel);
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.btn-retro {
  background: var(--cyan);
  color: var(--bg);
  box-shadow:
    4px 4px 0 0 var(--magenta),
    inset 0 0 0 0 transparent;
  position: relative;
}

.btn-retro:hover {
  transform: translate(2px, 2px);
  box-shadow:
    2px 2px 0 0 var(--magenta),
    0 0 20px rgba(0, 240, 255, 0.4);
  color: var(--bg);
}

.btn-retro:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn-arrow {
  font-size: 0.7rem;
}

.hero-social {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--text-dim);
  color: var(--text-dim);
  font-size: 1rem;
  transition: all 0.2s;
  background: transparent;
}

.hero-social a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-3px);
}

.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  animation: scrollBounce 2s infinite;
}

.blink-text {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.5rem;
  animation: blink 1s step-end infinite;
}

.arrow-down {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid var(--cyan);
  margin: 0 auto;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.5));
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-6px); }
  60% { transform: translateX(-50%) translateY(-3px); }
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--pixel);
  font-size: clamp(0.8rem, 2.5vw, 1.1rem);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--cyan);
  text-shadow: var(--shadow-cyan);
  letter-spacing: 0.15em;
}

.title-bracket {
  color: var(--magenta);
  text-shadow: var(--shadow-magenta);
}

.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.image-wrapper {
  position: relative;
  border: 3px solid var(--magenta);
  box-shadow: var(--shadow-magenta);
  overflow: hidden;
  aspect-ratio: 1;
  transition: all 0.3s;
  background: var(--bg);
}

.image-wrapper.scanning {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 60px rgba(0, 240, 255, 0.2);
}

.image-border {
  position: absolute;
  inset: 4px;
  border: 2px solid var(--cyan);
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.1);
}

.image-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 30px var(--cyan);
  z-index: 4;
  top: -10px;
  opacity: 0;
  pointer-events: none;
}

.image-wrapper.scanning .image-scanline {
  opacity: 1;
  animation: scanSweep 1.5s ease-in-out;
}

@keyframes scanSweep {
  0% { top: -3px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0) contrast(3) brightness(0.4) hue-rotate(180deg);
  opacity: 0.3;
  transition: filter 0.8s, opacity 0.8s;
}

.image-wrapper.scanned img {
  filter: saturate(1.8) contrast(1.4) brightness(0.85) hue-rotate(0deg);
  opacity: 0.7;
}

.image-wrapper.scanning img {
  filter: saturate(0) contrast(4) brightness(1.5);
  opacity: 0.5;
  animation: cyberGlitch 0.1s steps(2) infinite;
}

@keyframes cyberGlitch {
  0% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 0); }
  25% { clip-path: inset(40% 0 30% 0); transform: translate(2px, 0); }
  50% { clip-path: inset(70% 0 5% 0); transform: translate(-1px, 0); }
  75% { clip-path: inset(20% 0 50% 0); transform: translate(1px, 0); }
  100% { clip-path: inset(50% 0 20% 0); transform: translate(0, 0); }
}

.image-cyber-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 240, 255, 0.03) 2px,
      rgba(0, 240, 255, 0.03) 4px
    ),
    radial-gradient(ellipse at center, transparent 40%, rgba(12, 12, 29, 0.6) 100%);
}

.image-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

.image-glitch-strip {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
  background: var(--cyan);
  opacity: 0;
  mix-blend-mode: screen;
}

.image-glitch-strip.s1 {
  top: 25%;
  height: 2px;
  animation: glitchStrip1 4s steps(1) infinite;
}

.image-glitch-strip.s2 {
  top: 55%;
  height: 3px;
  background: var(--magenta);
  animation: glitchStrip2 3s steps(1) infinite;
}

.image-glitch-strip.s3 {
  top: 78%;
  height: 1px;
  animation: glitchStrip3 5s steps(1) infinite;
}

@keyframes glitchStrip1 {
  0%, 89% { opacity: 0; }
  90% { opacity: 0.6; transform: translateX(-5px); }
  92% { opacity: 0.8; transform: translateX(3px); }
  94% { opacity: 0; }
}

@keyframes glitchStrip2 {
  0%, 79% { opacity: 0; }
  80% { opacity: 0.5; transform: translateX(4px); }
  83% { opacity: 0.7; transform: translateX(-2px); }
  85% { opacity: 0; }
}

@keyframes glitchStrip3 {
  0%, 93% { opacity: 0; }
  94% { opacity: 0.4; }
  96% { opacity: 0; }
}

.image-hud-text {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 6;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
}

.image-hud-text span {
  font-family: var(--pixel);
  font-size: 0.3rem;
  color: var(--cyan);
  text-shadow: 0 0 4px rgba(0, 240, 255, 0.6);
  opacity: 0.7;
  animation: hudFlicker 3s steps(1) infinite;
}

@keyframes hudFlicker {
  0%, 95% { opacity: 0.7; }
  96% { opacity: 0; }
  97% { opacity: 0.7; }
  98% { opacity: 0; }
  100% { opacity: 0.7; }
}

.image-corner-data {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  font-family: var(--pixel);
  font-size: 0.3rem;
  opacity: 0.5;
}

.image-corner-data.data-tl {
  top: 24px;
  left: 8px;
  color: var(--green);
  text-shadow: 0 0 4px rgba(57, 255, 20, 0.4);
  animation: blink 2.5s step-end infinite;
}

.image-corner-data.data-br {
  bottom: 8px;
  right: 8px;
  color: var(--text-dim);
}

.image-label {
  font-family: var(--pixel);
  font-size: 0.4rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.8rem;
  letter-spacing: 0.05em;
}

.cmd-hint-inline {
  color: var(--yellow);
  text-shadow: 0 0 4px rgba(255, 230, 0, 0.3);
}

.terminal {
  border: 2px solid var(--cyan);
  box-shadow: var(--shadow-cyan);
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.8rem;
  background: var(--bg3);
  border-bottom: 2px solid var(--cyan);
}

.terminal-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  flex-shrink: 0;
}

.terminal-dot:nth-child(2) {
  background: var(--yellow);
}

.terminal-dot:nth-child(3) {
  background: var(--green);
}

.terminal-title {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--text-dim);
  margin-left: 0.5rem;
  flex: 1;
}

.terminal-discovery {
  font-family: var(--pixel);
  font-size: 0.4rem;
  color: var(--yellow);
  text-shadow: 0 0 6px rgba(255, 230, 0, 0.4);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--yellow);
  margin-left: auto;
}

.terminal-body {
  padding: 1rem 1.2rem;
  min-height: 300px;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) var(--bg);
}

.terminal-body::-webkit-scrollbar {
  width: 4px;
}

.terminal-body::-webkit-scrollbar-track {
  background: var(--bg);
}

.terminal-body::-webkit-scrollbar-thumb {
  background: var(--cyan);
}

.terminal-output {
  margin-bottom: 0.5rem;
}

.term-line {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--text);
  line-height: 2;
  word-break: break-word;
}

.term-line .prompt {
  color: var(--green);
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
  margin-right: 0.5rem;
}

.term-line.system {
  color: var(--cyan);
}

.term-line.error {
  color: var(--red);
}

.term-line.success {
  color: var(--green);
}

.term-line.info {
  color: var(--yellow);
}

.term-line.unlock {
  color: var(--magenta);
  text-shadow: var(--shadow-magenta);
  animation: unlockFlash 0.6s ease;
}

@keyframes unlockFlash {
  0%, 100% { opacity: 1; }
  25% { opacity: 0.3; }
  50% { opacity: 1; }
  75% { opacity: 0.3; }
}

.cmd-hint {
  color: var(--yellow);
  text-shadow: 0 0 6px rgba(255, 230, 0, 0.4);
}

.terminal-input-line {
  display: flex;
  align-items: center;
  font-family: var(--pixel);
  font-size: 0.55rem;
}

.terminal-input-line .prompt {
  color: var(--green);
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
  margin-right: 0.5rem;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--pixel);
  font-size: 0.55rem;
  caret-color: var(--cyan);
  line-height: 2;
}

.terminal-input:disabled {
  opacity: 0.4;
}

.skill-bar-term {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.2rem 0;
}

.skill-bar-name {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--text-dim);
  min-width: 70px;
  text-align: right;
}

.skill-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--text-dim);
  overflow: hidden;
  max-width: 160px;
}

.skill-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-bar-fill.cyan { background: var(--cyan); box-shadow: 0 0 6px rgba(0, 240, 255, 0.5); }
.skill-bar-fill.green { background: var(--green); box-shadow: 0 0 6px rgba(57, 255, 20, 0.5); }
.skill-bar-fill.magenta { background: var(--magenta); box-shadow: 0 0 6px rgba(255, 0, 255, 0.5); }
.skill-bar-fill.yellow { background: var(--yellow); box-shadow: 0 0 6px rgba(255, 230, 0, 0.5); }
.skill-bar-fill.red { background: var(--red); box-shadow: 0 0 6px rgba(255, 49, 49, 0.5); }

.game-panel {
  border: 2px solid var(--green);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.5), 0 0 40px rgba(57, 255, 20, 0.2);
  background: rgba(0, 0, 0, 0.9);
  overflow: hidden;
  margin-top: 1rem;
}

.game-panel.hidden {
  display: none;
}

.game-panel-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.8rem;
  background: var(--bg3);
  border-bottom: 2px solid var(--green);
}

.game-panel-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--red);
  font-family: var(--pixel);
  font-size: 0.5rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.game-panel-close:hover {
  text-shadow: 0 0 8px rgba(255, 49, 49, 0.5);
}

.game-panel-hud {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg3);
  border-bottom: 2px solid var(--green);
}

.hud-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.hud-label {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--text-dim);
}

.hud-value {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(255, 230, 0, 0.5);
}

.game-screen-inner {
  position: relative;
  overflow: hidden;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10;
  transition: opacity 0.3s;
}

.game-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-content {
  text-align: center;
  padding: 1.5rem;
}

.game-title-text {
  font-family: var(--pixel);
  font-size: 1.2rem;
  color: var(--green);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5), 0 0 40px rgba(57, 255, 20, 0.2);
  margin-bottom: 0.8rem;
  letter-spacing: 0.15em;
}

.game-sub-text {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--yellow);
  animation: blink 1s step-end infinite;
  margin-bottom: 1rem;
}

.game-start-btn {
  font-size: 0.6rem;
  padding: 0.7rem 1.5rem;
}

.game-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem;
}

.ctrl-row {
  display: flex;
  gap: 0.3rem;
}

.ctrl-btn {
  width: 52px;
  height: 52px;
  font-size: 1.2rem;
  font-family: var(--pixel);
  background: var(--bg3);
  color: var(--cyan);
  border: 2px solid var(--cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.ctrl-btn:active {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: var(--shadow-cyan);
}

.game-instructions {
  padding: 0.5rem;
  text-align: center;
}

.game-instructions p {
  font-family: var(--pixel);
  font-size: 0.4rem;
  color: var(--text-dim);
  line-height: 2.2;
}

.hack-panel {
  border: 2px solid var(--magenta);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.5), 0 0 40px rgba(255, 0, 255, 0.2);
  background: rgba(0, 0, 0, 0.9);
  overflow: hidden;
  margin-top: 1rem;
}

.hack-panel.hidden {
  display: none;
}

.hack-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.8rem;
  background: var(--bg3);
  border-bottom: 2px solid var(--magenta);
}

.hack-timer {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--red);
  text-shadow: 0 0 6px rgba(255, 49, 49, 0.4);
  margin-left: auto;
  margin-right: 0.5rem;
}

.hack-body {
  padding: 1.5rem;
  text-align: center;
}

.hack-word {
  font-family: var(--pixel);
  font-size: 1rem;
  color: var(--magenta);
  text-shadow: var(--shadow-magenta);
  letter-spacing: 0.3em;
  margin-bottom: 1.2rem;
  min-height: 2em;
  word-break: break-all;
}

.hack-word.correct {
  color: var(--green);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
  animation: hackFlash 0.3s ease;
}

.hack-word.wrong {
  color: var(--red);
  animation: hackShake 0.3s ease;
}

@keyframes hackFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes hackShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.hack-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pixel);
  font-size: 0.55rem;
  margin-bottom: 1rem;
}

.hack-input-row .prompt {
  color: var(--green);
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
  margin-right: 0.5rem;
}

.hack-score-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.hack-label {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--text-dim);
  margin-right: 0.3rem;
}

.hack-val {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--yellow);
  text-shadow: 0 0 6px rgba(255, 230, 0, 0.4);
}

.prompt {
  color: var(--green);
  margin-right: 0.5rem;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

.matrix-overlay {
  position: fixed;
  inset: 0;
  z-index: 997;
  pointer-events: none;
}

.matrix-overlay.hidden {
  display: none;
}

.matrix-overlay canvas {
  width: 100%;
  height: 100%;
}

.footer {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 3px solid var(--cyan);
  box-shadow: 0 -4px 20px rgba(0, 240, 255, 0.1);
}

.footer p {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--text-dim);
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.particle {
  position: absolute;
  background: var(--cyan);
  animation: floatPixel linear infinite;
  box-shadow: 0 0 4px rgba(0, 240, 255, 0.6);
}

@keyframes floatPixel {
  0% {
    transform: translateY(100vh);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-10vh);
    opacity: 0;
  }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

.achievement-popup {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  background: var(--bg2);
  border: 2px solid var(--yellow);
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.3);
  z-index: 1003;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-popup.show {
  transform: translateX(0);
}

.achievement-icon {
  font-family: var(--pixel);
  font-size: 1rem;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(255, 230, 0, 0.5);
}

.achievement-text {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--yellow);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 280px;
    height: 100vh;
    background: var(--bg2);
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s;
    border-left: 3px solid var(--cyan);
    box-shadow: -4px 0 20px rgba(0, 240, 255, 0.2);
    z-index: 999;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 1000;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    max-width: 200px;
    margin: 0 auto;
  }

  .section {
    padding: 3rem 0;
  }

  .hero-frame {
    padding: 2rem 1.2rem;
  }

  .game-controls {
    display: flex;
  }

  .nav-discovery {
    display: none;
  }

  .achievement-popup {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
  }

  .skill-bar-track {
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-name {
    font-size: 1.5rem;
  }
}
