  :root {
    --bg: #06090a;
    --green: #cc88ff;
    --green-dim: #8844bb;
    --green-dark: #1a0033;
    --red: #ff2222;
    --red-dim: #991111;
    --yellow: #ffd700;
    --cyan: #dd88ff;
    --cyan-dim: #550077;
    --white: #f0e0ff;
    --muted: #3a1a5a;
    --surface: #09060e;
    --surface2: #100a18;
    --border: #1a0a2a;
    --border2: #2a1040;
  }

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

  @keyframes floatVertical {
    0% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-15px);
    }
    100% {
      transform: translateY(0px);
    }
  }

  body {
    background: var(--bg);
    color: var(--green);
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    line-height: 1.6;
    overflow-x: hidden;
  }

  /* CRT effect */
  body::before {
    content: '';
    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
    );
  }
  body::after {
    content: '';
    position: fixed; inset: 0; z-index: 9998;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.75) 100%);
  }

  /* Custom cursor */
  .cursor {
    position: fixed; z-index: 10000;
    pointer-events: none;
    font-size: 40px;
    line-height: 1;
    color: var(--green);
    text-shadow: 0 0 10px var(--green), 0 0 24px rgba(204,136,255,0.6);
    transform: translate(-4px, -20px);
    user-select: none;
    animation: note-pulse 1.8s ease-in-out infinite;
    opacity: 0;
  }
  body.custom-cursor-enabled { cursor: none; }
  body.custom-cursor-enabled .cursor { opacity: 1; }
  @keyframes note-pulse {
    0%,100% { text-shadow: 0 0 10px var(--green), 0 0 24px rgba(204,136,255,0.6); }
    50% { text-shadow: 0 0 18px var(--green), 0 0 40px rgba(204,136,255,0.9); }
  }

  /* NAV */
  nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: var(--bg);
    border-bottom: 2px solid var(--green);
    padding: 0.75rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
  }
  .nav-logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
    color: var(--green);
    text-shadow: 0 0 10px var(--green);
    letter-spacing: 0.05em;
  }
  .nav-logo span { color: var(--red); }
  .nav-links {
    list-style: none; display: flex; gap: 2rem; align-items: center;
  }
  .nav-links a {
    color: var(--green-dim); text-decoration: none;
    font-size: 1.4rem; letter-spacing: 0.05em;
    transition: color 0.15s;
  }
  .nav-links a:hover { color: var(--green); text-shadow: 0 0 8px var(--green); }

  /* Dropdown */
  .nav-dropdown {
    position: relative;
  }
  .nav-dropdown > a::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
  }
  .nav-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    border: 1px solid var(--green-dim);
    border-top: 2px solid var(--green);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 12px rgba(204,136,255,0.15);
    list-style: none;
    min-width: 160px;
    z-index: 200;
    padding: 0.3rem 0;
  }
  .nav-submenu li a {
    display: block;
    padding: 0.5rem 1.2rem;
    font-size: 1.1rem;
    color: var(--green-dim);
    white-space: nowrap;
    border-left: 2px solid transparent;
    transition: color 0.1s, border-color 0.1s;
  }
  .nav-submenu li a:hover {
    color: var(--green);
    border-left-color: var(--green);
    text-shadow: 0 0 8px var(--green);
    background: var(--surface);
  }
  
  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu {
    display: block;
  }

  .nav-badge {
    font-size: 0.65rem; color: var(--yellow);
    border: 1px solid var(--yellow);
    padding: 0.2rem 0.5rem;
    animation: blink 1.2s step-end infinite;
  }
  @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

  /* HERO */
  .hero {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
  }

  /* Pixel grid background */
  .hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
      linear-gradient(var(--border) 1px, transparent 1px),
      linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.4;
  }

  .hero-pre {
    font-size: 0.8rem; color: var(--muted);
    letter-spacing: 0.2em; text-transform: uppercase;
    margin-bottom: 1rem;
  }
  .hero-pre span { color: var(--green-dim); }

  .hero-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(2rem, 6vw, 4.5rem);
    color: var(--green);
    text-shadow:
      0 0 20px var(--green),
      0 0 60px rgba(204,136,255,0.3),
      5px 5px 0 #1a0033,
      -1px -1px 0 rgba(204,136,255,0.3);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    animation: glitch 6s infinite;
    position: relative;
  }

  @keyframes glitch {
    0%,95%,100% { transform: translate(0); filter: none; }
    96% { transform: translate(-3px, 1px); filter: hue-rotate(90deg); }
    97% { transform: translate(3px, -1px); filter: hue-rotate(-90deg); }
    98% { transform: translate(0); filter: none; }
    99% { transform: translate(2px, 2px); filter: brightness(2); }
  }

  .hero-subtitle {
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    color: #ff8800;
    letter-spacing: 0.1em;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 0 10px #ff8800;
  }

  /* Pixel art character placeholder */
  .hero-char {
    width: 128px; height: 128px;
    margin: 0 auto 2rem;
    position: relative;
    image-rendering: pixelated;
  }
  .pixel-sprite {
    display: grid;
    grid-template-columns: repeat(16, 8px);
    grid-template-rows: repeat(16, 8px);
    gap: 0;
  }
  .px { width: 8px; height: 8px; }

  .hero-desc {
    max-width: 640px;
    font-size: 1.3rem;
    color: var(--white);
    line-height: 1.7;
    margin-bottom: 3rem;
    text-shadow: 0 0 4px rgba(0,255,65,0.3);
  }

  .hero-btns {
    display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
  }
  .btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    letter-spacing: 0.08em;
    border: 2px solid;
    transition: all 0.1s;
    display: inline-block;
    position: relative;
  }
  .btn::before {
    content: '▶ ';
  }
  .btn-primary, .btn-secondary, .btn-play, .btn-disabled {
    background: transparent;
    color: #cc88ff;
    border-color: #cc88ff;
    box-shadow: 4px 4px 0 #5a0099;
  }
  .btn-primary:hover, .btn-secondary:hover, .btn-play:hover {
    background: #cc88ff;
    color: #000;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #5a0099;
  }
  .btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  .btn-disabled::before { content: '⏳ '; }

  /* SECTIONS */
  section {
    max-width: 900px; margin: 0 auto;
    padding: 5rem 2rem;
    border-top: 1px solid var(--border);
  }

  .section-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: var(--muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
  }
  .section-label {
  text-align: center;
  }

  /* // justo al lado del texto */
  .section-label::before {
    content: '// ';
    color: var(--green-dim);
  }

  .section-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.85rem, 2vw, 1.2rem);
    color: var(--green);
    text-shadow: 0 0 10px var(--green);
    margin-bottom: 2rem;
    line-height: 1.5;
  }

    #historia .section-title,
    #como-jugar .section-title,
    #mecanicas .section-title,
    #historia .section-label,
    #como-jugar .section-label,
    #mecanicas .section-label,
    .story-text {
      max-width: 720px;
      margin-left: auto;
      margin-right: auto;
  }

  .section-title,
  .section-label {
    text-align: center;
  }

  /* Textos largos en PC */
  section p {
    text-align: justify;
  }

  /* STORY */
  .story-text {
    font-size: 1.4rem;
    color: var(--white);

    line-height: 1.8;
    max-width: 720px;
    margin: 0 auto;
    text-align: justify;
  }

  .story-text p {
    margin-bottom: 1.4rem; /* un poco más de aire */
  }

  .story-text .highlight { color: var(--yellow); }
  .story-text .danger { color: var(--red); }
  .story-text .hero-name {
    color: var(--cyan);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9rem;
}
  /* MECHANICS */
  .mechanics-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2px;
    background: var(--bg); /* 👈 usa el fondo real */
    border: 1px solid var(--border);
    margin-top: 1rem;
  }
  .mechanic-card {
    background: var(--surface);
    padding: 2rem 1.5rem;
    transition: background 0.15s;
  }
  .mechanic-card:hover { background: #111d11; }
  .mechanic-icon {
    font-size: 2.5rem; margin-bottom: 1rem;
    display: block;
    text-align: center;
    filter: drop-shadow(0 0 6px var(--green));
  }
  .mechanic-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem; color: var(--green);
    margin-bottom: 0.75rem; line-height: 1.6;
  }
  .mechanic-desc {
    font-size: 1.15rem; color: #9ab89a; line-height: 1.6;  text-align: left;
  }

  /* CONTROLS */
  .controls-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
    margin-top: 1rem;
  }
  .control-group-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem; color: var(--cyan);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  .control-row {
    display: flex; align-items: center;
    gap: 1rem; margin-bottom: 1rem;
  }
  .key {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface);
    border: 2px solid var(--green-dim);
    border-bottom: 4px solid var(--green-dim);
    min-width: 44px; height: 44px; padding: 0 0.5rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem; color: var(--green);
    box-shadow: 0 0 8px rgba(0,255,65,0.2);
    flex-shrink: 0;
  }
  .key-arrow { font-size: 0.9rem; }
  .control-action { font-size: 1.15rem; color: #9ab89a; }

  /* SCREENSHOTS placeholder */
  .screens-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
    margin-top: 1.5rem;
  }
  .screen-placeholder {
    aspect-ratio: 4/3;
    background: var(--surface);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 0.5rem; color: var(--muted);
    font-size: 2rem;
    position: relative;
    border: 2px solid var(--green-dim);
    box-shadow: 0 0 0 1px var(--border), 0 0 18px rgba(204,136,255,0.15), inset 0 0 30px rgba(0,0,0,0.5);
    transition: box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    overflow: hidden;
  }
  .screen-placeholder::before {
    content: '';
    position: absolute; inset: 0;
    border: 4px solid var(--border2);
    pointer-events: none;
    z-index: 2;
  }
  .screen-placeholder::after {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.08) 2px,
      rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
    z-index: 3;
  }
  .screen-placeholder:hover {
    border-color: var(--green);
    box-shadow: 0 0 0 1px var(--green-dim), 0 0 28px rgba(204,136,255,0.35), inset 0 0 30px rgba(0,0,0,0.5);
  }
  .screen-placeholder span {
    font-size: 0.7rem; color: var(--muted);
    font-family: 'Press Start 2P', monospace;
    text-align: center; line-height: 1.6;
  }

  /* DOWNLOAD */
  .download-box {
    background: var(--surface);
    border: 2px solid var(--green);
    padding: 3rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(0,255,65,0.1);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
  }
  .download-box::before {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
      45deg, transparent, transparent 10px,
      rgba(0,255,65,0.02) 10px, rgba(0,255,65,0.02) 20px
    );
  }
  .download-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 2vw, 1rem);
    color: var(--green);
    margin-bottom: 1rem;
  }
  .download-desc {
    font-size: 1.3rem; color: #9ab89a;
    margin-bottom: 2rem;
  }
  .download-soon {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem; color: var(--yellow);
    margin-top: 1.5rem;
    animation: blink 1s step-end infinite;
  }

  /* SYSTEM REQ */
  .sysreq {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
    margin-top: 1rem;
  }
  .sysreq-box {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.5rem;
  }
  .sysreq-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem; color: var(--green-dim);
    margin-bottom: 1rem;
  }
  .sysreq-row {
    display: flex; justify-content: space-between;
    font-size: 1rem; color: #9ab89a;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .sysreq-row:last-child { border-bottom: none; }
  .sysreq-val { color: var(--white); text-align: right; }

  /* FOOTER */
  footer {
    border-top: 2px solid var(--green);
    padding: 2rem;
    text-align: center;
    font-size: 1rem; color: var(--muted);
  }
  footer .footer-logo {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem; color: var(--green);
    margin-bottom: 0.5rem;
  }
  footer .footer-logo span { color: var(--red); }

  /* SCROLLBAR */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--green-dim); }

  @media (max-width: 700px) {
    .controls-layout { grid-template-columns: 1fr; }
    .screens-grid { grid-template-columns: 1fr 1fr; }
    .sysreq { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; align-items: center; }
  }
  /* Global text: white, justified */
  body, p, span, div, li, a, h1, h2, h3, h4, h5, h6, label, td, th {
    color: #ffffff;
    text-align: left;
  }


/* ========================= */
/* 📱 RESPONSIVE MOBILE FIX  */
/* ========================= */

@media (max-width: 700px) {

  body {
    font-size: 1.2rem;
  }

  /* NAV */
  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  /*Submenu base (oculto) */
  .nav-submenu {
    display: none;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    margin-top: 0.5rem;
  }

  /* desactivar hover en móvil */
  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu {
    display: none;
  }

  /*Activación por click (JS) */
  .nav-dropdown.active .nav-submenu {
    display: block;
  }

  section p {
    text-align: left;
  }

  /* HERO */
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 12px;
  }

  .hero-desc {
    font-size: 1.1rem;
  }

  /* BOTONES */
  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  /* IMÁGENES */
  img {
    max-width: 100%;
    height: auto;
  }

  /* GRIDS */
  .mechanics-grid {
    grid-template-columns: 1fr;
  }

  .screens-grid {
    grid-template-columns: 1fr;
  }

  .controls-layout {
    grid-template-columns: 1fr;
  }

  .sysreq {
    grid-template-columns: 1fr;
  }

  /* TABLA CONTROLES */
  .ctrl-table {
    display: block;
    overflow-x: auto;
  }

  section {
    padding: 3rem 1rem;
  }
}

@media (max-width: 700px) {

  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu {
    display: none !important;
  }

  .nav-dropdown.active .nav-submenu {
    display: block !important;
  }

}

/* ========================= */
/* 📱 MENU HAMBURGUESA FIX */
/* ========================= */

.nav-toggle {
  display: none;
  font-size: 2rem;
  color: var(--green);
  cursor: pointer;
  z-index: 101;
}

/* MÓVIL */
@media (max-width: 700px) {

  /*Mostrar botón */
  .nav-toggle {
    display: block;
  }

  /* dejar nav horizontal */
  nav {
    flex-direction: row;
    align-items: center;
  }

  /* ocultar menú por defecto */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--bg);
    position: absolute;
    top: 60px;
    left: 0;
    padding: 1rem 0;
    border-bottom: 2px solid var(--green);
  }

  /* mostrar cuando activo */
  .nav-links.active {
    display: flex;
  }
  .story-text {
    text-align: left;
  }
}

  /* ========================= */
  /* CURSOR SOLO EN DESKTOP */
  /* ========================= */

  /* Solo mostrar cursor en dispositivos con ratón */
  @media (hover: hover) and (pointer: fine) {
    body.custom-cursor-enabled {
      cursor: none;
    }

    body.custom-cursor-enabled .cursor {
      opacity: 1;
    }
  }

  /* Ocultar en móvil */
  @media (hover: none) and (pointer: coarse) {
    .cursor {
      display: none;
    }
  }
