        :root {
            --primary: #2c3e50;
            --secondary: #34495e;
            --accent: #e74c3c;
            --light: #ecf0f1;
            --dark: #2c3e50;
            --highlight: #3498db;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 20px;
        }

        .chess-header {
            grid-column: 1 / -1;
            text-align: center;
            margin-bottom: 20px;
        }

        .chess-header h1 {
            font-size: 2.5rem;
            margin: 0;
            background: linear-gradient(to right, #f1c40f, #e74c3c);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .chess-header p {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        #board {
            width: 600px;
            height: 600px;
            margin: 0 auto;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            border-radius: 8px;
            overflow: hidden;
            touch-action: none;
        }

        .panel {
            background: rgba(255,255,255,0.1);
            backdrop-filter: blur(10px);
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            height: fit-content;
        }

        .timer-container {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        .timer {
            background: rgba(0,0,0,0.3);
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            width: 45%;
            font-size: 1.5rem;
            font-weight: bold;
        }

        .timer.active {
            box-shadow: 0 0 15px var(--highlight);
        }

        .timer-label {
            font-size: 0.9rem;
            opacity: 0.7;
            margin-bottom: 5px;
        }

        .controls {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 20px;
        }

        button {
            background: var(--accent);
            color: white;
            border: none;
            padding: 12px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s;
            -webkit-tap-highlight-color: transparent;
        }

        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
        }

        button.secondary {
            background: var(--secondary);
        }

        .game-info {
            margin-top: 0px;
        }

        .game-info h3,.ai-settings h3 {
            margin: 0;
            border-bottom: 1px solid rgba(255,255,255,0.2);
            padding: 0px;
            font-family: math;
        }

        #move-history {
            height: 150px;
            max-height: 150px;
            overflow-y: auto;
            background: rgba(0,0,0,0.2);
            padding: 10px;
            border-radius: 5px;
            font-family: monospace;
        }

        .ai-settings {
            margin-top: 0px;
        }

        select, input {
            width: 100%;
            padding: 10px;
            margin-bottom: 10px;
            border-radius: 5px;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
        }

        input{
         width: inherit;
        }

        select option {
            background: var(--light);
        }

        .status {
            margin-top: 20px;
            padding: 10px;
            border-radius: 5px;
            text-align: center;
            font-weight: bold;
        }

        .thinking {
            color: #f1c40f;
        }

        .check {
            color: #e74c3c;
        }

        .game-over {
            color: #2ecc71;
            font-size: 1.2rem;
        }

        .score-display {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
            padding: 10px;
            background: rgba(0,0,0,0.2);
            border-radius: 5px;
        }

        .score-box {
            text-align: center;
            flex: 1;
        }

        .score-label {
            font-size: 0.8rem;
            opacity: 0.7;
        }

        .score-value {
            font-size: 1.2rem;
            font-weight: bold;
        }

        .saved-games {
            margin-top: 20px;
        }

        .saved-game {
            background: rgba(255,255,255,0.1);
            padding: 10px;
            margin-bottom: 10px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .saved-game:hover {
            background: rgba(255,255,255,0.2);
        }

        .saved-game-title {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .saved-game-info {
            font-size: 0.8rem;
            opacity: 0.8;
        }

        @media (max-width: 900px) {
            .container {
                grid-template-columns: 1fr;
            }

            #board {
                width: 90vw;
                height: 90vw;
                max-width: 400px;
                max-height: 400px;
            }

            .panel {
                margin-top: 20px;
            }
        }

        /* Prevent text selection on pieces */
        .piece {
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }

.status.paused {
    color: #ffbb33;
    font-weight: bold;
}

.status.stopped {
    color: #ff4444;
    font-weight: bold;
}