/* Emerald Theme */
:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-light: #34D399;
    --secondary: #064E3B;
    --secondary-dark: #022c22;
    --secondary-light: #065F46;
    --accent: #F59E0B;
    --gold: #D97706;
    --dark: #1a1a1a;
    --darker: #0d0d0d;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #e9ecef;
    --shadow: rgba(16, 185, 129, 0.12);
    --shadow-lg: rgba(16, 185, 129, 0.22);
}

* {
    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: var(--dark);
    background: #f5f5f5;
}

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

/* Top Bar */
.top-bar {
    background: var(--secondary);
    color: rgba(255,255,255,0.9);
    padding: 8px 0;
    font-size: 0.85rem;
}

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

.top-bar-left {
    display: flex;
    gap: 20px;
}

.top-bar-right {
    display: flex;
    gap: 15px;
}

.top-bar a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: var(--accent);
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0,0,0,0.2);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-trophy {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(245,158,11,0.4);
}

.logo-text {
    color: white;
}

.logo-text-main {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 3px;
    line-height: 1;
}

.logo-text-sub {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

nav a:hover,
nav a.active {
    color: var(--dark);
    background: var(--accent);
}

/* Style Switcher */
.style-switcher {
    display: flex;
    gap: 8px;
}

.style-btn {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.style-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Main Content */
main {
    min-height: calc(100vh - 300px);
    padding: 40px 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 70px 40px;
    margin-bottom: 50px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 60px,
            rgba(245,158,11,0.05) 60px,
            rgba(245,158,11,0.05) 120px
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--dark);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.team-tag {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
}

.section-count {
    color: var(--gray);
    font-size: 1rem;
}

.count-number {
    font-weight: 700;
    color: var(--primary);
}

/* News Grid */
.news-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}

.layout-grid {
    grid-template-columns: repeat(var(--cols, 4), 1fr);
}

.news-card {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px var(--shadow-lg);
    border-color: var(--primary);
}

.news-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.news-image-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image-wrapper img {
    transform: scale(1.1);
}

.news-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.95);
    color: var(--dark);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
    white-space: nowrap;
    max-width: fit-content;
}

.news-info {
    padding: 16px;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-summary {
    display: none;
}

/* Standard Card */
.card-style-standard {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    cursor: default;
}

/* Responsive */
@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Taxonomy Pages */
.taxonomy-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.taxonomy-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
}

.taxonomy-item:hover {
    box-shadow: 0 4px 20px var(--shadow-lg);
    transform: translateY(-4px);
}

.taxonomy-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
}

.taxonomy-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.taxonomy-count {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========================================
   EMERALD THEME UNIQUE LAYOUT
   ======================================== */

/* Emerald: 自然清新竹叶布局 */
body.theme-emerald .news-grid {
    display: grid;
    gap: 28px;
    padding: 20px 0;
}

body.theme-emerald .news-card {
    border-radius: 6px 6px 20px 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    border-left: 5px solid #10B981;
}

body.theme-emerald .news-card:hover {
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.3);
    transform: translateY(-8px);
    border-left-width: 8px;
}

body.theme-emerald .news-card .news-image-wrapper {
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

body.theme-emerald .news-card .news-info {
    padding: 18px 20px 20px;
    background: linear-gradient(to bottom, #ffffff 0%, #ECFDF5 100%);
}

body.theme-emerald .news-card .news-title {
    font-weight: 700;
    color: #064E3B;
    letter-spacing: 0.2px;
}

body.theme-emerald .news-card .news-date-badge {
    background: #10B981;
    color: white;
    border-radius: 8px 8px 20px 20px;
    padding: 6px 14px;
    font-weight: 700;
}

/* Emerald 独特 Logo 样式 - 自然叶片 */
body.theme-emerald .logo-trophy {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #10B981, #064E3B);
    border-radius: 4px 50% 50% 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    position: relative;
    animation: leafSway 3s ease-in-out infinite;
}

body.theme-emerald .logo-trophy::before {
    content: '🍃';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.2rem;
    animation: leafBlow 4s ease-in-out infinite;
}

body.theme-emerald .logo-trophy::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(16, 185, 129, 0.2);
    border-radius: 4px 50% 50% 4px;
    animation: leafGlow 2s ease-in-out infinite alternate;
}

@keyframes leafSway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
}

@keyframes leafBlow {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-8px); }
}

@keyframes leafGlow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 20px 0 rgba(16, 185, 129, 0.3); }
}

body.theme-emerald .logo-text-main {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #064E3B;
}

body.theme-emerald .logo-text-sub {
    font-size: 0.7rem;
    color: #10B981;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Emerald 独特 Hero 样式 - 森林秘境 */
body.theme-emerald .hero-section {
    position: relative;
    padding: 72px 45px;
    margin-bottom: 50px;
    border-radius: 8px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at bottom, rgba(16, 185, 129, 0.3) 0%, transparent 70%),
        linear-gradient(180deg, #D1FAE5 0%, #10B981 40%, #064E3B 100%);
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.3);
}

body.theme-emerald .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(110deg, transparent 40%, rgba(16, 185, 129, 0.1) 45%, transparent 55%),
        linear-gradient(70deg, transparent 45%, rgba(16, 185, 129, 0.08) 50%, transparent 55%);
    background-size: 100% 100%;
}

body.theme-emerald .hero-section::after {
    content: '🌿';
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 60px;
    opacity: 0.3;
    animation: forestBreath 6s ease-in-out infinite;
}

@keyframes forestBreath {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

body.theme-emerald .hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

body.theme-emerald .hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    text-transform: uppercase;
}

body.theme-emerald .hero-title {
    font-size: 3.3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 22px;
    letter-spacing: -1px;
}

body.theme-emerald .hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 30px;
    max-width: 620px;
    font-weight: 600;
}

body.theme-emerald .team-tag {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 9px 19px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
}

body.theme-emerald .site-header {
    border-bottom: 5px solid #065F46;
}

body.theme-emerald .hero-section {
    border-radius: 8px;
    background: linear-gradient(135deg, #D1FAE5 0%, #10B981 50%, #064E3B 100%);
}

@media (max-width: 768px) {
    body.theme-emerald .news-card {
        border-radius: 12px;
        border-left-width: 3px;
    }

    body.theme-emerald .news-card:hover {
        border-left-width: 5px;
    }

    body.theme-emerald .hero-section {
        border-radius: 16px;
        padding: 50px 25px;
    }

    body.theme-emerald .hero-title {
        font-size: 2rem;
    }

    body.theme-emerald .logo-trophy {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }
}

/* ========================================
   EMERALD THEME - UNIQUE CONTENT LAYOUT
   ======================================== */

/* Emerald: 自然流动布局 - Logo竖排，Hero badge在底部 */
body.theme-emerald .logo {
    flex-direction: column;
    gap: 8px;
}

body.theme-emerald .logo-text {
    text-align: center;
}

body.theme-emerald .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

body.theme-emerald .hero-badge {
    order: 10;
    margin-bottom: 0;
    margin-top: 30px;
    align-self: flex-start;
}

@media (max-width: 768px) {
    body.theme-emerald .logo {
        flex-direction: row;
        gap: 15px;
    }

    body.theme-emerald .hero-content {
        min-height: auto;
    }
}
