
  * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
  body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    padding: 20px;
    overflow-x: hidden;
  }
  .container { max-width: 900px; margin: 0 auto; }
  header {
    text-align: center;
    padding: 30px 0;
  }
  h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #00f2fe, #4facfe, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
  }
  .subtitle { color: #aaa; font-size: 1.1rem; }

  .menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
  }
  .game-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
  }
  .game-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
    border-color: #4facfe;
  }
  .game-card .icon { font-size: 3rem; margin-bottom: 15px; }
  .game-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
  .game-card p { color: #bbb; font-size: 0.9rem; }

  .screen { display: none; }
  .screen.active { display: block; animation: fadeIn 0.4s; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

  .back-btn {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: all 0.2s;
  }
  .back-btn:hover { background: rgba(255,255,255,0.2); }

  .game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .game-title { font-size: 1.8rem; }
  .stats { display: flex; gap: 15px; font-size: 1rem; }
  .stat { background: rgba(255,255,255,0.08); padding: 8px 15px; border-radius: 8px; }

  .btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #0f0c29;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.2s;
  }
  .btn:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(79,172,254,0.4); }

  /* Крестики-нолики */
  .ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 8px;
    margin: 20px auto;
    width: fit-content;
  }
  .ttt-cell {
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }
  .ttt-cell:hover:not(.filled) { background: rgba(255,255,255,0.15); }
  .ttt-cell.x { color: #4facfe; }
  .ttt-cell.o { color: #f093fb; }
  .ttt-cell.win { background: rgba(0,242,254,0.3); border-color: #00f2fe; }
  .status { text-align: center; font-size: 1.2rem; margin: 15px 0; min-height: 30px; }

  /* 2048 */
  .g2048-board {
    display: grid;
    grid-template-columns: repeat(4, 80px);
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 12px;
    margin: 20px auto;
    width: fit-content;
  }
  .tile {
    width: 80px; height: 80px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    background: rgba(255,255,255,0.05);
    transition: all 0.15s;
  }
  .tile[data-v="2"] { background: #eee4da; color: #776e65; }
  .tile[data-v="4"] { background: #ede0c8; color: #776e65; }
  .tile[data-v="8"] { background: #f2b179; color: #fff; }
  .tile[data-v="16"] { background: #f59563; color: #fff; }
  .tile[data-v="32"] { background: #f67c5f; color: #fff; }
  .tile[data-v="64"] { background: #f65e3b; color: #fff; }
  .tile[data-v="128"] { background: #edcf72; color: #fff; font-size: 1.4rem; }
  .tile[data-v="256"] { background: #edcc61; color: #fff; font-size: 1.4rem; }
  .tile[data-v="512"] { background: #edc850; color: #fff; font-size: 1.4rem; }
  .tile[data-v="1024"] { background: #edc53f; color: #fff; font-size: 1.2rem; }
  .tile[data-v="2048"] { background: #edc22e; color: #fff; font-size: 1.2rem; }
  .hint { text-align: center; color: #aaa; margin-top: 10px; font-size: 0.9rem; }

  /* Пятнашки */
  .p15-board {
    display: grid;
    grid-template-columns: repeat(4, 75px);
    gap: 6px;
    margin: 20px auto;
    width: fit-content;
  }
  .p15-tile {
    width: 75px; height: 75px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #0f0c29;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
  }
  .p15-tile:hover { transform: scale(1.05); }
  .p15-tile.empty { background: transparent; cursor: default; }
  .p15-tile.empty:hover { transform: none; }

  /* Memory */
  .mem-board {
    display: grid;
    grid-template-columns: repeat(4, 80px);
    gap: 10px;
    margin: 20px auto;
    width: fit-content;
  }
  .mem-card {
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s;
    transform-style: preserve-3d;
  }
  .mem-card.flipped { background: rgba(79,172,254,0.2); border-color: #4facfe; }
  .mem-card.matched { background: rgba(0,242,254,0.25); border-color: #00f2fe; cursor: default; }
  .mem-card .face { display: none; }
  .mem-card.flipped .face, .mem-card.matched .face { display: block; }

  /* Судоку */
  .sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    gap: 2px;
    margin: 20px auto;
    width: fit-content;
    background: rgba(255,255,255,0.2);
    padding: 2px;
    border-radius: 8px;
  }
  .sudoku-cell {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
  }
  .sudoku-cell:hover { background: rgba(255,255,255,0.15); }
  .sudoku-cell.fixed { color: #4facfe; cursor: default; }
  .sudoku-cell.selected { background: rgba(0,242,254,0.3); border-color: #00f2fe; }
  .sudoku-cell.error { background: rgba(255,100,100,0.3); }
  .sudoku-cell:nth-child(3n) { border-right: 2px solid rgba(255,255,255,0.3); }
  .sudoku-cell:nth-child(9n) { border-right: 1px solid rgba(255,255,255,0.1); }
  .sudoku-cell:nth-child(n+19):nth-child(-n+27),
  .sudoku-cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid rgba(255,255,255,0.3); }
  .sudoku-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 15px 0;
  }
  .num-btn {
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
  }
  .num-btn:hover { background: rgba(79,172,254,0.3); border-color: #4facfe; }

  /* Сапёр */
  .mine-board {
    display: grid;
    gap: 2px;
    margin: 20px auto;
    width: fit-content;
    background: rgba(255,255,255,0.1);
    padding: 5px;
    border-radius: 8px;
  }
  .mine-cell {
    width: 35px; height: 35px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
  }
  .mine-cell:hover:not(.revealed) { background: rgba(255,255,255,0.25); }
  .mine-cell.revealed { background: rgba(255,255,255,0.05); cursor: default; }
  .mine-cell.mine { background: rgba(255,100,100,0.3); }
  .mine-cell.flagged::after { content: '🚩'; }
  .mine-cell[data-n="1"] { color: #4facfe; }
  .mine-cell[data-n="2"] { color: #00f2fe; }
  .mine-cell[data-n="3"] { color: #f093fb; }
  .mine-cell[data-n="4"] { color: #ff6b6b; }
  .mine-cell[data-n="5"] { color: #ffd93d; }
  .mine-cell[data-n="6"] { color: #6bcf7f; }
  .mine-cell[data-n="7"] { color: #fff; }
  .mine-cell[data-n="8"] { color: #aaa; }

  /* Быки и коровы */
  .bulls-input {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
  }
  .bulls-digit {
    width: 50px; height: 60px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    outline: none;
    transition: all 0.2s;
  }
  .bulls-digit:focus { border-color: #4facfe; background: rgba(79,172,254,0.1); }
  .bulls-history {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
  }
  .bulls-attempt {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin: 5px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
  }
  .bulls-attempt .guess { font-size: 1.3rem; font-weight: bold; color: #4facfe; }
  .bulls-attempt .result { color: #aaa; }

  @media (max-width: 500px) {
    .ttt-board { grid-template-columns: repeat(3, 80px); }
    .ttt-cell { width: 80px; height: 80px; font-size: 2.5rem; }
    .g2048-board { grid-template-columns: repeat(4, 65px); gap: 8px; }
    .tile { width: 65px; height: 65px; font-size: 1.3rem; }
    .p15-board { grid-template-columns: repeat(4, 65px); }
    .p15-tile { width: 65px; height: 65px; font-size: 1.5rem; }
    .mem-board { grid-template-columns: repeat(4, 65px); gap: 8px; }
    .mem-card { width: 65px; height: 65px; font-size: 1.6rem; }
    .sudoku-board { grid-template-columns: repeat(9, 32px); }
    .sudoku-cell { width: 32px; height: 32px; font-size: 1rem; }
    .num-btn { width: 38px; height: 38px; font-size: 1.1rem; }
    .mine-cell { width: 30px; height: 30px; font-size: 0.9rem; }
    .bulls-digit { width: 45px; height: 55px; font-size: 1.7rem; }
    h1 { font-size: 1.8rem; }
  }

