/*
Theme Name: STODF Video Theme
Template: astra
Author: QoderWork
Version: 1.0.0
Description: STODF 视频展示站专用子主题，基于 Astra
*/

/* ========== 视频网格 ========== */
.stodf-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.stodf-video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stodf-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

.stodf-video-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.stodf-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.stodf-video-card:hover .stodf-video-thumb img {
    transform: scale(1.06);
}

.stodf-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0,0,0,0.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    padding-left: 4px;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    pointer-events: none;
}

.stodf-video-card:hover .stodf-video-play {
    opacity: 1;
    background: rgba(220,38,38,0.9);
}

.stodf-video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.stodf-video-info {
    padding: 16px;
}

.stodf-video-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.stodf-video-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.stodf-video-title a:hover {
    color: #dc2626;
}

.stodf-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #888;
}

.stodf-video-cats {
    background: #f3f4f6;
    color: #4b5563;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* ========== 分类导航 ========== */
.stodf-video-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 0 0 16px;
    border-bottom: 1px solid #eee;
}

.stodf-cat-link {
    display: inline-block;
    padding: 8px 18px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.stodf-cat-link:hover,
.stodf-cat-link.active {
    background: #dc2626;
    color: #fff;
}

/* ========== 视频详情页 ========== */
.stodf-single-video {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.stodf-video-player-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
    margin-bottom: 24px;
}

.stodf-video-player-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    border-radius: 12px;
}

.stodf-video-header {
    margin-bottom: 20px;
}

.stodf-video-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #111;
}

.stodf-video-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.stodf-video-header-meta a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.stodf-video-desc {
    background: #f9fafb;
    padding: 20px;
    border-radius: 10px;
    line-height: 1.8;
    color: #444;
    font-size: 15px;
}

/* ========== 相关视频 ========== */
.stodf-related-videos {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.stodf-related-videos h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111;
}

/* ========== 分页 ========== */
.stodf-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.stodf-pagination a,
.stodf-pagination span {
    display: inline-block;
    padding: 10px 16px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.stodf-pagination a:hover,
.stodf-pagination span.current {
    background: #dc2626;
    color: #fff;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .stodf-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .stodf-video-title {
        font-size: 14px;
    }

    .stodf-video-header h1 {
        font-size: 20px;
    }

    .stodf-video-cat-nav {
        gap: 8px;
    }

    .stodf-cat-link {
        padding: 6px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .stodf-video-grid {
        grid-template-columns: 1fr;
    }
}
