/* ========== 全局样式 ========== */
body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

/* ========== 视频卡片 ========== */
.video-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.card-img-wrapper {
    overflow: hidden;
    height: 180px;
    background: #e9ecef;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.4s ease;
}

.video-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

/* 播放按钮覆盖 */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay a {
    text-decoration: none;
}

.play-overlay i {
    font-size: 3rem;
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease;
}

.play-overlay i:hover {
    transform: scale(1.15);
}

/* ========== 卡片标题 ========== */
.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
}

/* ========== 分类导航按钮 ========== */
.bg-white.shadow-sm .btn {
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bg-white.shadow-sm .btn:hover {
    transform: translateY(-1px);
}

/* ========== 后台管理表格 ========== */
.table th {
    font-weight: 600;
    font-size: 0.9rem;
}

.table td {
    font-size: 0.9rem;
}

/* ========== 分页 ========== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: #0d6efd;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
}

.pagination .page-link:hover {
    background-color: #e8f0fe;
}

/* ========== 难度标签颜色 ========== */
.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #0dcaf0, #0bb8d0) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #198754, #157347) !important;
}

/* ========== 表单美化 ========== */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ========== 页脚 ========== */
footer {
    background: linear-gradient(135deg, #212529, #343a40) !important;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .card-img-wrapper {
        height: 130px;
    }

    .card-title {
        font-size: 0.8rem;
    }

    .play-overlay i {
        font-size: 2rem;
    }

    /* 移动端导航分类按钮更小 */
    .bg-white.shadow-sm .btn,
    .bg-light .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    /* 移动端后台管理卡片 */
    .admin-video-card {
        border-left: 3px solid #0d6efd;
    }

    /* 分页在手机上更紧凑 */
    .pagination .page-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }

    /* 批量操作面板 */
    .card-footer {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .card-img-wrapper {
        height: 110px;
    }

    .card-body {
        padding: 0.5rem;
    }

    .card-title {
        font-size: 0.75rem;
    }

    .navbar-brand {
        font-size: 0.9rem;
    }
}
