    :root {
      /* Green Chalkboard Theme (Default) */
      --board-bg: #1e3b2b;
      --board-texture: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.3) 100%);
      --chalk-white: #f8f9fa;
      --chalk-yellow: #fff3a0;
      --chalk-green: #a8ffb2;
      --chalk-blue: #9ee2ff;
      --chalk-orange: #ffd09e;
      --chalk-pink: #ffb3d9;
      --chalk-purple: #e3bfff;
      --chalk-dim: rgba(248, 249, 250, 0.4);
      --wood-border: #5c3a21;
      --wood-inner: #3d2312;
      --font-chalk-heading: 'Fredericka the Great', cursive;
      --font-chalk-hand: 'Cabin Sketch', cursive;
      --font-chalk-sub: 'Patrick Hand', cursive;
    }

    [data-theme="dark"] {
      /* Black Chalkboard Theme */
      --board-bg: #17181c;
      --board-texture: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.5) 100%);
      --wood-border: #3a2213;
      --wood-inner: #241308;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
    }

    body {
      background-color: #0b0d0e;
      background-image: repeating-linear-gradient(45deg, #111 0, #111 10px, #0b0d0e 10px, #0b0d0e 20px);
      color: var(--chalk-white);
      font-family: var(--font-chalk-sub);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 1.5rem;
      overflow-x: hidden;
    }

    /* Wooden Blackboard Frame Outer Container */
    .board-frame {
      width: 100%;
      max-width: 1100px;
      background: var(--wood-border);
      border: 6px solid var(--wood-inner);
      border-radius: 16px;
      padding: 18px;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.8);
      position: relative;
    }

    /* Chalkboard Surface */
    .blackboard {
      background-color: var(--board-bg);
      background-image: var(--board-texture);
      border-radius: 8px;
      border: 3px dashed rgba(255, 255, 255, 0.15);
      padding: 1.75rem;
      box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    /* Chalk Dust Overlay */
    .blackboard::before {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02), rgba(255,255,255,0.02) 2px, transparent 2px, transparent 4px);
      pointer-events: none;
      opacity: 0.7;
    }

    /* Header Bar */
    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 2px dashed var(--chalk-dim);
      padding-bottom: 1rem;
      position: relative;
      z-index: 2;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-family: var(--font-chalk-heading);
      font-size: 1.8rem;
      letter-spacing: 2px;
      text-decoration: none;
      color: var(--chalk-white);
      text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.4), 0 0 2px var(--chalk-white);
    }

    .brand-icon {
      width: 18px;
      height: 18px;
      background-color: var(--chalk-yellow);
      display: inline-block;
      transform: rotate(-8deg);
      box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    }

    .controls-right {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    /* Eraser Theme Button */
    .eraser-btn {
      background: #c29b68;
      border: 2px solid #5c3a21;
      border-bottom: 6px solid #3d2312;
      color: #2b1a0e;
      padding: 0.35rem 0.8rem;
      border-radius: 6px;
      cursor: pointer;
      font-family: var(--font-chalk-hand);
      font-size: 1rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      box-shadow: 0 4px 10px rgba(0,0,0,0.4);
      text-decoration: none;
    }

    .eraser-btn:active {
      transform: translateY(3px);
      border-bottom-width: 3px;
    }

    /* Game Wrapper */
    .game-card-wrapper {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1.25rem;
      width: 100%;
      position: relative;
      z-index: 2;
    }

    .status-panel {
      display: flex;
      justify-content: space-between;
      width: 100%;
      align-items: center;
      font-family: var(--font-chalk-hand);
      font-size: 1.4rem;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .room-badge {
      border: 1.5px dashed var(--chalk-pink);
      color: var(--chalk-pink);
      padding: 0.15rem 0.6rem;
      border-radius: 20px;
      font-size: 1.1rem;
      margin-left: 0.5rem;
    }

    #turnStatus {
      color: var(--chalk-yellow);
      text-shadow: 0 0 3px var(--chalk-yellow);
    }

    .panel-controls {
      display: flex;
      gap: 0.6rem;
      flex-wrap: wrap;
    }

    .action-btn {
      background: rgba(255, 255, 255, 0.05);
      color: var(--chalk-white);
      border: 2px solid var(--chalk-green);
      border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
      padding: 0.35rem 0.8rem;
      cursor: pointer;
      font-family: var(--font-chalk-hand);
      font-size: 1.1rem;
      transition: all 0.2s ease;
    }

    .action-btn:hover {
      background: rgba(168, 255, 178, 0.2);
      transform: scale(1.04);
    }

    /* Desk Canvas Frame */
    #gameCanvas {
      background-color: #ba8c59;
      border: 10px solid #523821;
      border-radius: 8px;
      box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.5), 0 10px 20px rgba(0,0,0,0.5);
      cursor: crosshair;
      touch-action: none;
      max-width: 100%;
    }

    .instructions {
      font-family: var(--font-chalk-sub);
      font-size: 1.1rem;
      color: var(--chalk-white);
      opacity: 0.9;
      text-align: center;
    }

    /* Chalk Style Modals */
    .modal-overlay {
      display: none;
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(3px);
      border-radius: 8px;
      justify-content: center;
      align-items: center;
      z-index: 100;
    }

    .modal-card {
      background-color: var(--board-bg);
      background-image: var(--board-texture);
      border: 3px dashed var(--chalk-yellow);
      border-radius: 12px;
      padding: 2rem;
      width: 90%;
      max-width: 440px;
      text-align: center;
      display: flex;
      flex-direction: column;
      gap: 1.2rem;
      box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }

    .modal-title {
      font-family: var(--font-chalk-heading);
      font-size: 2rem;
      color: var(--chalk-yellow);
      letter-spacing: 2px;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      text-align: left;
    }

    .form-group label {
      font-family: var(--font-chalk-hand);
      font-size: 1.2rem;
      color: var(--chalk-white);
    }

    .form-group select, .form-group input {
      padding: 0.5rem 0.75rem;
      border-radius: 6px;
      border: 2px solid var(--chalk-white);
      background: rgba(0, 0, 0, 0.3);
      color: var(--chalk-green);
      font-family: var(--font-chalk-hand);
      font-size: 1.2rem;
      outline: none;
    }

    .modal-actions {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
    }

    .modal-btn {
      flex: 1;
      padding: 0.6rem 1rem;
      border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
      font-family: var(--font-chalk-hand);
      font-size: 1.2rem;
      cursor: pointer;
      border: 2px solid var(--chalk-white);
      background: transparent;
      color: var(--chalk-white);
      transition: all 0.2s ease;
    }

    .primary-btn {
      border-color: var(--chalk-green);
      color: var(--chalk-green);
    }

    .primary-btn:hover {
      background: rgba(168, 255, 178, 0.2);
    }

    .secondary-btn:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .toast {
      position: fixed;
      bottom: 25px;
      left: 50%;
      transform: translateX(-50%);
      background: #c29b68;
      color: #2b1a0e;
      border: 2px solid #5c3a21;
      padding: 0.6rem 1.4rem;
      border-radius: 20px;
      font-family: var(--font-chalk-hand);
      font-size: 1.2rem;
      font-weight: 700;
      box-shadow: 0 4px 15px rgba(0,0,0,0.6);
      display: none;
      z-index: 200;
    }

    /* Wooden Tray at Bottom Frame */
    .chalk-tray {
      height: 18px;
      background: #4a2e18;
      border-top: 3px solid #2b1a0e;
      border-radius: 0 0 8px 8px;
      position: relative;
      display: flex;
      align-items: center;
      padding: 0 20px;
      gap: 15px;
    }

    .chalk-piece {
      width: 35px;
      height: 8px;
      border-radius: 3px;
      box-shadow: 1px 2px 3px rgba(0,0,0,0.5);
    }
