* {
    box-sizing: border-box;
    user-select: none;
    font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: #008080;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.window {
    background-color: #c0c0c0;
    border: 3px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 4px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
}

.title-bar {
    background-color: #000080;
    color: #ffffff;
    font-weight: bold;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.title-bar button {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
    font-weight: bold;
    padding: 1px 6px;
}

.title-bar button:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.game-container {
    display: flex;
    gap: 10px;
    padding: 6px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 155px;
}

.panel {
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    background-color: #b0b0b0;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.panel-label {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px;
}

.stats {
    align-items: flex-start;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.5;
}

.win-btn {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 7px;
    font-weight: bold;
    cursor: pointer;
}

.win-btn:active:not(:disabled) {
    border-color: #808080 #ffffff #ffffff #808080;
}

.win-btn:disabled {
    color: #707070;
    cursor: not-allowed;
}

.btn-primary {
    color: #005a00;
}

.board-wrapper {
    position: relative;
    border: 3px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

canvas {
    display: block;
    background-color: #2b2b2b;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay.hidden {
    display: none;
}

.dialog {
    background: #c0c0c0;
    border: 3px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 20px;
    text-align: center;
    min-width: 240px;
    max-width: 340px;
}

.dialog h2 {
    margin-top: 0;
    color: #000080;
}