﻿    .game-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      max-width: 800px;
      margin: 40px auto;
    }

    .game-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      margin-bottom: 24px;
    }

    .player-panel {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 16px;
      border-radius: var(--radius-card);
      background: var(--color-bg-card);
      border: 1px solid rgba(255, 255, 255, 0.05);
      transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
      width: 240px;
    }

    .player-panel.active {
      background: rgba(255, 255, 255, 0.08);
      transform: scale(1.05);
    }

    .player-panel--p1.active {
      border-color: var(--color-accent-cyan);
      box-shadow: 0 0 20px rgba(6, 214, 160, 0.2);
    }

    .player-panel--p2.active {
      border-color: #d946ef;
      /* Magenta */
      box-shadow: 0 0 20px rgba(217, 70, 239, 0.2);
    }

    .player-name {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1.1rem;
      margin-bottom: 8px;
    }

    .player-panel--p1 .player-name {
      color: var(--color-accent-blue);
    }

    .player-panel--p2 .player-name {
      color: #d946ef;
    }

    .teleport-btn {
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: var(--color-text);
      font-family: var(--font-body);
      padding: 8px 16px;
      border-radius: var(--radius-btn);
      cursor: pointer;
      font-size: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      transition: all var(--transition-fast);
      position: relative;
      overflow: hidden;
    }

    .teleport-btn:hover:not(:disabled) {
      background: rgba(255, 255, 255, 0.1);
    }

    .teleport-btn.active-mode {
      animation: pulse 1.5s infinite alternate;
    }

    .player-panel--p1 .teleport-btn.active-mode {
      background: rgba(56, 189, 248, 0.2);
      border-color: var(--color-accent-blue);
      box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    }

    .player-panel--p2 .teleport-btn.active-mode {
      background: rgba(217, 70, 239, 0.2);
      border-color: #d946ef;
      box-shadow: 0 0 15px rgba(217, 70, 239, 0.4);
    }

    .teleport-btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .board-wrapper {
      position: relative;
      padding: 12px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }

    .board {
      display: grid;
      grid-template-columns: repeat(8, 60px);
      grid-template-rows: repeat(8, 60px);
      border: 2px solid rgba(255, 255, 255, 0.15);
      background: var(--color-bg);
    }

    @media (max-width: 600px) {
      .board {
        grid-template-columns: repeat(8, 11vw);
        grid-template-rows: repeat(8, 11vw);
      }

      .player-panel {
        width: 140px;
      }

      .player-name {
        font-size: 0.9rem;
      }

      .teleport-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
      }
    }

    .cell {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
    }

    .cell.light {
      background: #111827;
    }

    .cell.dark {
      background: #1f2937;
    }

    .cell.highlight-move {
      background: rgba(6, 214, 160, 0.25);
      cursor: pointer;
    }

    .cell.highlight-move::after {
      content: '';
      position: absolute;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(6, 214, 160, 0.6);
      box-shadow: 0 0 10px rgba(6, 214, 160, 0.8);
      pointer-events: none;
    }

    .cell.highlight-teleport {
      background: rgba(255, 255, 255, 0.15);
      cursor: pointer;
    }

    .cell.highlight-teleport.t-p1::after {
      border-color: #38bdf8;
      box-shadow: 0 0 15px #38bdf8, inset 0 0 15px #38bdf8;
    }

    .cell.highlight-teleport.t-p2::after {
      border-color: #d946ef;
      box-shadow: 0 0 15px #d946ef, inset 0 0 15px #d946ef;
    }

    .cell.highlight-teleport::after {
      content: '';
      position: absolute;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 3px solid #fff;
      animation: pulse 1s infinite alternate;
      pointer-events: none;
      z-index: 10;
    }

    .piece {
      width: 70%;
      height: 70%;
      border-radius: 50%;
      position: relative;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
      z-index: 2;
    }

    .piece.p1 {
      background: radial-gradient(circle at 30% 30%, #7dd3fc, var(--color-accent-blue));
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(56, 189, 248, 0.5);
    }

    .piece.p2 {
      background: radial-gradient(circle at 30% 30%, #f5d0fe, #d946ef);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(217, 70, 239, 0.5);
    }

    .piece.selected {
      transform: scale(1.15);
    }

    .piece.p1.selected {
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(56, 189, 248, 0.9);
      border: 2px solid #fff;
    }

    .piece.p2.selected {
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(217, 70, 239, 0.9);
      border: 2px solid #fff;
    }

    /* Kings representation: inner glowing circle */
    .piece.king::after {
      content: '';
      position: absolute;
      width: 40%;
      height: 40%;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.8);
      box-shadow: 0 0 10px #fff;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    .teleport-fx {
      position: absolute;
      width: 100%;
      height: 100%;
      background: #fff;
      border-radius: 50%;
      z-index: 3;
      pointer-events: none;
      animation: flash 0.5s ease-out forwards;
    }

    @keyframes flash {
      0% {
        transform: scale(0.5);
        opacity: 1;
      }

      100% {
        transform: scale(2);
        opacity: 0;
      }
    }

    .back-link {
      color: #06d6a0;
      border: 1px solid rgba(6, 214, 160, 0.25);
    }

    .back-link:hover {
      background: rgba(6, 214, 160, 0.1);
      border-color: #06d6a0;
      box-shadow: 0 0 18px rgba(6, 214, 160, 0.15);
    }

    .restart-btn {
      font-family: var(--font-display);
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--color-text-muted);
      text-decoration: none;
      padding: 6px 12px;
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 4px;
      transition: all 0.2s;
      cursor: pointer;
      margin-top: 8px;
      white-space: nowrap;
    }

    .restart-btn:hover {
      color: #fff;
      border-color: #fff;
      background: rgba(255, 255, 255, 0.1);
    }

    .game-over-modal {
      display: none;
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      backdrop-filter: blur(4px);
      z-index: 10;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
    }

    .game-over-modal h2 {
      font-family: var(--font-display);
      font-size: 2rem;
      margin-bottom: 20px;
      color: #fff;
    }

    .game-over-modal button {
      background: var(--color-accent-blue);
      color: #000;
      border: none;
      padding: 12px 24px;
      font-family: var(--font-display);
      font-weight: 700;
      border-radius: var(--radius-btn);
      cursor: pointer;
      font-size: 1rem;
      transition: transform 0.2s;
    }

    .game-over-modal button:hover {
      transform: scale(1.05);
    }
