/* ==========================================
   时间模式专用样式
   ========================================== */

/* 时间模式主容器 */
.time-mode-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 900;
    background: rgba(0, 0, 33, 0.92);
}

/* 渐变色计时条 */
.time-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to right, #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #8a2be2);
    transform-origin: left;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    transition: transform 0.5s linear;
}

.time-progress-bar.ending {
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.9);
}

/* 退出按钮 */
.time-exit-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.time-exit-button:hover {
    background: rgba(255, 0, 0, 0.5);
    transform: scale(1.1);
}

/* 自定义词库通知样式 */
.time-custom-words-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 3000;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 250px;
}

.time-custom-words-notification.show {
    transform: translateX(-50%) translateY(0);
}

.time-custom-words-notification.success {
    border-left: 4px solid #4CAF50;
}

.time-custom-words-notification.error {
    border-left: 4px solid #F44336;
}

.notification-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.notification-details {
    font-size: 14px;
    opacity: 0.8;
}

/* 时间模式陨石容器样式 */
.time-meteors-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 950;
    overflow: hidden;
}

/* 时间模式陨石样式 */
.time-meteor {
    position: absolute;
    top: -90px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(80, 80, 80, 0.8), rgba(30, 30, 30, 0.9));
    color: white;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(255, 150, 30, 0.6),
        0 0 40px rgba(255, 100, 0, 0.4),
        inset 0 0 15px rgba(255, 255, 255, 0.4);
    pointer-events: none;
    border: 1px solid rgba(255, 200, 150, 0.6);
    transform-style: preserve-3d;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    font-weight: bold;
    text-align: center;
    padding: 10px;
    word-break: break-word;
    box-sizing: border-box;
}

/* 字母显示区域样式 - 完全复原原始样式 */
.time-letters-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 300px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 20px rgba(205, 158, 3, 0.737);
    pointer-events: none;
    z-index: 1001;
    font-family: "Arial", sans-serif;
    letter-spacing: 10px;
    width: 100%;
    text-align: center;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


/* 生命值显示 - 扁形发光绿灯 */
.time-lives-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 1010;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    max-width: calc(100vw - 120px);
}

.time-life-icon {
    width: min(25vw, 180px);
    height: 10px;
    border-radius: 10px;
    background-color: #32CD32;
    box-shadow: 0 0 10px #32CD32, 0 0 20px #32CD32, inset 0 0 8px rgba(255, 255, 255, 0.8);
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.time-life-icon::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, rgba(50, 205, 50, 0.6), rgba(50, 205, 50, 0));
    pointer-events: none;
    filter: blur(5px);
    border-radius: 0 0 20px 20px;
    z-index: -1;
    display: block;
    animation: lightBeam 3s infinite alternate;
}

.time-life-icon.inactive::after {
    background: linear-gradient(to bottom, rgba(255, 0, 0, 0.6), rgba(255, 0, 0, 0));
}

.time-life-icon.inactive {
    background-color: #FF0000;
    box-shadow: 0 0 10px #FF0000, 0 0 20px #FF0000, inset 0 0 8px rgba(255, 255, 255, 0.5);
    opacity: 0.7;
}

.time-life-icon.life-lost-flash {
    animation: lifeFlash 0.8s ease-in-out forwards;
}

/* 陨石内部火焰效果 */
.time-meteor::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(
        circle, 
        rgba(255, 200, 50, 0.8) 10%, 
        rgba(255, 120, 20, 0.6) 40%, 
        rgba(200, 40, 5, 0.4) 70%, 
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(5px);
    animation: meteorPulse 2s infinite alternate;
    z-index: -1;
}

/* 陨石颜色变化 */
.time-meteor.color1 {
    background: linear-gradient(135deg, rgba(80, 80, 150, 0.8), rgba(30, 30, 80, 0.9));
    box-shadow: 
        0 0 20px rgba(100, 150, 255, 0.6),
        0 0 40px rgba(30, 100, 255, 0.4),
        inset 0 0 15px rgba(200, 200, 255, 0.4);
    border-color: rgba(150, 180, 255, 0.6);
}

.time-meteor.color2 {
    background: linear-gradient(135deg, rgba(150, 80, 80, 0.8), rgba(80, 30, 30, 0.9));
    box-shadow: 
        0 0 20px rgba(255, 100, 100, 0.6),
        0 0 40px rgba(255, 50, 50, 0.4),
        inset 0 0 15px rgba(255, 200, 200, 0.4);
    border-color: rgba(255, 150, 150, 0.6);
}

.time-meteor.color3 {
    background: linear-gradient(135deg, rgba(80, 150, 80, 0.8), rgba(30, 80, 30, 0.9));
    box-shadow: 
        0 0 20px rgba(100, 255, 100, 0.6),
        0 0 40px rgba(50, 255, 50, 0.4),
        inset 0 0 15px rgba(200, 255, 200, 0.4);
    border-color: rgba(150, 255, 150, 0.6);
}

.time-meteor.color4 {
    background: linear-gradient(135deg, rgba(150, 80, 150, 0.8), rgba(80, 30, 80, 0.9));
    box-shadow: 
        0 0 20px rgba(255, 100, 255, 0.6),
        0 0 40px rgba(255, 50, 255, 0.4),
        inset 0 0 15px rgba(255, 200, 255, 0.4);
    border-color: rgba(255, 150, 255, 0.6);
}

.time-meteor-destroyed {
    animation: meteorDestroy 0.7s ease-out forwards;
}

.time-letters-container.time-success {
    animation: timeSuccess 0.5s ease-out;
}

.time-letter {
    display: inline-block;
    animation: letterPop 0.3s forwards;
}

/* 动画关键帧 */
@keyframes lightBeam {
    0% { 
        opacity: 0.7;
        height: 30px;
    }
    100% { 
        opacity: 0.9;
        height: 50px;
    }
}

@keyframes lifeFlash {
    0% { 
        background-color: #32CD32; 
        box-shadow: 0 0 10px #32CD32, 0 0 20px #32CD32;
    }
    50% { 
        background-color: #FFFF00;
        box-shadow: 0 0 15px #FFFF00, 0 0 25px #FFFF00;
        transform: scaleX(1.2);
    }
    100% { 
        background-color: #FF0000; 
        box-shadow: 0 0 10px #FF0000, 0 0 15px #FF0000;
    }
}

@keyframes lightBeamFlash {
    0% { 
        background: linear-gradient(to bottom, rgba(50, 205, 50, 0.6), rgba(50, 205, 50, 0));
    }
    50% { 
        background: linear-gradient(to bottom, rgba(255, 255, 0, 0.6), rgba(255, 255, 0, 0));
        height: 60px;
    }
    100% { 
        background: linear-gradient(to bottom, rgba(255, 0, 0, 0.6), rgba(255, 0, 0, 0));
        height: 40px;
    }
}

@keyframes meteorPulse {
    0% { opacity: 0.6; transform: scale(0.8); }
    100% { opacity: 0.9; transform: scale(1.1); }
}

@keyframes meteorDestroy {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 150, 30, 0.6);
    }
    20% {
        transform: scale(1.2);
        opacity: 0.9;
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.9);
    }
    100% {
        transform: scale(0.1);
        opacity: 0;
        box-shadow: 0 0 80px rgba(255, 255, 255, 0);
    }
}

@keyframes letterPop {
    0% { transform: scale(0.5); opacity: 0.3; }
    50% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1); opacity: 0.7; }
}

@keyframes timeSuccess {
    0% { text-shadow: 0 0 20px rgba(205, 158, 3, 0.737); }
    50% { text-shadow: 0 0 30px rgba(50, 255, 50, 0.8); }
    100% { text-shadow: 0 0 20px rgba(205, 158, 3, 0.737); }
}