
    * { box-sizing: border-box; }
    body {
      font-family: 'Segoe UI', sans-serif;
      background: linear-gradient(135deg, #e0f7fa, #f1f8e9);
      margin: 0;
      padding: 20px;
    }

    h1 {
      text-align: center;
      margin-bottom: 10px;
      color: white;
      background: linear-gradient(45deg, #007bff, #00c6ff);
      padding: 15px 30px;
      border-radius: 15px;
      box-shadow: 0 8px 20px rgba(0,0,0,0.2);
      font-size: 2.2em;
    }

    #main-container {
      display: flex;
      justify-content: center;
      align-items: flex-start;
      gap: 40px;
      flex-wrap: wrap;
    }

    #status {
      font-size: 1.2em;
      text-align: center;
      margin: 20px 0;
      color: #333;
    }

    .card {
      padding: 20px;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 20px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.2);
      backdrop-filter: blur(5px);
      transition: transform 0.3s ease;
    }

    .card:hover {
      transform: translateY(-5px);
    }

    .super-board {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }

    .mini-board {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 3px;
      background: #ccc;
      padding: 5px;
      border-radius: 10px;
      position: relative;
      min-width: 160px;
      min-height: 160px;
    }

    .mini-board.won-x { background: #d1e7dd; }
    .mini-board.won-o { background: #f8d7da; }

    .mini-board::after {
      content: attr(data-winner);
      font-size: 4em;
      font-weight: bold;
      color: rgba(0, 0, 0, 0.1);
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      pointer-events: none;
    }

    .cell {
      width: 50px;
      height: 50px;
      background: white;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 1.5em;
      cursor: pointer;
      border-radius: 6px;
      transition: transform 0.2s ease;
    }

    .cell:hover:not(.disabled) {
      background: #f0f0f0;
      transform: scale(1.05);
    }

    .cell.disabled {
      pointer-events: none;
      background: #eee;
    }

    .mini-board.active {
      outline: 3px solid #007bff;
    }

    

    .modal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.5);
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }

    .modal-content {
      background: white;
      padding: 30px;
      border-radius: 10px;
      text-align: center;
      box-shadow: 0 10px 25px rgba(0,0,0,0.2);
      position: relative;
    }

    .modal-content h2 {
      margin-bottom: 20px;
    }

    button {
      margin: 10px 5px;
      padding: 10px 20px;
      font-size: 1em;
      background: #007bff;
      color: white;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      transition: background 0.3s ease;
    }

    button:hover {
      background: #0056b3;
    }

    .confetti {
      position: absolute;
      width: 10px;
      height: 10px;
      background: red;
      animation: fall 3s linear infinite;
    }

    @keyframes fall {
      0% { transform: translateY(-100px) rotate(0); opacity: 1; }
      100% { transform: translateY(800px) rotate(360deg); opacity: 0; }
    }

    .rules {
      max-width: 300px;
      background: #fff;
      padding: 20px;
      border-radius: 15px;
      box-shadow: 0 8px 20px rgba(0,0,0,0.1);
      font-size: 0.95em;
      line-height: 1.6;
    }

    .rules h3 {
      margin-top: 0;
      color: #007bff;
    }

    @media (max-width: 800px) {
      .mini-board { min-width: 100px; min-height: 100px; }
      .cell { width: 30px; height: 30px; font-size: 1.2em; }
    }
  