/* ブロックやゲーム中に表示されるエフェクト */
.block {
    width: 24px;
    height: 24px;
    position: absolute;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.block.red { background: linear-gradient(135deg, #ff4444, #cc3333); }
.block.blue { background: linear-gradient(135deg, #4444ff, #3333cc); }
.block.yellow { background: linear-gradient(135deg, #ffdd44, #ccaa33); }
.block.white { background: linear-gradient(135deg, #ffffff, #eeeeee); border-color: #333; }
.block.black { background: linear-gradient(135deg, #333333, #111111); }

.mini-block.red { background: linear-gradient(135deg, #ff4444, #cc3333); }
.mini-block.blue { background: linear-gradient(135deg, #4444ff, #3333cc); }
.mini-block.yellow { background: linear-gradient(135deg, #ffdd44, #ccaa33); }
.mini-block.white { background: linear-gradient(135deg, #ffffff, #eeeeee); border-color: #333; }
.mini-block.black { background: linear-gradient(135deg, #333333, #111111); }

.block.matched {
    animation: matchPulse 0.6s ease-in-out;
}

@keyframes matchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); filter: brightness(1.5); }
}

.combo-display {
    position: fixed;
    left: 50%;
    top: 30%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #888, #bbb); /* デフォルトは無機質なグレー */
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.5em;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out, background 0.3s;
}

.score-popup {
    position: absolute;
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 1000;
    animation: scoreFloat 1s ease-out forwards;
}

@keyframes scoreFloat {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-30px); opacity: 0; }
}

.level-up {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2em;
    display: none;
    z-index: 999;
    animation: levelUpSlide 2s ease-in-out;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

@keyframes levelUpSlide {
    0% { transform: translateY(-50%) translateX(100%); opacity: 0; }
    20%, 80% { transform: translateY(-50%) translateX(0); opacity: 1; }
    100% { transform: translateY(-50%) translateX(100%); opacity: 0; }
}

/* タイムアタック残り10秒警告表示 */
.time-warning-display {
    position: fixed;
    right: 20px;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(255, 69, 0, 0.6); /* 透過度を上げて画面の邪魔にならないように */
    color: white;
    padding: 20px 25px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 3em;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
    opacity: 0;
    display: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.time-warning-display.show {
    display: block;
    opacity: 1;
    animation: timeWarningPulse 1s ease-in-out;
}

@keyframes timeWarningPulse {
    0% { 
        transform: translateY(-50%) scale(0.8); 
        opacity: 0.7; 
    }
    50% { 
        transform: translateY(-50%) scale(1.1); 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-50%) scale(1); 
        opacity: 1; 
    }
}

/* 0秒表示用の特別なスタイル */
.time-warning-display.zero-seconds {
    background: rgba(255, 0, 0, 0.7); /* より赤く、少し濃く */
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.4);
    animation: timeWarningZeroPulse 2s ease-in-out infinite;
}

@keyframes timeWarningZeroPulse {
    0%, 100% { 
        transform: translateY(-50%) scale(1); 
        opacity: 0.9; 
    }
    50% { 
        transform: translateY(-50%) scale(1.05); 
        opacity: 1; 
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .time-warning-display {
        font-size: 2.5em;
        padding: 15px 20px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .time-warning-display {
        font-size: 2em;
        padding: 12px 18px;
        right: 10px;
    }
}