/* 全局样式 */
:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --accent: #e74c3c;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333;
    --text-light: #666;
    --border: #ddd;
}

body.ui-style-0 { --primary: #3498db; }
body.ui-style-1 { --primary: #2ecc71; }
body.ui-style-2 { --primary: #e74c3c; }
body.ui-style-3 { --primary: #f39c12; }
body.ui-style-4 { --primary: #9b59b6; }
body.ui-style-5 { --primary: #1abc9c; }
body.ui-style-6 { --primary: #34495e; }
body.ui-style-7 { --primary: #16a085; }
body.ui-style-8 { --primary: #27ae60; }
body.ui-style-9 { --primary: #2980b9; }
body.ui-style-10 { --primary: #8e44ad; }
body.ui-style-11 { --primary: #c0392b; }
body.ui-style-12 { --primary: #d35400; }
body.ui-style-13 { --primary: #7f8c8d; }
body.ui-style-14 { --primary: #2c3e50; }
body.ui-style-15 { --primary: #1abc9c; }

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 首页样式 */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

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

.intro {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.card-grid, .card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card, .card-full, .card-ranked, .card-topic, .card-latest {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.card:hover, .card-full:hover, .card-ranked:hover, .card-topic:hover, .card-latest:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card h3, .card-full h3, .card-ranked h3, .card-topic h3, .card-latest h3 {
    margin-bottom: 0.5rem;
}

.card h3 a, .card-full h3 a, .card-ranked h3 a, .card-topic h3 a, .card-latest h3 a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 1.1rem;
}

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

.meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.desc, .oneline, .brief {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.more {
    text-align: center;
    margin-top: 2rem;
}

.more a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.more a:hover {
    text-decoration: underline;
}

/* 列表页特殊样式 */
.page-header {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.page-header .intro {
    background: none;
    padding: 0;
    margin: 0;
}

.rank {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: bold;
}

.date, .tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.genre {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

/* 详情页样式 */
.video-detail {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
}

.video-detail header h1 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.video-detail section {
    margin-bottom: 2rem;
}

.video-detail section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.basic-info ul {
    list-style: none;
}

.basic-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.basic-info strong {
    color: var(--secondary);
    margin-right: 0.5rem;
}

.oneline p, .summary p, .review p {
    line-height: 1.8;
    color: var(--text);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: var(--bg);
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.related-card h4 {
    margin-bottom: 0.5rem;
}

.related-card h4 a {
    color: var(--secondary);
    text-decoration: none;
}

.related-card h4 a:hover {
    color: var(--primary);
}

/* 响应式 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .card-grid, .card-list, .related-grid {
        grid-template-columns: 1fr;
    }

    main {
        padding: 0 0.5rem;
    }
}