@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=Source+Sans+3:wght@300;400;600;700&display=swap');

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

:root {
  --matrix: #00ff41;
  --matrix-dim: #0a7a28;
  --black: #050a05;
  --panel: #0a120a;
  --border: #0d2a0d;
  --txt: #8aad8a;
  --txt-dim: #4a6a4a;
  --amber: #ffb300;
}

html { scroll-behavior: smooth; }
body { font-family: 'Source Sans 3', sans-serif; background: var(--black); color: var(--txt); line-height: 1.75; }
h1, h2, h3, h4 { font-family: 'Audiowide', sans-serif; }
a { color: var(--matrix); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--amber); }

/* HEADER */
.mx-header {
  position: fixed; top: 0; width: 100%; z-index: 1000; height: 60px;
  background: rgba(5,10,5,0.95); border-bottom: 1px solid var(--matrix-dim);
  display: flex; align-items: center; justify-content: space-between; padding: 0 2rem;
}
.mx-logo { display: flex; align-items: center; gap: 8px; }
.mx-logo svg { width: 28px; height: 28px; }
.mx-logo span { font-family: 'Audiowide', sans-serif; font-size: 1rem; color: var(--matrix); letter-spacing: 2px; }
.mx-nav { display: flex; gap: 1.5rem; list-style: none; }
.mx-nav a { color: var(--txt-dim); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.mx-nav a:hover, .mx-nav a.on { color: var(--matrix); }
.mx-btn { display: none; background: none; border: none; cursor: pointer; }
.mx-btn span { display: block; width: 22px; height: 2px; background: var(--matrix); margin: 4px 0; }

/* TERMINAL HERO */
.term-hero {
  padding: 90px 2rem 4rem; max-width: 1200px; margin: 0 auto;
}
.term-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 2rem;
  font-family: 'Source Sans 3', monospace;
}
.term-bar { display: flex; gap: 6px; margin-bottom: 1.5rem; }
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot:nth-child(1) { background: #ff5f56; }
.term-dot:nth-child(2) { background: #ffbd2e; }
.term-dot:nth-child(3) { background: #27c93f; }
.term-hero h1 { font-size: 2.4rem; color: var(--matrix); margin-bottom: 1rem; }
.term-hero h1 .blink { animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.term-hero p { color: var(--txt); margin-bottom: 1.5rem; max-width: 700px; }
.term-tags { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.mtag { border: 1px solid var(--matrix-dim); color: var(--matrix); padding: 0.35rem 1rem; font-size: 0.78rem; font-weight: 600; border-radius: 4px; font-family: 'Source Sans 3', monospace; }

/* GAME */
.gm-sec { max-width: 960px; margin: 3rem auto; padding: 0 2rem; }
.gm-sec h2 { text-align: center; font-size: 1.6rem; color: var(--matrix); margin-bottom: 1.2rem; }
.gm-frame {
  width: 100%; padding-top: 64%; position: relative; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--matrix-dim); box-shadow: 0 0 20px rgba(0,255,65,0.08);
}
.gm-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* CARD GRID */
.cg {
  max-width: 1100px; margin: 3rem auto; padding: 0 2rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.gc {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem;
  transition: 0.3s; position: relative;
}
.gc::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--matrix); transition: width 0.3s; }
.gc:hover::after { width: 100%; }
.gc:hover { border-color: var(--matrix-dim); }
.gc .ic { font-size: 1.8rem; margin-bottom: 0.6rem; }
.gc h3 { font-size: 0.9rem; color: var(--matrix); margin-bottom: 0.4rem; }
.gc p { font-size: 0.82rem; color: var(--txt-dim); }

/* DATA SECTION */
.data-sec {
  background: var(--panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 3.5rem 2rem; margin: 3rem 0;
}
.data-sec h2 { text-align: center; font-size: 1.6rem; color: var(--matrix); margin-bottom: 1rem; }
.data-sec p { max-width: 800px; margin: 0 auto 1rem; color: var(--txt-dim); text-align: center; }

/* PAGE */
.pgc { max-width: 860px; margin: 0 auto; padding: 100px 2rem 4rem; }
.pgc h1 { font-size: 1.8rem; color: var(--matrix); margin-bottom: 1rem; }
.pgc h3 { font-size: 1rem; color: var(--amber); margin: 1.8rem 0 0.5rem; }
.pgc p { color: var(--txt-dim); margin-bottom: 0.9rem; }
.pgc ul { margin: 0.6rem 0 1rem 1.5rem; }
.pgc li { color: var(--txt-dim); margin-bottom: 0.3rem; }

/* PLAY */
.pl-hd { padding: 90px 2rem 1.5rem; text-align: center; }
.pl-hd h1 { font-size: 1.8rem; color: var(--matrix); margin-bottom: 0.5rem; }
.pl-hd p { color: var(--txt-dim); max-width: 560px; margin: 0 auto; }
.pl-note {
  max-width: 660px; margin: 2rem auto; background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.2rem 1.5rem;
}
.pl-note h3 { color: var(--matrix); font-size: 0.9rem; margin-bottom: 0.4rem; }
.pl-note li { color: var(--txt-dim); font-size: 0.82rem; margin-bottom: 0.2rem; }

/* FOOTER */
.mx-footer {
  background: var(--panel); border-top: 1px solid var(--border);
  padding: 2.5rem 2rem; text-align: center; margin-top: 3rem;
}
.mxf-nav { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mxf-nav a { color: var(--txt-dim); font-size: 0.82rem; }
.mxf-resp { margin-bottom: 1rem; }
.mxf-resp p { font-size: 0.78rem; color: var(--txt-dim); margin-bottom: 0.3rem; }
.mxf-resp a { color: var(--matrix); font-size: 0.78rem; margin: 0 0.4rem; }
.mxf-cp { font-size: 0.7rem; color: var(--txt-dim); opacity: 0.4; }

/* AGE */
.age-layer {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5,10,5,0.97); display: flex; align-items: center; justify-content: center;
}
.age-layer.dismissed { display: none; }
.age-term {
  background: var(--panel); border: 1px solid var(--matrix); border-radius: 8px;
  padding: 2rem; text-align: center; max-width: 400px; width: 90%;
}
.age-term h2 { font-size: 1.2rem; color: var(--matrix); margin-bottom: 0.6rem; }
.age-term p { color: var(--txt-dim); margin-bottom: 1.2rem; font-size: 0.88rem; }
.age-acts { display: flex; gap: 0.8rem; justify-content: center; }
.age-acts button {
  padding: 0.6rem 1.8rem; border: 1px solid var(--matrix); border-radius: 4px;
  font-family: 'Audiowide', sans-serif; font-size: 0.85rem; cursor: pointer; transition: 0.3s;
}
.ag-y { background: var(--matrix); color: var(--black); border-color: var(--matrix); }
.ag-y:hover { background: var(--amber); border-color: var(--amber); }
.ag-n { background: transparent; color: var(--txt-dim); }
.ag-n:hover { background: #450a0a; color: #fca5a5; border-color: #dc2626; }

@media (max-width: 768px) {
  .mx-btn { display: block; }
  .mx-nav {
    position: fixed; top: 60px; left: 0; width: 100%; background: rgba(5,10,5,0.98);
    flex-direction: column; padding: 1.5rem 2rem; gap: 1rem;
    transform: translateX(-100%); transition: 0.3s; border-bottom: 1px solid var(--matrix-dim);
  }
  .mx-nav.open { transform: translateX(0); }
  .term-hero h1 { font-size: 1.6rem; }
  .cg { grid-template-columns: 1fr; }
  .gm-frame { padding-top: 75%; }
}
