/* 全局基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #f1f3f7;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #fff;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

ul {
    list-style: none;
}

/* 基础布局 */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 头部样式 */
.site-header {
    background: linear-gradient(135deg, #5a67d8 0%, #805ad5 100%);
    color: white;
    padding: 24px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(90, 103, 216, 0.15);
    position: relative;
    z-index: 10;
}

.header-inner {
    position: relative;
    margin-bottom: 24px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-welcome h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-welcome p {
    font-size: 1rem;
    opacity: 0.9;
}

.header-stats {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 24px;
    align-items: center;
    font-size: 1rem;
    white-space: nowrap;
}

.header-stats .text {
    color: #fefcbf;
    font-weight: 600;
    margin-left: 6px;
}

/* 主导航 */
.main-nav {
    width: 100%;
    overflow: hidden;
    padding: 0 10px;
}

.nav-menu {
    display: flex;
    gap: 28px;
    align-items: center;
    white-space: nowrap;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
    -webkit-overflow-scrolling: touch;
}

.nav-menu::-webkit-scrollbar {
    height: 6px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255,255,255,0.5);
}

.nav-link {
    display: block;
    padding: 8px 0;
    position: relative;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fefcbf;
    border-radius: 1px;
}

/* 主内容区 */
.main-content {
    padding: 2rem 0;
}

/* 搜索区域 */
.search-section {
    padding: 5px 0;
    background-color: #ffffff;
    text-align: center;
    margin: 0 auto 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    max-width: 1180px;
}

.search-form-wrapper {
    max-width: 840px;
    width: 100%;
    margin: 0 auto;
}

.search-form {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(90, 103, 216, 0.06);
}

.search-input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    outline: none;
    font-size: 1.05rem;
    color: #2d3748;
    background-color: #f8fafc;
    -webkit-appearance: none;
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-input:focus {
    border-color: #5a67d8;
    box-shadow: 0 0 0 2px rgba(90, 103, 216, 0.2);
}

.search-btn {
    padding: 16px 36px;
    background: linear-gradient(135deg, #5a67d8 0%, #805ad5 100%);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-btn:hover {
    background: linear-gradient(135deg, #4c51bf 0%, #7422d3 100%);
    transform: translateY(-1px);
}

/* 视频区域 */
.video-section {
    margin: 0 auto 32px;
    background-color: #ffffff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    max-width: 1180px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaf6;
}

.section-title {
    font-size: 1.5rem;
    color: #5a67d8;
    font-weight: 600;
    margin: 0;
    position: relative;
    padding-left: 12px;
    letter-spacing: 0.3px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #5a67d8 0%, #805ad5 100%);
    border-radius: 2px;
}

.view-more {
    color: #5a67d8;
    font-size: 0.95rem;
    padding: 8px 20px;
    border-radius: 50px;
    background: #f5f3ff;
    border: 1px solid #e8eaf6;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-more:hover {
    color: #fff;
    background: linear-gradient(135deg, #5a67d8 0%, #805ad5 100%);
    transform: translateY(-1px);
    border-color: transparent;
    text-decoration: underline;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    row-gap: 24px;
    column-gap: 16px;
}

.video-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(90, 103, 216, 0.12);
}

.video-item:hover .cover-img {
    transform: scale(1.03);
}

.video-cover {
    display: block;
    width: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.cover-img {
    width: 100%;
    height: 313px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    loading: "lazy";
    transition: transform 0.2s;
}

.video-name {
    font-size: 1rem;
    color: #2d3748;
    padding: 14px 10px 8px;
    font-weight: 500;
    white-space: normal;
    overflow: hidden;
    text-align: center;
    letter-spacing: 0.2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-episodes {
    font-size: 0.88rem;
    color: #718096;
    padding: 0 10px 14px;
    text-align: center;
}

/* 底部样式 */
.site-footer {
    background: linear-gradient(135deg, #5a67d8 0%, #805ad5 100%);
    color: white;
    padding: 48px 0 24px;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 -2px 10px rgba(90, 103, 216, 0.15);
}

.footer-nav {
    margin-bottom: 24px;
}

.footer-nav a {
    margin: 0 12px;
    font-size: 1rem;
    display: inline-block;
    padding: 8px 0;
    position: relative;
    font-weight: 400;
}

.footer-nav a:hover {
    color: #fefcbf;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 1px;
    background: #fefcbf;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.footer-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #e9e9ff;
    max-width: 800px;
    margin: 0 auto 24px;
    opacity: 0.9;
}

.footer-copyright {
    font-size: 0.88rem;
    color: #d1d5db;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-inner {
        height: auto;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 16px;
    }
 
    .header-welcome h1 {
        font-size: 1.8rem;
    }
    
    .header-stats {
        position: static;
        transform: none;
        gap: 16px;
        font-size: 0.9rem;
        margin-top: 8px;
    }
    
    .nav-menu {
        gap: 20px;
        font-size: 0.95rem;
    }
    
    .search-section {
        margin: 0 auto 0;
    }
    
    .search-form-wrapper {
        max-width: 100%;
    }
    
    .search-input {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .search-btn {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .video-section {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 16px;
        column-gap: 12px;
    }
    
    .cover-img {
        height: 211px;
    }
    
    .video-name {
        font-size: 0.9rem;
    }
    
    .site-footer {
        padding: 36px 0 20px;
    }
    
    .footer-nav a {
        margin: 0 8px;
        font-size: 0.9rem;
    }
    
    .footer-text {
        font-size: 0.88rem;
    }
}

/* PC端优化 */
@media (min-width: 769px) {
    .nav-menu {
        cursor: grab;
        scroll-behavior: smooth;
    }
    
    .nav-menu:active {
        cursor: grabbing;
    }  
}