:root {
    --bg: #08080d;
    --surface: #111118;
    --accent: #00ff88;
    --accent-dim: rgba(0,255,136,0.12);
    --text-primary: #e8e8ec;
    --text-muted: #5a5a6e;
    --border: rgba(255,255,255,0.06);
    --glow: 0 0 40px rgba(0,255,136,0.2), 0 0 80px rgba(0,255,136,0.06);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
      0deg, transparent, transparent 2px,
      rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 4px
    );
    pointer-events: none;
    z-index: 100;
  }

  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      radial-gradient(ellipse at 30% 20%, rgba(0,255,136,0.04) 0%, transparent 60%),
      radial-gradient(ellipse at 70% 80%, rgba(0,100,255,0.03) 0%, transparent 50%),
      linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 80px 80px, 80px 80px;
    pointer-events: none;
    z-index: -1;
  }

  .page {
    width: 100%;
    max-width: 700px;
    padding: 2rem 1.5rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeDown 0.8s ease both;
  }

  .brand {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.6em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    opacity: 0.7;
  }

  .header-title {
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #fff 20%, var(--accent) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .header-line {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: 1.2rem auto 0;
    opacity: 0.4;
  }

  .device-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-top: 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255,255,255,0.02);
    animation: fadeDown 0.8s ease 0.15s both;
  }

  .device-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(0,255,136,0.6);
    animation: pulse 2s ease infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  .game-group {
    margin-bottom: 2rem;
    animation: fadeUp 0.6s ease 0.25s both;
  }

  .group-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-left: 2px;
  }

  .group-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 8px rgba(0,255,136,0.3));
  }

  .group-title {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--text-primary);
  }

  .group-count {
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    padding: 2px 10px;
    border: 1px solid rgba(0,255,136,0.25);
    border-radius: 10px;
    background: rgba(0,255,136,0.08);
  }

  .group-body {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.01);
  }

  .group-body .game-card {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }

  .group-body .game-card:last-child {
    border-bottom: none;
  }

  .section-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.5em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    padding-left: 2px;
    animation: fadeUp 0.6s ease 0.25s both;
  }

  .game-card {
    display: block;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    margin-bottom: 1rem;
  }

  .game-card:nth-child(1) { animation: fadeUp 0.7s ease 0.3s both; }
  .game-card:nth-child(2) { animation: fadeUp 0.7s ease 0.42s both; }

  .game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,255,136,0.06) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
  }

  .game-card::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0,255,136,0.25);
    box-shadow: var(--glow), 0 20px 60px rgba(0,0,0,0.4);
  }

  .game-card:hover::before,
  .game-card:hover::after { opacity: 1; }

  .game-card:hover .game-play {
    background: var(--accent);
    color: var(--bg);
    letter-spacing: 0.18em;
  }

  .game-card:hover .game-icon {
    transform: scale(1.08);
    filter: drop-shadow(0 0 25px rgba(0,255,136,0.4));
  }

  .game-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .game-icon {
    font-size: 3rem;
    flex-shrink: 0;
    transition: all 0.5s ease;
    filter: drop-shadow(0 0 12px rgba(0,255,136,0.25));
  }

  .game-info { flex: 1; }

  .game-tag {
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.35em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
  }

  .game-name {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
    letter-spacing: 0.03em;
  }

  .game-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .game-play {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    padding: 0.7rem 1.6rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: rgba(0,255,136,0.2);
    border-style: solid;
    transition: border-color 0.4s ease;
  }
  .game-card:hover .corner { border-color: var(--accent); }
  .corner.tl { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
  .corner.br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

  .mp-badge {
    display: inline-block;
    font-family: 'Orbitron', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(0,255,136,0.15);
    color: var(--accent);
    border: 1px solid rgba(0,255,136,0.3);
    margin-left: 0.5rem;
    vertical-align: middle;
  }

  .switch-row {
    text-align: center;
    margin-top: 0.5rem;
    animation: fadeUp 0.6s ease 0.55s both;
  }

  .switch-link {
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: none;
    display: inline-block;
  }

  .switch-link:hover {
    color: var(--accent);
    border-color: rgba(0,255,136,0.3);
    background: rgba(0,255,136,0.05);
  }

  .footer {
    margin-top: auto;
    padding-top: 3rem;
    text-align: center;
    animation: fadeUp 0.6s ease 0.65s both;
  }

  .footer p {
    font-family: 'Orbitron', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.4em;
    color: var(--text-muted);
    opacity: 0.35;
  }

  @keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @media (max-width: 540px) {
    .page { padding: 1.5rem 1rem 2rem; }
    .game-inner { flex-direction: column; text-align: center; gap: 1rem; }
    .game-card { padding: 1.8rem 1.5rem; }
    .game-icon { font-size: 2.8rem; }
    .game-name { font-size: 1.3rem; }
    .game-play { margin-top: 0.3rem; }
  }
