/**
 * 首页：懒加载、加载更多、热榜等（原 index.php 内联样式）
 * @package Movie_Theme
 */

.lazy-image {
    transition: opacity 0.3s ease-in-out;
    background-color: #f5f5f5;
}

.lazy-image.loading {
    opacity: 0.7;
    animation: mta-home-pulse 1.5s ease-in-out infinite;
}

.lazy-image.loaded {
    opacity: 1;
}

.lazy-image.error {
    opacity: 0.8;
    filter: grayscale(20%);
}

@keyframes mta-home-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.8; }
    100% { opacity: 0.6; }
}

.lazy-image[data-src] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: mta-home-loading-shimmer 1.5s infinite;
}

@keyframes mta-home-loading-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.no-image-placeholder {
    opacity: 0.9;
    filter: contrast(0.8);
}

@media (max-width: 768px) {
    .lazy-image {
        transition: opacity 0.2s ease-in-out;
    }
}

.home-page-info-banner {
    text-align: center;
    padding: 20px;
    background: #0c0f0d;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-top: 20px;
}

.loadmore {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
}

.loadmore-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.loadmore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.loadmore-btn:active {
    transform: translateY(0);
}

.hot-rank-section {
    margin: 40px 0 10px;
    padding: 20px 20px 10px;
    background: #0f172a;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
}

.hot-rank-title {
    margin: 0 0 16px;
    font-size: 18px;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hot-rank-title::before {
    content: '🔥';
}

.hot-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hot-rank-item + .hot-rank-item {
    border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.hot-rank-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    color: #cbd5f5;
    text-decoration: none;
    font-size: 14px;
}

.hot-rank-link:hover {
    color: #ffffff;
}

.hot-rank-index {
    width: 20px;
    font-weight: 700;
    color: #fbbf24;
}

.hot-rank-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-rank-year {
    color: #9ca3af;
    font-size: 12px;
}

.hot-rank-score {
    color: #f97316;
    font-size: 12px;
    font-weight: 600;
}

.loading-spinner {
    color: #666;
    font-size: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-spinner::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e3e3e3;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: mta-home-spin 1s linear infinite;
}

@keyframes mta-home-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-more-movies,
.load-error {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.no-more-movies {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.load-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
