/* ============================================================
   FlowPix — Dark Tech Theme
   Deep navy + cyan/purple accents + glass morphism
   Completely different from the Chinese site's clean white style
   ============================================================ */

/* === Design Tokens === */
:root {
    --primary: #06b6d4;
    --primary-light: #22d3ee;
    --secondary: #8b5cf6;
    --accent-pink: #ec4899;
    --bg: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: #1e293b;
    --bg-card-hover: #273548;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-bright: #f8fafc;
    --border: rgba(148, 163, 184, 0.12);
    --border-glow: rgba(6, 182, 212, 0.25);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 40px rgba(6,182,212,0.15);
    --glass: rgba(30,41,59,0.7);
    --glass-border: rgba(148,163,184,0.08);
}

/* === Navigation === */
.main-nav {
    display: flex;
    gap: 2px;
}
.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.25s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    background: rgba(6,182,212,0.1);
    color: var(--primary);
    text-decoration: none;
}
.nav-link.active {
    background: rgba(6,182,212,0.15);
    color: var(--primary-light);
    font-weight: 600;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text);
}

/* === Hero Section === */
.hero {
    text-align: center;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(6,182,212,0.15) 0%, rgba(139,92,246,0.08) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(6,182,212,0.12);
    border: 1px solid rgba(6,182,212,0.25);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    color: var(--text-bright);
}
.hero-highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}
.stat-item {
    text-align: center;
}
.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-light);
    letter-spacing: -1px;
}
.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* === Section Titles === */
.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.5px;
}
.section-header {
    margin-bottom: 32px;
}
.section-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* === Category Section === */
.category-section {
    margin-bottom: 64px;
}
.category-section .section-title {
    margin-bottom: 24px;
}
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.category-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px 20px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent, var(--primary));
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}
.category-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
    text-decoration: none;
}
.category-card:hover::before {
    transform: scaleX(1);
}
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(6,182,212,0.1);
    color: var(--accent, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.category-card h2, .category-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-bright);
}
.category-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.5;
}
.card-count {
    font-size: 12px;
    color: var(--accent, var(--primary));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Featured Article === */
.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
    transition: all 0.3s;
}
.featured-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}
.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 300px;
}
.featured-body {
    padding: 32px 32px 32px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.featured-body h3 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    margin: 12px 0 16px;
    letter-spacing: -0.5px;
}
.featured-body h3 a {
    color: var(--text-bright);
}
.featured-body h3 a:hover {
    color: var(--primary);
    text-decoration: none;
}
.featured-body p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}
.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}
.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}
.read-more:hover {
    text-decoration: none;
    color: var(--primary-light);
}

/* === Article Grid === */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.article-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}
.card-image {
    display: block;
    overflow: hidden;
}
.card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.article-card:hover .card-image img {
    transform: scale(1.05);
}
.card-body {
    padding: 20px;
}
.card-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent, var(--primary));
    letter-spacing: 1px;
}
.card-body h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 8px 0;
    line-height: 1.4;
}
.card-body h3 a {
    color: var(--text-bright);
}
.card-body h3 a:hover {
    color: var(--primary);
    text-decoration: none;
}
.card-body > p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.6;
}
.card-body > time {
    font-size: 12px;
    color: var(--text-muted);
}
.card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

/* === Breadcrumb === */
.breadcrumb ol {
    display: flex;
    list-style: none;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    padding: 20px 0;
}
.breadcrumb li + li::before {
    content: "›";
    margin-right: 8px;
    color: var(--text-muted);
}
.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--primary);
}

/* === Article Page === */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}
.article-content {
    min-width: 0;
}
.article-header {
    margin-bottom: 32px;
}
.article-category {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent, var(--primary));
    text-transform: uppercase;
    letter-spacing: 1px;
}
.article-header h1 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 900;
    line-height: 1.25;
    margin: 12px 0;
    letter-spacing: -1px;
    color: var(--text-bright);
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
}
.article-cover img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 32px;
}

/* Article Body Typography */
.article-body {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
}
.article-body h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 48px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-bright);
}
.article-body h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 36px 0 12px;
    color: var(--text-bright);
}
.article-body p {
    margin-bottom: 18px;
}
.article-body ul, .article-body ol {
    margin: 18px 0;
    padding-left: 24px;
}
.article-body li {
    margin-bottom: 10px;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15px;
}
.article-body th, .article-body td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}
.article-body th {
    background: var(--bg-surface);
    font-weight: 700;
    color: var(--text-bright);
}
.article-body strong {
    font-weight: 700;
    color: var(--text-bright);
}
.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 28px 0;
    background: rgba(6,182,212,0.06);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
}
.article-body code {
    background: rgba(148,163,184,0.12);
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 15px;
    color: var(--primary-light);
}
.article-body pre {
    background: #0c1222;
    color: #cdd6f4;
    padding: 24px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 28px 0;
    border: 1px solid var(--border);
}
.article-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}
.article-body img {
    border-radius: var(--radius-sm);
    margin: 18px 0;
}
.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article-body a:hover {
    color: var(--primary-light);
}
.ai-image {
    margin: 28px 0;
    text-align: center;
}
.ai-image img {
    border-radius: var(--radius-sm);
}
.ai-image figcaption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* === Sidebar === */
.article-sidebar {
    position: sticky;
    top: 80px;
}
.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.sidebar-section h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-bright);
}
.related-list {
    list-style: none;
}
.related-list li {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.related-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.related-list a {
    display: block;
    color: var(--text);
}
.related-list a:hover {
    text-decoration: none;
}
.related-list a:hover .related-title {
    color: var(--primary);
}
.related-title {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    transition: color 0.2s;
    color: var(--text);
}
.related-list time {
    font-size: 12px;
    color: var(--text-muted);
}

/* === Category Page Header === */
.category-header {
    padding: 48px 0 36px;
    text-align: center;
}
.category-header h1 {
    font-size: 36px;
    font-weight: 900;
    color: var(--accent, var(--primary));
    letter-spacing: -0.5px;
}
.category-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 640px;
    margin: 14px auto 0;
    line-height: 1.7;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 24px 0 48px;
}
.page-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.page-link.active, .page-link:hover {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
    text-decoration: none;
}

/* === 404 Page === */
.error-page {
    text-align: center;
    padding: 100px 0;
    position: relative;
}
.error-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(139,92,246,0.12), transparent 70%);
    pointer-events: none;
}
.error-page h1 {
    font-size: 120px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    position: relative;
}
.error-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 12px 0 8px;
}
.error-page p {
    font-size: 16px;
    color: var(--text-muted);
    margin: 8px 0;
}
.btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 700;
    margin-top: 24px;
    font-size: 15px;
    transition: all 0.25s;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6,182,212,0.3);
    text-decoration: none;
    color: white;
}
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--text-muted);
    grid-column: 1/-1;
    font-size: 16px;
}

/* === Footer === */
.site-footer {
    background: #0c1222;
    color: var(--text-muted);
    padding: 56px 0 28px;
    margin-top: 80px;
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 36px;
}
.footer-brand .logo {
    color: var(--text-bright);
    font-size: 20px;
    display: inline-block;
    margin-bottom: 12px;
}
.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
}
.footer-desc {
    margin-top: 8px;
}
.footer-nav h4 {
    color: var(--text-bright);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-nav ul {
    list-style: none;
}
.footer-nav li {
    margin-bottom: 10px;
}
.footer-nav a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s;
}
.footer-nav a:hover {
    color: var(--primary);
    text-decoration: none;
}
.footer-bottom {
    border-top: 1px solid rgba(148,163,184,0.08);
    padding-top: 24px;
    font-size: 13px;
    text-align: center;
}

/* === Responsive === */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(15,23,42,0.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .hero {
        padding: 48px 0 32px;
    }
    .hero h1 {
        letter-spacing: -0.5px;
    }
    .hero-stats {
        gap: 24px;
    }
    .stat-number {
        font-size: 24px;
    }
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-body {
        padding: 24px;
    }
    .featured-image img {
        min-height: 200px;
    }
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        position: static;
    }
    .article-grid {
        grid-template-columns: 1fr;
    }
    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 480px) {
    .category-cards {
        grid-template-columns: 1fr;
    }
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
}

/* === About Page === */
.about-page {
    max-width: 800px;
    margin: 0 auto;
}
.about-tagline {
    font-size: 1.15em;
    color: var(--text-muted);
    margin-top: 8px;
}
