body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-container {
    width: 1200px;
    height: 800px;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#game-info {
    text-align: center;
    color: #e0e0e0;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#turn-display {
    font-size: 1.2em;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

#reset-game {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(45deg, #2980b9, #3498db);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#reset-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

#reset-game:active {
    transform: translateY(0);
}

#chess-board {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

#loading-indicator {
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 40px;
    border-radius: 10px;
    display: none;
    font-size: 1.2em;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: pulse 1.5s infinite;
}

#loading-indicator.active {
    display: block;
}

#camera-mode {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#ai-difficulty {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#game-mode-select {
    display: flex;
    gap: 10px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

#game-mode-select .mode-button {
    padding: 8px 16px;
    font-size: 0.9em;
    min-width: 100px;
}

.mode-button {
    padding: 12px 20px;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.mode-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mode-button:hover::after {
    transform: translateX(100%);
}

.mode-button.active {
    background: linear-gradient(45deg, #2980b9, #3498db);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

.difficulty-button {
    padding: 12px 20px;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.difficulty-button:hover {
    transform: translateX(-2px);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

.difficulty-button.active {
    background: linear-gradient(45deg, #2980b9, #3498db);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

#game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    display: none;
    z-index: 1000;
    backdrop-filter: blur(5px);
    border: 2px solid;
}

#game-over.win {
    border-color: #2ecc71;
}

#game-over.lose {
    border-color: #e74c3c;
}

#game-over h2 {
    color: white;
    font-size: 2em;
    margin: 0 0 20px 0;
}

#game-over button {
    padding: 10px 20px;
    font-size: 1.1em;
    background: linear-gradient(45deg, #2980b9, #3498db);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

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

#chill-out-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    display: none;
    z-index: 1000;
    backdrop-filter: blur(5px);
    border: 2px solid #e74c3c;
}

#chill-out-message h2 {
    color: white;
    font-size: 2em;
    margin: 0 0 20px 0;
}

#chill-out-message img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

#chill-out-message button {
    padding: 10px 20px;
    font-size: 1.1em;
    background: linear-gradient(45deg, #2980b9, #3498db);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

#chill-out-message button:hover {
    transform: scale(1.05);
}

#perfect-button-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
}

#perfect-button {
    padding: 10px 20px;
    background: darkgreen;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

#perfect-button:hover {
    transform: scale(1.05);
}

#perfect-video-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: none;
    z-index: 1000;
    backdrop-filter: blur(5px);
    border: 2px solid #e74c3c;
}

#perfect-video {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

#close-video-button {
    padding: 10px 20px;
    font-size: 1.1em;
    background: linear-gradient(45deg, #2980b9, #3498db);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

#close-video-button:hover {
    transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 1280px) {
    #game-container {
        width: 90vw;
        height: 90vh;
    }
}

@media (max-width: 768px) {
    #camera-mode {
        left: 50%;
        bottom: 20px;
        top: auto;
        transform: translateX(-50%);
        flex-direction: row;
    }

    #ai-difficulty {
        right: 50%;
        bottom: 20px;
        top: auto;
        transform: translateX(50%);
        flex-direction: row;
    }
}
