/* ========== 页面加载动画 ========== */
.page-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

/* 旋转圈样式 */
.loader-spinner {
    width: 50px; height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* 进度条样式 */
.loader-progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 15px;
}

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 骨架屏样式 */
.loader-skeleton {
    width: 200px;
    margin: 0 auto 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.skeleton-circle {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loader-text {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    letter-spacing: 2px;
}

/* ========== 天气时钟小组件 ========== */
.widget-panel {
    position: fixed;
    z-index: 9998;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 12px 18px;
    color: #fff;
    text-align: center;
    min-width: 140px;
    transition: all 0.3s ease;
    user-select: none;
}

.widget-panel:hover {
    background: rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* 四个位置 */
.widget-top-right { top: 20px; right: 20px; }
.widget-top-left { top: 20px; left: 20px; }
.widget-bottom-right { bottom: 20px; right: 20px; }
.widget-bottom-left { bottom: 20px; left: 20px; }

.widget-clock {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.widget-date {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
    white-space: nowrap;
}

.widget-weather {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.weather-icon { font-size: 18px; }
.weather-text { color: rgba(255,255,255,0.85); }

/* 链接 emoji 图标 */
.link-emoji {
    display: inline-block;
    margin-right: 6px;
    font-size: 16px;
    vertical-align: middle;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .widget-panel {
        padding: 8px 12px;
        min-width: 110px;
    }
    .widget-top-right { top: 10px; right: 10px; }
    .widget-top-left { top: 10px; left: 10px; }
    .widget-bottom-right { bottom: 10px; right: 10px; }
    .widget-bottom-left { bottom: 10px; left: 10px; }
    .widget-clock { font-size: 16px; }
    .widget-date { font-size: 10px; }
    .widget-weather { font-size: 11px; }
    .loader-progress-bar { width: 150px; }
    .loader-skeleton { width: 150px; }
}
