/* ===== 通用组件样式 ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light-gray);
}
.section-title h2 {
    position: relative;
    padding-left: 14px;
    color: var(--dark-gray);
}
.section-title h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--coral-orange);
    border-radius: 2px;
}
.section-title .view-all {
    color: var(--coral-blue-dark);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color var(--transition-fast);
    white-space: nowrap;
}
.section-title .view-all:hover {
    color: var(--coral-orange);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}
.badge--hot {
    background: var(--coral-orange);
    color: var(--white);
}
.badge--new {
    background: var(--success);
    color: var(--white);
}
.badge--kids {
    background: var(--coral-blue);
    color: var(--white);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}
.btn--primary {
    background: var(--coral-orange);
    color: var(--white);
}
.btn--primary:hover {
    background: var(--coral-orange-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn--secondary {
    background: var(--coral-blue);
    color: var(--white);
}
.btn--secondary:hover {
    background: var(--coral-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn--outline {
    border: 2px solid var(--coral-blue);
    color: var(--coral-blue);
    background: transparent;
}
.btn--outline:hover {
    background: var(--coral-blue);
    color: var(--white);
}
.btn--play {
    background: linear-gradient(135deg, var(--coral-orange), var(--coral-orange-dark));
    color: var(--white);
    padding: 14px 36px;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(255,112,67,0.4);
}
.btn--play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255,112,67,0.5);
}

.rating-stars {
    display: inline-flex;
    gap: 2px;
    color: #FFB300;
    font-size: 0.85rem;
}
.rating-stars .star--empty {
    color: var(--light-gray);
}

.difficulty-dots {
    display: inline-flex;
    gap: 3px;
}
.difficulty-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--light-gray);
}
.difficulty-dots .dot--filled {
    background: var(--coral-orange);
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.loading-spinner::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid var(--light-gray);
    border-top-color: var(--coral-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--light-gray) 25%, #eee 50%, var(--light-gray) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    background: var(--dark-gray);
    color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-toast);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 页面加载遮罩 */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--ivory);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}
.page-loader--hidden {
    opacity: 0;
    pointer-events: none;
}
.page-loader__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--coral-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--coral-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    z-index: var(--z-fixed);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    pointer-events: none;
}
.back-to-top--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--coral-blue-dark);
    transform: translateY(-2px);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #78909C;
}
.empty-state__icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.empty-state__text {
    font-size: 1.125rem;
    margin-bottom: 8px;
}
.empty-state__sub {
    font-size: 0.875rem;
}

/* 响应式辅助类 */
.hide-mobile { display: block; }
.show-mobile { display: none; }

@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    .container { padding: 0 16px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
    h1 { font-size: 1.75rem; }
    .container { padding: 0 24px; }
}
