/* ui.css（UIスタイル）- テーマ変数対応版 */

#game-ui {
    display: flex;
    justify-content: center; /* 中央揃えに変更 */
    align-items: center;
    padding: 10px 15px;
    background: var(--ui-background);
    border-radius: 10px;
    margin-bottom: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    border: 1px solid var(--ui-border);
    backdrop-filter: blur(5px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

#stats-display {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center; /* 中央揃え */
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.stat-label {
    color: var(--accent-secondary); /* ラベル色をテーマ変数で統一 */
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.stat-value {
    color: var(--accent-secondary); /* 数字色をテーマ変数で統一 */
    font-weight: bold;
    font-size: 1em;
    min-width: 30px;
    text-align: center;
    transition: color 0.3s ease;
}

/* コンボ表示の色変化 */
#combo-count.combo-5 {
    color: var(--powerup-shrink); /* 黄色系 */
}

#combo-count.combo-10 {
    color: var(--block-strong); /* オレンジ系 */
    text-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

#combo-count.combo-15 {
    color: var(--powerup-slow); /* シアン系 */
    text-shadow: 0 0 8px rgba(0, 170, 255, 0.5);
}

#combo-count.combo-20 {
    background: linear-gradient(45deg, 
        var(--accent-secondary), 
        var(--powerup-shrink), 
        var(--powerup-slow), 
        var(--powerup-multiball)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

/* スコア加算時のアニメーション */
.score-pop {
    animation: scorePop 0.3s ease;
}

@keyframes scorePop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        color: var(--powerup-expand); /* 緑色でハイライト */
    }
    100% {
        transform: scale(1);
    }
}

/* ライフ減少時のアニメーション */
.life-lost {
    animation: lifeLost 0.5s ease;
}

@keyframes lifeLost {
    0% {
        transform: scale(1);
        color: var(--accent-secondary);
    }
    50% {
        transform: scale(1.2);
        color: var(--block-super); /* 赤色で警告 */
    }
    100% {
        transform: scale(1);
        color: var(--accent-secondary);
    }
}

/* テーマ切り替え時のスムーズな遷移 */
#game-ui,
.stat-label,
.stat-value,
#combo-count {
    transition: all 0.3s ease;
}