/* 全局样式表 */
:root {
    --primary-color: #ff6b81;
    --secondary-color: #ff9ff3;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f5f6fa;
    --white: #ffffff;
    --black: #000000;
    --border-color: #dfe6e9;
    --hover-color: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 布局工具 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 头部导航 */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    margin-right: 15px;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-menu li a {
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

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

.nav-menu li a:hover::after,
.nav-menu li.active a::after {
    width: 100%;
}

/* 搜索框区域 */
.search-bar {
    padding: 15px 0;
    background-color: var(--white);
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.search-btn:hover {
    background-color: var(--hover-color);
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-dark);
}

.breadcrumb span {
    margin: 0 5px;
}

/* 标题样式 */
.section-title {
    text-align: center;
    margin: 40px 0 30px;
    position: relative;
}

.section-title h2 {
    font-size: 28px;
    color: var(--text-dark);
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.section-title p {
    color: var(--text-light);
    margin-top: 10px;
    font-size: 14px;
}

/* 视频卡片样式 */
.video-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.video-thumb {
    position: relative;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 107, 129, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.play-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid white;
    margin-left: 5px;
}

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

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 12px;
}

.video-tags {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.video-tag {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* 专家卡片 */
.expert-card {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.expert-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid var(--secondary-color);
}

.expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.expert-title {
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.expert-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

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

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

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

/* FAQ样式 */
.faq-list {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-q {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

.faq-q::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--primary-color);
}

.faq-item.active .faq-q::after {
    content: '-';
}

.faq-a {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 14px;
    display: none;
    line-height: 1.8;
}

.faq-item.active .faq-a {
    display: block;
}

/* 评论区样式 */
.review-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.review-item {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 15px;
}

.review-info h4 {
    font-size: 15px;
    margin-bottom: 2px;
}

.review-stars {
    color: #f1c40f;
    font-size: 12px;
}

.review-content {
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
}

/* 底部样式 */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-about h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-about p {
    color: #b2bec3;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-contact li {
    color: #b2bec3;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.footer-contact li i {
    margin-right: 10px;
    color: var(--primary-color);
    margin-top: 3px;
}

.footer-links h4, .footer-qrcode h4 {
    font-size: 16px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after, .footer-qrcode h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

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

.footer-links a {
    color: #b2bec3;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.qrcode-box {
    display: flex;
    gap: 15px;
}

.qr-item {
    text-align: center;
}

.qr-item img {
    width: 100px;
    height: 100px;
    background: white;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 5px;
}

.qr-item span {
    font-size: 12px;
    color: #b2bec3;
}

.footer-bottom {
    border-top: 1px solid #636e72;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #b2bec3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .footer-top {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none; /* 移动端应使用汉堡菜单，此处简化处理 */
    }
    
    .header-top {
        justify-content: center;
    }
}
