/**
 * 加载状态样式
 * 小白提示：这些CSS控制转圈圈的外观
 */

/* 全屏加载遮罩 */
#fullscreen-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary, #0a0a0a);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
}

.loader-content {
    text-align: center;
}

/* 转圈圈动画 */
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border, rgba(255,255,255,0.1));
    border-top-color: var(--text-primary, #fff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

/* 按钮内的小转圈圈 */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* 顶部进度条（YouTube风格） */
#top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--text-primary, #fff);
    z-index: 10000;
    transition: width 0.3s, opacity 0.3s;
    width: 0%;
    opacity: 0;
}

/* 骨架屏加载效果 */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-hover, #1a1a1a) 25%,
        var(--bg-card, #141414) 50%,
        var(--bg-hover, #1a1a1a) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* 页面切换淡入效果 */
.page-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 按钮禁用状态 */
button:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* 内容加载占位 */
.content-placeholder {
    padding: 20px;
}

.content-placeholder .skeleton {
    margin-bottom: 12px;
}
