/* 糖心vlog - 全站样式表 */
/* cdmyjz.cn */

:root {
    --primary-color: #FF6B9D;
    --secondary-color: #FF8A80;
    --accent-color: #FFB6C1;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #FF6B9D 0%, #FF8A80 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.logo-text {
    font-size: 24px;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

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

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

/* 搜索框 */
.search-bar {
    background: var(--light-bg);
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--primary-color);
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
}

.search-btn {
    padding: 12px 30px;
    background: var(--gradient);
    border: none;
    border-radius: 0 25px 25px 0;
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.search-btn:hover {
    opacity: 0.9;
}

/* Banner轮播 */
.banner {
    position: relative;
    overflow: hidden;
    height: 500px;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--white);
}

.banner-content h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.banner-content p {
    font-size: 18px;
    opacity: 0.9;
}

/* 区块标题 */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-light);
    font-size: 16px;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gradient);
    margin: 15px auto 0;
}

/* 视频卡片 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.video-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.video-thumbnail {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

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

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

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

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

.play-btn::after {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent white;
    margin-left: 4px;
}

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

.video-info {
    padding: 15px;
}

.video-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.video-stats {
    display: flex;
    gap: 15px;
}

/* 专家卡片 */
.expert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.expert-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.expert-card:hover {
    transform: translateY(-5px);
}

.expert-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--accent-color);
}

.expert-card h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

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

.expert-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.expert-btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 20px;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.expert-btn:hover {
    opacity: 0.9;
}

/* 社区模块 */
.community-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.community-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
}

.community-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
}

.community-overlay h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 步骤指南 */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.step-card {
    text-align: center;
    padding: 30px 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* 联系我们 */
.contact-section {
    background: var(--dark-bg);
    color: var(--white);
}

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

.contact-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.contact-item p {
    margin-bottom: 10px;
    opacity: 0.9;
}

.qrcode-wrap {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

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

.qrcode-item img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.qrcode-item span {
    font-size: 12px;
    opacity: 0.8;
}

/* 用户评价 */
.review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.review-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
}

.review-name {
    font-weight: bold;
}

.review-rating {
    color: #FFD700;
}

.review-content {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
}

/* 页脚 */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
    opacity: 0.8;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

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

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

.footer-links a {
    opacity: 0.8;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

.footer-bottom a {
    color: var(--accent-color);
}

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    background: var(--light-bg);
    font-size: 14px;
}

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

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

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

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: 5px;
    background: var(--light-bg);
    color: var(--text-dark);
}

.pagination a:hover,
.pagination span.active {
    background: var(--gradient);
    color: var(--white);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

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

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

/* 响应式设计 */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }
    
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .banner {
        height: 300px;
    }
    
    .banner-content h2 {
        font-size: 24px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .community-grid {
        grid-template-columns: 1fr;
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 懒加载占位 */
.lazy-load {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
