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

body {
    overflow: hidden;
    background-color: #222;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through to canvas by default */
    display: flex;
    justify-content: center;
    align-items: center;
}

.panel {
    background: rgba(0, 0, 0, 0.85);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #555;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    pointer-events: auto; /* Enable clicks on panels */
}

h1, h2 {
    margin-bottom: 20px;
    color: #ffd700;
}

button {
    display: block;
    width: 100%;
    padding: 10px 20px;
    margin: 10px 0;
    font-size: 18px;
    background: #444;
    color: white;
    border: 1px solid #666;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #666;
}

.hidden {
    display: none !important;
}

#game-info {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#game-info h2 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

#turn-indicator {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

#game-info button {
    margin-top: 15px;
    padding: 5px 10px;
    font-size: 1rem;
}

.red {
    color: #ff4444;
    font-weight: bold;
}

.black {
    color: #4444ff;
    font-weight: bold;
}

#game-status {
    color: #ffaa00;
    font-weight: bold;
    min-height: 20px;
}