/* video_modern.css - 现代化视频页面样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #1a4995;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-card-hover: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 导航栏样式 */
.video-navbar {
    background-color: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px var(--shadow-color);
    border-bottom: 1px solid var(--border-color);
}

.video-navbar h1 {
    margin: 0;
    font-size: 1.8rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 搜索框样式 */
.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-input {
    width: 84%;
    padding: 12px 50px 12px 20px;
    background-color: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

/* 主容器 */
.video-main-container {
    max-width: 1600px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* 视频网格布局 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* 视频卡片样式 */
.video-card {
    background-color: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.video-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 缩略图容器 */
.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

/* 播放按钮覆盖层 */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(52, 152, 219, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.video-card:hover .play-icon {
    transform: scale(1);
}

/* 视频时长标签 */
.duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 视频信息 */
.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.video-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 加载指示器 */
.loading-indicator {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 没有更多内容提示 */
.no-more-content {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.5);
}

/* 页脚样式 */
.video-footer {
    background-color: var(--bg-card);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.video-footer p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.video-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.video-footer a:hover {
    color: var(--accent-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .video-navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .search-button {
        right: 10px;
    }
    .search-container {
        max-width: 100%;
    }

    .video-main-container {
        padding: 0 1rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
        padding-bottom: 100px; /* 为加载触发器留出空间 */
    }

    .video-thumbnail {
        height: 180px;
    }
    body {
        overscroll-behavior-y: contain; /* 防止过度滚动 */
    }
}

@media (max-width: 510px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .video-thumbnail {
        height: 150px;
    }
    .video-info{
        height: 80px;
    }
    .video-navbar h1 {
        font-size: 1.5rem;
    }
}

/* 搜索动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card {
    animation: fadeIn 0.5s ease forwards;
}