/* Treehom game — page specific styles */

.th-game {
    margin: 28px auto 10px auto;
    padding: 18px 18px 14px 18px;
    border-radius: 12px;
    background: var(--surface, #17171a);
    border: 1px solid var(--border, #2a2a2f);
    
}

.th-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 14px;
}

.th-button {
    font-family: inherit;
    font-size: 16px;
    color: #0b0b0c;
    background: var(--accent, #ff7a18);
    border: none;
    border-radius: 10px;
    padding: 9px 16px;
    cursor: pointer;
    
    transition: transform 0.08s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.th-button:hover {
    filter: brightness(1.06);
    background: var(--accent-soft, #ffa14a);
}

.th-button:active {
    transform: translateY(1px);
    
}

.th-button kbd {
    font-family: inherit;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 1px 6px;
    margin-left: 6px;
}

.th-stat {
    font-size: 15px;
    color: var(--text-faint, #74747c);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.th-stat b {
    font-family: 'Roboto Slab';
    font-weight: normal;
    font-size: 17px;
    color: var(--text, #e8e8ea);
    margin-left: 6px;
}

.th-board {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.th-board canvas {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: auto;
    touch-action: manipulation;
    cursor: pointer;
}

.th-win {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(11, 11, 12, 0.78);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.th-win.visible {
    opacity: 1;
    pointer-events: auto;
}

.th-win-title {
    font-family: 'Roboto Slab';
    font-size: 2em;
    color: var(--accent, #ff7a18);
    text-shadow: 0 0 30px rgba(255, 122, 24, 0.45);
}

.th-win-sub {
    color: var(--text-muted, #a1a1a8);
}

.th-help {
    margin: 14px 2px 0 2px;
    font-size: 15px;
    color: var(--text-muted, #a1a1a8);
}

.th-help .th-key {
    font-family: inherit;
    font-size: 13px;
    background: var(--surface-2, #1e1e22);
    border: 1px solid var(--border-strong, #3a3a41);
    border-radius: 5px;
    padding: 1px 6px;
}

.th-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: baseline;
    margin: 0 1px;
}

.th-swatch.a { background: #ff7a18; }
.th-swatch.b { background: #9a9aa4; }

@media (max-width: 620px) {
    .th-game { padding: 12px 12px 10px 12px; }
    .th-stat { font-size: 13px; }
}
