/* ========================================
   仪表盘样式 - 分数显示、游戏按钮
   ======================================== */

.info-dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 450px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    backdrop-filter: blur(5px);
    gap: 8px;
    margin: 0 auto;
    flex-shrink: 1;
}

.info-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 6px;
}

.score-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.hand-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.score-calc {
    display: flex;
    align-items: center;
    gap: 7px;
}

.score-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    max-width: 80px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 30, 40, 0.95) 0%, rgba(0, 20, 30, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.score-box.scrolling {
    justify-content: flex-start;
}

.score-box.scrolling::after {
    content: attr(data-value) '\00a0\00a0\00a0' attr(data-value);
    display: inline-block;
    white-space: nowrap;
    animation: score-scroll 3s linear infinite;
}

@keyframes score-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 数字变化动画 - 通过CSS变量控制缩放幅度 */
.number-pop {
    animation: number-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --pop-scale: 1.15;
}

@keyframes number-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(var(--pop-scale, 1.15));
    }

    100% {
        transform: scale(1);
    }
}

.score-multiply {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.score-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.7;
    margin: 0 4px;
}

.player-group .score-box {
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow:
        0 0 8px rgba(0, 242, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.player-group .score-multiply {
    color: var(--primary-color);
    opacity: 0.6;
}

.player-group .score-label {
    color: var(--primary-color);
    opacity: 0.5;
}

.npc-group .score-box {
    border: 1.5px solid var(--enemy-color);
    color: var(--enemy-color);
    box-shadow:
        0 0 8px rgba(255, 46, 77, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.npc-group .score-multiply {
    color: var(--enemy-color);
    opacity: 0.6;
}

.npc-group .score-label {
    color: var(--enemy-color);
    opacity: 0.5;
}

.npc-group .hand-display {
    color: var(--enemy-color);
    text-shadow: 0 0 10px var(--enemy-dim);
}

.player-group .hand-display {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-dim);
}

.dash-divider {
    display: flex;
    align-items: center;
    width: 75%;
    opacity: 0.3;
    margin: 8px 0;
}

.dash-divider .line {
    height: 1px;
    flex: 1;
    background: #fff;
}

.vs-icon {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    color: #fff;
    padding: 0 10px;
}

.controls-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 8px 0;
    flex-shrink: 0;
}

.game-btn {
    min-width: 130px;
    height: 38px;
    border: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    position: relative;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(30, 34, 40, 0.9);
    border: 2px solid #444;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.btn-roll {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.btn-roll:hover:not(:disabled) {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.4);
}

.btn-roll:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-skip {
    border-color: #e67e22;
    color: #e67e22;
}

.btn-skip:hover:not(:disabled) {
    background: #e67e22;
    color: #000;
    box-shadow: 0 0 25px rgba(230, 126, 34, 0.4);
}

.game-btn:disabled {
    opacity: 0.4;
    cursor: default;
    border-color: #555;
    color: #777;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    transform: none;
    pointer-events: none;
}

/* 重掷次数徽章 - 按钮内的小框 */
.reroll-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 20px;
    background: linear-gradient(135deg, rgba(0, 30, 40, 0.95) 0%, rgba(0, 20, 30, 0.98) 100%);
    border: 1.5px solid var(--primary-color);
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow:
        0 0 6px rgba(0, 242, 255, 0.8),
        0 0 10px rgba(0, 242, 255, 0.4);
    box-shadow:
        0 0 8px rgba(0, 242, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    animation: badge-glow 2s ease-in-out infinite;
    margin-left: 6px;
    line-height: 1;
    text-align: center;
}

@keyframes badge-glow {

    0%,
    100% {
        text-shadow:
            0 0 6px rgba(0, 242, 255, 0.8),
            0 0 10px rgba(0, 242, 255, 0.4);
        box-shadow:
            0 0 8px rgba(0, 242, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    }

    50% {
        text-shadow:
            0 0 10px rgba(0, 242, 255, 1),
            0 0 15px rgba(0, 242, 255, 0.6);
        box-shadow:
            0 0 12px rgba(0, 242, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    }
}

/* 按钮hover时徽章也有反应 */
.btn-roll:hover:not(:disabled) .reroll-badge {
    border-color: #000;
    color: #000;
    background: var(--primary-color);
    text-shadow: none;
    box-shadow:
        0 0 15px rgba(0, 242, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-roll:hover:not(:disabled) .reroll-badge.depleted {
    background: #ff4757;
    border-color: #000;
}
