/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: #fff;
    min-height: 100vh;
}

/* 头部样式 - 参考趣配音设计 */
.header {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    text-align: center;
    color: white;
    padding: 40px 20px 30px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(74,144,226,0.1), transparent);
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    animation: fadeInDown 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.header h1 i {
    font-size: 2.2rem;
    animation: bounce 2s infinite;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.95;
    animation: fadeInUp 0.6s ease;
    font-weight: 300;
}

/* 主内容区域 */
.main-content {
    padding: 20px;
    background: #f5f7fa;
}

/* 筛选栏 - 模块化卡片设计 */
.filter-bar {
    background: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    animation: fadeIn 0.8s ease;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    min-width: 50px;
    font-size: 0.95rem;
}

.filter-btn {
    padding: 8px 18px;
    border: none;
    background: #f0f3f8;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(74,144,226,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.filter-btn:hover {
    background: #e8edf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74,144,226,0.15);
}

.filter-btn:active::before {
    width: 200px;
    height: 200px;
}

.filter-btn.active {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74,144,226,0.35);
    transform: translateY(-1px);
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    animation: fadeIn 1s ease;
}

/* 视频卡片 - 趣配音风格 */
.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: slideInUp 0.5s ease;
    position: relative;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a90e2, #5b9fee);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.video-card:hover::before {
    transform: scaleX(1);
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(74,144,226,0.2);
}

.video-thumbnail {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #e8f1fb 0%, #d4e6f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.thumbnail-video,
.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .thumbnail-video,
.video-card:hover .thumbnail-image {
    transform: scale(1.05);
}

.video-thumbnail i {
    font-size: 3rem;
    color: #4a90e2;
    opacity: 0.3;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74,144,226,0.85), rgba(53,122,189,0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.video-card:hover .play-icon {
    transform: scale(1.1);
}

.play-icon i {
    font-size: 1.4rem;
    color: #4a90e2;
    margin-left: 4px;
}

.video-info {
    padding: 16px;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #999;
}

.meta-item i {
    color: #4a90e2;
    font-size: 0.8rem;
}

.video-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 5px 12px;
    background: #f0f3f8;
    color: #666;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #e8edf5;
}

.tag.difficulty-easy {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: white;
    box-shadow: 0 2px 8px rgba(82,196,26,0.3);
}

.tag.difficulty-medium {
    background: linear-gradient(135deg, #faad14, #ffc53d);
    color: white;
    box-shadow: 0 2px 8px rgba(250,173,20,0.3);
}

.tag.difficulty-hard {
    background: linear-gradient(135deg, #f5222d, #ff4d4f);
    color: white;
    box-shadow: 0 2px 8px rgba(245,34,45,0.3);
}

/* 加载状态 */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #666;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.loading i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #4a90e2;
}

.loading p {
    font-size: 1.1rem;
    color: #999;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #666;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: #4a90e2;
}

.empty-state p {
    font-size: 1.1rem;
    color: #999;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* 响应式设计 - 平板设备 (iPad等) */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* 响应式设计 - 手机横屏/小平板 */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .filter-bar {
        padding: 12px;
    }
    
    .filter-group {
        gap: 6px;
    }
    
    .filter-group label {
        font-size: 0.85rem;
        min-width: 45px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        /* 增大触摸区域 */
        min-height: 32px;
    }
    
    .video-card {
        border-radius: 10px;
    }
    
    .video-thumbnail {
        height: 120px;
    }
    
    .video-thumbnail i {
        font-size: 2.5rem;
    }
    
    .video-info {
        padding: 10px;
    }
    
    .video-title {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .video-description {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .meta-item {
        font-size: 0.75rem;
    }
    
    .tag {
        padding: 2px 8px;
        font-size: 0.7rem;
    }
}

/* 响应式设计 - 手机竖屏（主要优化点）*/
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px 10px;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    /* 手机端单列显示，更易浏览 */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .video-card {
        border-radius: 12px;
    }
    
    .video-thumbnail {
        height: 200px; /* 单列时增加高度 */
    }
    
    .video-thumbnail i {
        font-size: 3rem;
    }
    
    .play-icon {
        width: 50px;
        height: 50px;
    }
    
    .play-icon i {
        font-size: 1.2rem;
    }
    
    .video-info {
        padding: 15px;
    }
    
    .video-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .video-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .video-meta {
        margin-bottom: 12px;
    }
    
    .meta-item {
        font-size: 0.85rem;
    }
    
    .tag {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    
    /* 优化筛选栏触摸体验 */
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
        min-height: 36px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .filter-btn:active {
        transform: scale(0.95);
    }
}

/* 超小屏幕（iPhone SE等）*/
@media (max-width: 375px) {
    .header h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .filter-group {
        gap: 4px;
    }
    
    .filter-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-height: 32px;
    }
    
    .video-title {
        font-size: 1rem;
    }
    
    .video-description {
        font-size: 0.85rem;
    }
}
