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

:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.8);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-black: #1e293b;
    --accent-white: #f1f5f9;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: var(--surface-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hud h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#turn-status {
    font-size: 1rem;
    color: var(--text-secondary);
}

.scores {
    display: flex;
    gap: 0.75rem;
}

.score {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: bold;
    font-size: 1rem;
    min-width: 2.5rem;
    text-align: center;
}

.score.black {
    background-color: var(--accent-black);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score.white {
    background-color: var(--accent-white);
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

#board-container {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    position: relative;
    touch-action: none;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: var(--surface-color);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.controls button {
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.hidden {
    display: none !important;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.modal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.modal-content button {
    padding: 0.75rem 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modal-content button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .hud {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .status-bar {
        width: 100%;
        justify-content: space-between;
    }
    
    .controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hint {
        text-align: center;
    }
}
