/* Global Styles */
:root {
    --primary-color: #0066cc;
    --secondary-color: #ff6b6b;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --gray: #999;
}

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

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

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

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav a {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #fff5f7 0%, #fff 100%);
    color: var(--text-color);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
}

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

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* Category Nav */
.category-nav {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.category-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.category-item:hover {
    transform: translateY(-3px);
}

.category-icon {
    width: 50px;
    height: 50px;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.category-name {
    font-size: 14px;
    color: #333;
}

/* Layout Grid for Main Content */
.main-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Ranking List */
.ranking-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
}

.ranking-title {
    font-size: 18px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ranking-list {
    counter-reset: rank;
}

.ranking-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}

.ranking-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ranking-item::before {
    counter-increment: rank;
    content: counter(rank);
    width: 24px;
    height: 24px;
    background: #eee;
    color: #666;
    border-radius: 4px;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    margin-right: 10px;
    font-weight: bold;
}

.ranking-item:nth-child(1)::before { background: #ff4757; color: #fff; }
.ranking-item:nth-child(2)::before { background: #ff6b81; color: #fff; }
.ranking-item:nth-child(3)::before { background: #ffa502; color: #fff; }

.ranking-info {
    flex: 1;
    overflow: hidden;
}

.ranking-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.ranking-hot {
    font-size: 12px;
    color: #999;
}

/* News List */
.news-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.news-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: background 0.3s;
}

.news-item:hover {
    background: #f9f9f9;
}

.news-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-content p {
    font-size: 13px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* App Banner */
.app-banner {
    background: linear-gradient(90deg, var(--primary-color), #00c6ff);
    border-radius: 12px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.app-banner-content {
    z-index: 2;
    max-width: 60%;
}

.app-banner h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.app-banner p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.app-btns {
    display: flex;
    gap: 15px;
}

.app-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 10px 20px;
    border-radius: 30px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.app-btn:hover {
    background: rgba(255,255,255,0.3);
}

.app-qr {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-qr img {
    width: 100%;
    height: 100%;
}

/* Search Box */
.hero-search {
    max-width: 600px;
    margin: 30px auto;
    position: relative;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #eee;
    border-radius: 30px 0 0 30px;
    outline: none;
    font-size: 16px;
}

.search-btn {
    padding: 0 30px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-size: 18px;
}

/* Creator Spotlight */
.creator-section {
    background: #f9f9f9;
    padding: 60px 0;
}

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

.creator-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

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

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.creator-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.creator-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.creator-stats {
    display: flex;
    justify-content: space-around;
    font-size: 12px;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Video Cards */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 40px 0;
}

.video-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
}

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

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

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

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

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

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

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* Footer */
footer {
    background: #2c3e50;
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 50px;
}

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

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

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    font-size: 14px;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
}

/* AI Features */
.ai-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

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

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

.module-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    
    .main-nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 24px;
    }
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--gray);
}

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

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

.breadcrumb span {
    margin: 0 5px;
}

.breadcrumb .current {
    color: var(--primary-color);
    font-weight: bold;
}

/* Video Description */
.video-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    height: 39px; /* 2 lines * 1.5 line-height * 13px */
}
