/* ============================================
   51视频 - 品牌网站主样式表
   原创设计：现代动漫社区 + 影视传媒平台
   ============================================ */

/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* 颜色系统 */
:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5f3dc4;
    --secondary: #00b894;
    --accent: #fd79a8;
    --accent-warm: #fdcb6e;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-light: #ecf0f1;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
}

/* 容器与布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* 排版 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #00a383;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* 头部导航 */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 6px;
    padding: 8px 16px;
    gap: 10px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Hero 部分 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 视频卡片 */
.video-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.video-card-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    background-color: #000;
}

.video-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

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

.video-play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 15px solid var(--primary);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}

.video-card-content {
    padding: 15px;
}

.video-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.video-card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.video-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 部分标题 */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 15px;
}

/* 部分容器 */
.section {
    padding: 60px 20px;
}

.section-light {
    background-color: var(--bg-light);
}

.section-white {
    background-color: var(--bg-white);
}

/* 专家卡片 */
.expert-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
}

.expert-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.expert-avatar {
    width: 120px;
    height: 120px;
    margin: 20px auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.expert-card h3 {
    margin: 15px 0 5px;
}

.expert-role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
}

.expert-card p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    min-height: 60px;
}

.expert-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 15px;
    border-top: 1px solid var(--border-light);
}

.expert-actions a {
    flex: 1;
    padding: 8px 12px;
    background-color: var(--bg-light);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.expert-actions a:hover {
    background-color: var(--primary);
    color: white;
}

/* FAQ 部分 */
.faq-item {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-dark);
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px;
}

.faq-answer p {
    margin: 0;
    color: var(--text-light);
}

/* 评论部分 */
.review-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.review-info h4 {
    margin: 0;
    font-size: 1rem;
}

.review-time {
    color: var(--text-light);
    font-size: 0.85rem;
}

.review-rating {
    color: #f39c12;
    font-size: 0.9rem;
}

.review-content {
    color: var(--text-light);
    line-height: 1.6;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: #95a5a6;
}

.footer-bottom p {
    margin: 0;
    color: #95a5a6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    nav ul {
        gap: 15px;
    }

    .search-box input {
        width: 150px;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section {
        padding: 40px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 50px 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* 懒加载占位符 */
.lazy-load {
    background-color: var(--border-light);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
