/* ========================================================================
   ✨ 載入畫面樣式 (骨架屏、Loading Overlay、進度條)
   ======================================================================== */

/* ✨ 骨架屏 (Skeleton Screen) 樣式 */
.skeleton-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-primary);
    z-index: 500;
    /* 介於底層和 Loading Overlay 之間 */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: none;
}

.skeleton-layer.hidden {
    display: none;
}

.skeleton-block {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

@keyframes skeleton-pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.3;
    }
}

.skeleton-header {
    width: 100%;
    max-width: 800px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.skeleton-score,
.skeleton-time,
.skeleton-fever {
    flex: 1;
    height: 100%;
    border-radius: var(--border-radius-lg);
}

.skeleton-canvas {
    width: 100%;
    max-width: 800px;
    flex-grow: 1;
    /* 佔滿剩餘空間 */
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 20px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-controls {
    width: 100%;
    max-width: 800px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}

.skeleton-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

/* ✨ Loading Overlay 改為半透明並加入模糊效果 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(37, 37, 64, 0.85);
    /* 半透明背景 */
    backdrop-filter: blur(8px);
    /* 背景模糊 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-index-loading);
    transition: opacity var(--transition-normal) ease-out;
}

.loading-overlay.hidden {
    display: none;
}

/* ✨ 載入提示文字與時間樣式 */
.loading-hint {
    color: var(--color-accent-cyan);
    margin-top: 15px;
    font-size: 1em;
    font-weight: bold;
    min-height: 1.5em;
    /* 預留空間避免跳動 */
}

.loading-time {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    font-size: 0.85em;
}

.loading-content {
    text-align: center;
    width: 80%;
    max-width: 400px;
}

.loading-progress-container {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background-color: var(--color-accent-pink);
    width: 0%;
    transition: width 0.3s ease;
}