/* 视频频道样式 */

.video-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px 60px;
}

/* 工具栏：类型筛选 + 软件筛选 */
.video-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.video-type-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.video-type-filter {
    padding: 8px 18px;
    border: 1px solid #262b33;
    border-radius: 999px;
    font-size: 13px;
    color: #9aa4b2;
    text-decoration: none;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.video-type-filter:hover {
    border-color: rgba(86, 156, 214, 0.5);
    color: #e6edf3;
}

.video-type-filter.active {
    background: linear-gradient(135deg, #569cd6 0%, #3b82f6 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.video-software-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 9px 36px 9px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9bb4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.video-software-select:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.video-software-select:focus {
    outline: none;
    border-color: #569cd6;
}

body.light-mode .video-software-select {
    color: #2c3e50;
    background-color: #fff;
    border-color: #d1d9e6;
}

/* 卡片网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.video-card {
    background: #121417;
    border: 1px solid #1e2229;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: rgba(86, 156, 214, 0.45);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.video-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #1e2530 0%, #141820 100%);
}

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

.video-card:hover .video-card-cover img {
    transform: scale(1.05);
}

.video-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.15);
}

.video-card-placeholder i {
    width: 44px;
    height: 44px;
}

/* 中央播放按钮 */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
    transition: transform 0.25s, background 0.25s;
    backdrop-filter: blur(4px);
}

.video-play-btn i {
    width: 22px;
    height: 22px;
    margin-left: 2px;
}

.video-card:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    background: #fb7299;
}

/* 类型徽标 */
.video-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.video-type-news     { background: rgba(86, 156, 214, 0.88); }
.video-type-case     { background: rgba(197, 134, 192, 0.88); }
.video-type-tutorial { background: rgba(106, 153, 85, 0.88); }

/* 卡片正文 */
.video-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.video-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #e6edf3;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.video-card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #8b949e;
}

.video-card-owner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card-owner i {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.video-card-date {
    flex-shrink: 0;
}

.video-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #8b949e;
    padding: 80px 20px;
    font-size: 14px;
}

/* 明亮模式 */
body.light-mode .video-card {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

body.light-mode .video-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

body.light-mode .video-card-title {
    color: #1e293b;
}

body.light-mode .video-card-meta {
    color: #64748b;
}

body.light-mode .video-type-filter {
    border-color: #d1d9e6;
    color: #475569;
}

body.light-mode .video-type-filter:hover {
    border-color: #93c5fd;
    color: #1e293b;
}

/* 播放弹窗 */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}

.video-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: videoFadeIn 0.3s ease;
}

.video-modal-content {
    position: relative;
    max-width: 960px;
    width: 90vw;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    animation: videoSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
    line-height: 1;
    padding: 0;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.video-player-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
    background: #000;
}

@keyframes videoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes videoSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 分页（与全站风格一致） */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 32px 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #262b33;
    background: transparent;
    color: #9aa4b2;
    text-decoration: none;
    transition: all 0.25s;
    font-size: 14px;
    font-weight: 500;
}

.pagination-item i {
    width: 16px;
    height: 16px;
}

.pagination-item:hover:not(.disabled):not(.active) {
    border-color: rgba(86, 156, 214, 0.5);
    color: #e6edf3;
}

.pagination-item.active {
    background: linear-gradient(135deg, #569cd6 0%, #3b82f6 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

.pagination-item.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 768px) {
    .video-page {
        padding: 24px 16px 48px;
    }

    .video-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .video-software-select {
        width: 100%;
    }

    .video-modal-content {
        width: 95vw;
        border-radius: 12px;
    }

    .video-modal-close {
        width: 34px;
        height: 34px;
        font-size: 18px;
        top: 8px;
        right: 8px;
    }
}

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