        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Courier New', monospace;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: all 0.3s ease;
            overflow: hidden;
        }

        /* Theme Variables */
        .theme-lofi {
            background: linear-gradient(135deg, #2d1b45, #1a0e2e, #0f0520);
            color: #d4a574;
        }

        .theme-bw {
            background: linear-gradient(135deg, #1a1a1a, #0d0d0d, #000000);
            color: #ffffff;
        }

        .theme-cyber {
            background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #16213e);
            color: #00ffff;
        }

        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            padding: 20px;
            position: relative;
        }

        .header {
            text-align: center;
            margin-bottom: 20px;
        }

        .title {
            font-size: 2.5rem;
            font-weight: bold;
            margin-bottom: 10px;
            text-shadow: 0 0 20px currentColor;
            animation: glow 2s ease-in-out infinite alternate;
        }

        @keyframes glow {
            from { text-shadow: 0 0 20px currentColor; }
            to { text-shadow: 0 0 30px currentColor, 0 0 40px currentColor; }
        }

        .controls {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            justify-content: center;
            margin-bottom: 20px;
        }

        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-family: inherit;
            font-size: 14px;
            font-weight: bold;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
            position: relative;
            overflow: hidden;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s;
        }

        .btn:hover::before {
            left: 100%;
        }

        .theme-lofi .btn {
            background: rgba(212, 165, 116, 0.2);
            color: #d4a574;
            border: 2px solid #d4a574;
        }

        .theme-lofi .btn:hover {
            background: rgba(212, 165, 116, 0.3);
            box-shadow: 0 0 20px rgba(212, 165, 116, 0.5);
        }

        .theme-bw .btn {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
            border: 2px solid #ffffff;
        }

        .theme-bw .btn:hover {
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
        }

        .theme-cyber .btn {
            background: rgba(0, 255, 255, 0.1);
            color: #00ffff;
            border: 2px solid #00ffff;
        }

        .theme-cyber .btn:hover {
            background: rgba(0, 255, 255, 0.2);
            box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
        }

        .game-setup {
            display: flex;
            flex-direction: column;
            gap: 15px;
            text-align: center;
        }

        .difficulty-select {
            display: none;
        }

        .difficulty-select.show {
            display: flex;
            gap: 10px;
            justify-content: center;
        }

        .board-container {
            display: none;
            flex-direction: row;
            align-items: flex-start;
            gap: 40px;
            justify-content: center;
        }

        .game-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .board-container.show {
            display: flex;
        }

        .game-info {
            display: flex;
            gap: 40px;
            font-size: 18px;
            font-weight: bold;
        }

        .board {
            display: grid;
            grid-template-columns: repeat(8, 80px);
            grid-template-rows: repeat(8, 80px);
            gap: 2px;
            border-radius: 12px;
            padding: 10px;
            position: relative;
        }

        .theme-lofi .board {
            background: rgba(212, 165, 116, 0.1);
            box-shadow: 0 0 30px rgba(212, 165, 116, 0.3);
        }

        .theme-bw .board {
            background: rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
        }

        .theme-cyber .board {
            background: rgba(0, 255, 255, 0.1);
            box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
        }

        .square {
            width: 80px;
            height: 80px;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.3s ease;
            position: relative;
        }

        .square.dark {
            background: #4a4a4a;
        }

        .square.light {
            background: #8a8a8a;
        }

        .theme-lofi .square.dark {
            background: #5d4e37;
        }

        .theme-lofi .square.light {
            background: #8b7355;
        }

        .theme-bw .square.dark {
            background: #2a2a2a;
        }

        .theme-bw .square.light {
            background: #6a6a6a;
        }

        .theme-cyber .square.dark {
            background: #1a2332;
        }

        .theme-cyber .square.light {
            background: #2a3442;
        }

        .square.valid-move {
            box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.5);
            animation: pulse 1s infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .square.selected {
            box-shadow: inset 0 0 30px currentColor;
        }

        .piece {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 24px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            border: 3px solid;
        }

        .piece.red {
            background: radial-gradient(circle, #ff4757, #c44569);
            border-color: #ff3742;
            color: white;
        }

        .piece.black {
            background: radial-gradient(circle, #2f3542, #1e2328);
            border-color: #404040;
            color: white;
        }

        .piece.king::before {
            content: '♔';
            position: absolute;
            font-size: 30px;
            text-shadow: 0 0 10px currentColor;
        }

        .piece:hover {
            transform: scale(1.1);
            box-shadow: 0 0 20px currentColor;
        }

        .theme-selector {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 10px;
        }

        .theme-btn {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .theme-btn.lofi {
            background: linear-gradient(45deg, #d4a574, #8b7355);
        }

        .theme-btn.bw {
            background: linear-gradient(45deg, #ffffff, #808080);
        }

        .theme-btn.cyber {
            background: linear-gradient(45deg, #00ffff, #0080ff);
        }

        .theme-btn:hover {
            transform: scale(1.2);
            box-shadow: 0 0 20px currentColor;
        }

        .theme-btn.active {
            box-shadow: 0 0 30px currentColor;
            transform: scale(1.1);
        }

        .back-btn {
            position: relative;
            top: 0;
            left: 0;
            margin-bottom: 10px;
        }

        .captured-pieces {
            display: flex;
            flex-direction: column;
            gap: 20px;
            min-width: 200px;
            padding: 20px;
            border-radius: 12px;
            height: fit-content;
        }

        .theme-lofi .captured-pieces {
            background: rgba(212, 165, 116, 0.1);
            border: 2px solid rgba(212, 165, 116, 0.3);
        }

        .theme-bw .captured-pieces {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        .theme-cyber .captured-pieces {
            background: rgba(0, 255, 255, 0.1);
            border: 2px solid rgba(0, 255, 255, 0.3);
        }

        .captured-pieces h3 {
            text-align: center;
            margin-bottom: 10px;
            font-size: 1.2rem;
        }

        .captured-section {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .captured-section h4 {
            font-size: 1rem;
            margin-bottom: 5px;
        }

        .captured-stack {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            min-height: 40px;
            padding: 10px;
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.2);
        }

        .captured-piece {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 12px;
            font-weight: bold;
            border: 2px solid;
            position: relative;
        }

        .captured-piece.red {
            background: radial-gradient(circle, #ff4757, #c44569);
            border-color: #ff3742;
            color: white;
        }

        .captured-piece.black {
            background: radial-gradient(circle, #2f3542, #1e2328);
            border-color: #404040;
            color: white;
        }

        .captured-piece.king::before {
            content: '♔';
            position: absolute;
            font-size: 16px;
        }

        .winner-message {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 30px;
            border-radius: 15px;
            text-align: center;
            font-size: 24px;
            font-weight: bold;
            display: none;
            z-index: 1000;
            animation: winnerGlow 1s ease-in-out infinite alternate;
        }

        .theme-lofi .winner-message {
            background: rgba(45, 27, 69, 0.95);
            border: 3px solid #d4a574;
            box-shadow: 0 0 50px rgba(212, 165, 116, 0.8);
        }

        .theme-bw .winner-message {
            background: rgba(26, 26, 26, 0.95);
            border: 3px solid #ffffff;
            box-shadow: 0 0 50px rgba(255, 255, 255, 0.8);
        }

        .theme-cyber .winner-message {
            background: rgba(10, 10, 10, 0.95);
            border: 3px solid #00ffff;
            box-shadow: 0 0 50px rgba(0, 255, 255, 0.8);
        }

        @keyframes winnerGlow {
            from { box-shadow: 0 0 30px currentColor; }
            to { box-shadow: 0 0 60px currentColor, 0 0 80px currentColor; }
        }

        .hidden {
            display: none !important;
        }

        /* Remove unused CSS */