/* ===== CSS Variables ===== */
:root {
    /* Light Theme */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-light: #dbeafe;
    --accent-dark: #1d4ed8;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-card: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #60a5fa;
    --accent-light: #1e3a5f;
    --accent-dark: #93c5fd;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --gradient-hero: linear-gradient(135deg, #4c1d95 0%, #1e3a8a 100%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-dark);
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

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

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-cn {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

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

.theme-toggle {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
    border-color: var(--accent);
}

.icon-sun,
.icon-moon {
    font-size: 1.25rem;
}

[data-theme="dark"] .icon-sun {
    display: none;
}

[data-theme="light"] .icon-moon,
:root:not([data-theme]) .icon-moon {
    display: none;
}

/* ===== Hero Section ===== */
.hero {
    background: var(--gradient-hero);
    padding: 80px 0;
    color: white;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

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

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.badge.highlight {
    background: rgba(251, 191, 36, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.5);
}

/* ===== Hero Carousel ===== */
.hero-carousel {
    position: relative;
    min-height: 320px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    border-color: white;
}

.carousel-dot.active {
    background: white;
    border-color: white;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

/* Citation Highlight */
.citation-highlight {
    text-align: center;
}

.citation-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

/* Call Cards */
.call-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.call-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    min-width: 250px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.call-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.call-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.call-card p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.call-btn {
    display: inline-block;
    background: white;
    color: #4c1d95;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #4c1d95;
}

@media (max-width: 768px) {
    .carousel-arrow {
        display: none;
    }

    .call-cards {
        flex-direction: column;
        align-items: center;
    }

    .call-card {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
}

/* ===== Filter Section ===== */
.filter-section {
    padding: 60px 0 40px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.filter-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ===== Journals Grid ===== */
.journals-section {
    padding: 20px 0 80px;
}

.journals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

/* ===== Journal Card ===== */
.journal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.journal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.journal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.journal-card:hover::before {
    opacity: 1;
}

.journal-card.featured {
    background: var(--gradient-card);
    border-color: var(--accent);
}

.journal-card.featured::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.journal-icon {
    font-size: 2rem;
}

.journal-lang {
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Tier Badges */
.tier-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.a1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
}

.tier-badge.a2 {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

.tier-badge.b {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
}

.tier-badge.c1 {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
}

.tier-badge.c2 {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Tier-based card styling */
.journal-card.tier-a1 {
    border-left: 4px solid #f59e0b;
}

.journal-card.tier-a2 {
    border-left: 4px solid #8b5cf6;
}

.journal-card.tier-b {
    border-left: 4px solid #3b82f6;
}

.journal-card.tier-c1 {
    border-left: 4px solid #10b981;
}

.journal-card.tier-c2 {
    border-left: 4px solid var(--border);
}

/* Filter button tier colors */
.filter-btn.tier-a1.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #f59e0b;
    color: #78350f;
}

.filter-btn.tier-a2.active {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    border-color: #8b5cf6;
}

.filter-btn.tier-b.active {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border-color: #3b82f6;
}

.filter-btn.tier-c1.active {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    border-color: #10b981;
}

.filter-btn.tier-c2.active {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}

.journal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.journal-title-en {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.journal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.issn,
.doi {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Consolas', monospace;
}

.journal-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.journal-indexed {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.index-badge {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.index-badge.cnki {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

[data-theme="dark"] .index-badge.cnki {
    background: #78350f;
    border-color: #f59e0b;
    color: #fef3c7;
}

.journal-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--accent);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.journal-link:hover {
    background: var(--accent-dark);
    color: white;
    transform: translateX(4px);
}

.link-domain {
    font-weight: 400;
    opacity: 0.8;
    font-size: 0.75rem;
}

/* ===== About Section ===== */
.about-section {
    background: var(--bg-secondary);
    padding: 80px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.about-info {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.about-info p {
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.publisher-badge {
    background: var(--gradient-hero);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.badge-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.badge-text {
    font-size: 1.125rem;
    font-weight: 600;
}

/* ===== Impact Section ===== */
.impact-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.impact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.impact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.impact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.impact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #8b5cf6);
}

.impact-card.editorial::before {
    background: linear-gradient(90deg, #10b981, #3b82f6);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.impact-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.mini-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.mini-stat {
    text-align: center;
    flex: 1;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.mini-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.mini-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.source-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.source-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.source-badge.level-a {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.source-badge.level-b {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--accent);
}

[data-theme="dark"] .source-badge.level-a {
    background: linear-gradient(135deg, #78350f, #92400e);
    color: #fef3c7;
}

.card-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Dual Section (Editorial + Call for Papers) */
.dual-section {
    display: flex;
    flex-direction: row;
    gap: 24px;
    height: 100%;
}

.section-item {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-item h3 {
    margin-bottom: 8px;
}

.section-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.section-divider {
    width: 1px;
    background: var(--border);
}

.apply-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.apply-btn:hover {
    background: var(--accent-dark);
    color: white;
    transform: translateY(-2px);
}

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

/* ===== Contact Section ===== */
.contact-section {
    padding: 80px 0;
}

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

.contact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 16px;
}

.contact-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.contact-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.journal-card {
    animation: fadeInUp 0.5s ease forwards;
}

.journal-card:nth-child(1) {
    animation-delay: 0.05s;
}

.journal-card:nth-child(2) {
    animation-delay: 0.1s;
}

.journal-card:nth-child(3) {
    animation-delay: 0.15s;
}

.journal-card:nth-child(4) {
    animation-delay: 0.2s;
}

.journal-card:nth-child(5) {
    animation-delay: 0.25s;
}

.journal-card:nth-child(6) {
    animation-delay: 0.3s;
}

.journal-card:nth-child(7) {
    animation-delay: 0.35s;
}

.journal-card:nth-child(8) {
    animation-delay: 0.4s;
}

.journal-card:nth-child(9) {
    animation-delay: 0.45s;
}

.journal-card:nth-child(10) {
    animation-delay: 0.5s;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .journals-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
}