/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fbf8;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
header {
    background-color: #27ae60;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #e8f5e9;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 汉堡菜单按钮动画 */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}
#friendlink{display: block;}
#friendlink .content{
    display: flex;
    flex-direction: column;
    align-items: self-start;
    justify-content: center;
} 
#friendlink .content h2{ 
    font-size: 16px;
    color: #fff;
}
#friendlink .content .flinks{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}
#friendlink .content .flinks a{
    font-size: 14px;
    text-align: left;
    color:#fff;
    text-decoration: none;
}
/* 响应式导航栏 */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        z-index: 1000;
    }
    
    .nav-links {
        position: fixed;
        top: 46px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 20px rgba(0,0,0,0.2);
        transform: translateY(-100%);
        transition: transform 0.3s ease, background 0.3s ease;
        z-index: 999;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateY(0);
        display:flex;
    }
    
    .nav-links li {
        margin: 10px 0;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.35s; }
    .nav-links.active li:nth-child(7) { transition-delay: 0.4s; }
    
    .nav-links a {
        font-size: 20px;
        padding: 12px 30px;
        color: #fff;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-radius: 30px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }
    
    .nav-links a::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.6s ease;
    }
    
    .nav-links a:hover::before {
        left: 100%;
    }
    
    .nav-links a.active {
        background-color: rgba(255, 255, 255, 0.3);
        font-weight: 700;
    }
    #friendlink{display: none;}
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #27ae60 0%, #229954 50%, #1e8449 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-primary {
    background-color: #fff;
    color: #27ae60;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #e8f5e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* 视频部分 */
.popular-section,
.latest-section {
    padding: 80px 0;
}

.category-section {
    padding: 60px 0;
    background-color: #fff;
}

.popular-section h2,
.category-section h2,
.latest-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: #27ae60;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.video-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px 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 10px 20px rgba(0,0,0,0.15);
}

.video-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: vod_pic;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(46, 204, 113, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 26px;
    border-color: transparent transparent transparent #fff;
    margin-left: 6px;
}

.video-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(46, 204, 113, 1);
}

.video-thumbnail svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #27ae60;
}

.video-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.video-category {
    background-color: #27ae60;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.video-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 分类卡片 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: #f8fbf8;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: #27ae60;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background-color: #e8f5e9;
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.category-card p {
    color: #666;
    font-size: 14px;
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin-top: 40px;
}

/* 底部 */
footer {
    background-color: #27ae60;
    color: #fff;
    padding: 60px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo p {
    margin-top: 20px;
    color: #e8f5e9;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #e8f5e9;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    text-decoration: none;
    color: #e8f5e9;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-contact p {
    margin-bottom: 10px;
    color: #e8f5e9;
}

.footer-bottom {
    border-top: 1px solid #229954;
    padding-top: 20px;
    text-align: center;
    color: #e8f5e9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .popular-section h2,
    .category-section h2,
    .latest-section h2 {
        font-size: 2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}