/* 五子棋 - V2 主题化样式 */

/* ===== 模式选择菜单 ===== */
.game-menu {
    background: var(--bg-primary, #fff);
    border-radius: var(--radius-lg, 14px);
    box-shadow: var(--shadow-lg, 0 16px 48px rgba(0,0,0,0.1));
    padding: 28px 32px;
    max-width: 420px;
    margin: 28px auto;
    border: 1px solid var(--border-subtle, rgba(216,211,202,0.4));
}

.menu-section {
    margin-bottom: 20px;
}

.menu-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-title i {
    color: var(--accent, #1b6b3a);
}

.menu-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--bg-secondary, #f3f1ed);
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: var(--text-secondary, #4b5563);
    user-select: none;
}

.radio-option:hover {
    background: var(--bg-tertiary, #e8e4dc);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--accent, #1b6b3a);
    font-weight: 600;
}

.radio-option:has(input[type="radio"]:checked) {
    background: rgba(var(--accent-rgb, 27, 107, 58), 0.08);
    border: 1px solid var(--accent, #1b6b3a);
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.radio-label i {
    font-size: 0.8rem;
}

.play-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 50px;
    background: var(--accent, #1b6b3a);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: 8px;
}

.play-btn:hover {
    background: var(--accent-hover, #14532d);
    box-shadow: 0 2px 12px rgba(var(--accent-rgb, 27, 107, 58), 0.35);
    transform: translateY(-1px);
}

.play-btn:active {
    transform: scale(0.98);
}

.play-btn i {
    margin-right: 6px;
}

/* ===== 游戏主面板 ===== */
.wuzi-box {
    max-width: 620px;
    width: 100%;
    display: none;
    margin: 24px auto 0;
    padding: 0 12px;
}

.wuzi-box canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: var(--radius, 10px);
    box-shadow: var(--shadow-lg, 0 16px 48px rgba(0,0,0,0.1));
}

/* ===== 游戏状态信息栏 ===== */
.game-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    margin-bottom: 8px;
    background: var(--bg-secondary, #f3f1ed);
    border-radius: var(--radius, 10px);
    border: 1px solid var(--border, #d8d3ca);
}

.game-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 50px;
    background: var(--accent, #1b6b3a);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
}

.game-turn-indicator {
    font-size: 0.875rem;
    color: var(--text-secondary, #4b5563);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-turn-indicator i {
    font-size: 0.8rem;
}

/* ===== 操作按钮栏 ===== */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 8px 0;
}

.action-bar .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    background: var(--bg-secondary, #f3f1ed);
    color: var(--text-secondary, #4b5563);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.action-bar .action-btn:hover {
    background: var(--bg-tertiary, #e8e4dc);
    color: var(--accent, #1b6b3a);
    transform: translateY(-1px);
}

.action-bar .action-btn:active {
    transform: scale(0.97);
}

.action-bar .action-btn i {
    font-size: 0.9rem;
}

.action-bar .action-btn:disabled,
.action-bar .action-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ===== 思考中浮层 ===== */
.thinking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.thinking-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: var(--bg-primary, #faf8f5);
    padding: 32px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg, 0 16px 48px rgba(0,0,0,0.15));
}

.thinking-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(var(--accent-rgb, 27, 107, 58), 0.2);
    border-top-color: var(--accent, #1b6b3a);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.thinking-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

/* ===== Toast 通知（覆盖默认位置） ===== */
.toast-notification {
    z-index: 100000 !important;
}

/* ===== 响应式适配 ===== */
@media (max-width: 576px) {
    .game-menu {
        padding: 20px 18px;
        margin: 16px auto;
        border-radius: 12px;
    }

    .menu-options {
        gap: 6px;
    }

    .radio-option {
        padding: 5px 10px;
        font-size: 0.8125rem;
    }

    .play-btn {
        padding: 10px 0;
        font-size: 0.9375rem;
    }

    .game-status-bar {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .action-bar {
        gap: 8px;
    }

    .action-bar .action-btn {
        padding: 8px 14px;
        font-size: 0.8125rem;
    }

    .thinking-content {
        padding: 24px 28px;
        margin: 0 20px;
    }
}

/* ===== 旧样式兼容（保留不动） ===== */
input[type="radio"] {
    cursor: pointer;
    display: inline-block;
}

.dc {
    clear: both;
}

.dn {
    display: none
}
