* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1565c0;
    --primary-dark: #0d47a1;
    --primary-light: #42a5f5;
    --accent: #00838f;
    --accent-soft: #e0f7fa;
    --soft-bg: #e3f2fd;
    --page-bg: #eef2f7;
    --surface: #ffffff;
    --text-main: #1a2332;
    --text-muted: #5a6578;
    --border: #d0dae8;
    --shadow: 0 8px 32px rgba(21, 101, 192, 0.08);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    background: var(--page-bg);
    background-image: linear-gradient(180deg, #dce8f5 0%, var(--page-bg) 280px);
    color: var(--text-main);
    line-height: 1.65;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header — flat bar with accent underline */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 2px solid var(--primary);
    background: var(--surface);
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.logo-area { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }

.logo-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
}

.logo-text { font-weight: 700; font-size: 20px; letter-spacing: 1px; }
.logo-text span { color: var(--primary); }

.nav { display: flex; gap: 8px; font-weight: 500; flex-wrap: wrap; }
.nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 15px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: var(--soft-bg); color: var(--primary); }
.nav a.active { background: var(--primary); color: white; }

.header-actions { display: flex; gap: 10px; align-items: center; }

.btn-outline {
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    padding: 7px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-solid {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-solid:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.35);
    color: white;
}

/* Hero — split layout with accent block */
.hero {
    padding: 56px 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero-content h1 .highlight {
    color: var(--primary);
    position: relative;
    display: inline;
}
.hero-content h1 .highlight::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 100%;
    height: 8px;
    background: var(--accent-soft);
    z-index: -1;
    border-radius: 2px;
}

.hero .lead,
.hero-content .lead {
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 28px;
    line-height: 1.75;
}

.hero-panel {
    background: linear-gradient(145deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: white;
}

.hero-panel .panel-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.85;
    margin-bottom: 16px;
}

.hero-panel .panel-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.hero-panel .panel-stat:last-child { border-bottom: none; }
.hero-panel .panel-stat strong { font-size: 32px; font-weight: 800; }
.hero-panel .panel-stat span { font-size: 15px; opacity: 0.9; }

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.stat-item {
    font-size: 14px;
    color: var(--text-muted);
    padding-left: 12px;
    border-left: 3px solid var(--primary-light);
}
.stat-item strong {
    font-size: 24px;
    color: var(--primary);
    display: block;
    margin-bottom: 2px;
}

/* Translate card — bordered panel style */
.translate-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
    margin: 24px 0 40px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
}

.lang-selector {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border);
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--soft-bg);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.lang-item select { border: none; background: transparent; font-weight: 600; padding: 2px; outline: none; color: var(--primary-dark); }

.swap-icon {
    background: var(--accent-soft);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b2ebf2;
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
}

.text-areas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.text-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    background: #fafcff;
}
.text-box textarea {
    width: 100%;
    height: 160px;
    border: none;
    resize: none;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    background: transparent;
    color: var(--text-main);
}

.translate-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.btn-translate {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 36px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.lang-hint { margin-left: auto; color: var(--text-muted); font-size: 13px; }
.text-tools { display: flex; gap: 12px; margin-top: 12px; color: var(--text-muted); }
.text-box-output { background: #f5f9ff; }
.action-hint { margin-left: 16px; color: var(--text-muted); font-size: 14px; }
.action-note { font-size: 14px; color: var(--text-muted); }

.section-title {
    font-size: 26px;
    font-weight: 700;
    margin: 48px 0 24px;
    color: var(--text-main);
    padding-left: 14px;
    border-left: 4px solid var(--primary);
}

/* Features — horizontal accent cards */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.feature-card {
    background: var(--surface);
    padding: 24px 24px 24px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.feature-icon {
    background: var(--soft-bg);
    min-width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 1px solid #bbdefb;
}

.feature-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary-dark); }
.feature-card p { color: var(--text-muted); font-size: 15px; }

/* Human translation — light panel */
.human-trans-banner {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    margin: 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}
.human-trans-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
}
.human-trans-banner h3 { font-size: 24px; color: var(--text-main); margin-top: 12px; }
.human-trans-banner p { margin-top: 10px; color: var(--text-muted); font-size: 15px; }

.tag-badge {
    display: inline-block;
    background: var(--soft-bg);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #bbdefb;
}

.update-time {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
}

.human-trans-banner .btn-solid {
    background: var(--primary);
    padding: 12px 28px;
}

/* Info / tech box */
.info-box {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin: 24px 0;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
}

.info-box p { color: var(--text-muted); font-size: 16px; }
.info-box h3 { color: var(--primary-dark); margin-bottom: 12px; }

.tech-metrics {
    margin-top: 20px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.tech-metrics div {
    background: var(--soft-bg);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}
.tech-metrics span { font-weight: 800; color: var(--primary); font-size: 18px; display: block; }

/* Article list — table-like rows */
.article-list { display: flex; flex-direction: column; gap: 0; margin: 32px 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }

.article-list a {
    display: block;
    background: var(--surface);
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.article-list a:last-child { border-bottom: none; }
.article-list a:hover { background: var(--soft-bg); }
.article-list h3 { color: var(--primary); margin-bottom: 6px; font-size: 17px; }
.article-list p { color: var(--text-muted); font-size: 14px; }

/* Page hero */
.page-hero { padding: 40px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.page-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; color: var(--primary-dark); }
.page-hero .subtitle { font-size: 16px; color: var(--text-muted); max-width: 680px; }

/* Download grid */
.download-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 36px 0; }

.download-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: border-color 0.2s, transform 0.2s;
}
.download-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.download-card .platform-icon { font-size: 40px; margin-bottom: 12px; }
.download-card h3 { font-size: 18px; margin-bottom: 6px; color: var(--primary-dark); }
.download-card .version { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }

.btn-download {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 10px;
    width: 100%;
    transition: background 0.2s;
}
.btn-download:hover { background: var(--primary-dark); color: white; }

/* Article content */
.article-content {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 36px 40px;
    margin: 24px 0 48px;
    border: 1px solid var(--border);
}
.article-content h2 {
    font-size: 22px;
    margin: 28px 0 14px;
    color: var(--primary-dark);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--soft-bg);
}
.article-content h2:first-of-type { margin-top: 0; }
.article-content p { margin-bottom: 14px; color: var(--text-muted); font-size: 16px; }
.article-content ul { margin: 14px 0 14px 22px; color: var(--text-muted); }
.article-content li { margin-bottom: 6px; }
.article-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }

.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; padding-top: 16px; }
.breadcrumb a { color: var(--primary); text-decoration: none; }

/* Footer */
.footer {
    margin-top: 56px;
    padding: 28px 0;
    border-top: 2px solid var(--border);
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
}
.footer a { color: var(--text-muted); text-decoration: none; margin-right: 20px; }
.footer a:hover { color: var(--primary); }

.download-card .meta-note { color: var(--text-muted); font-size: 13px; margin-top: 10px; }

/* Legacy variable aliases */
:root { --primary-red: var(--primary); --hover-red: var(--primary-dark); --soft-red: var(--soft-bg); --gray-bg: var(--soft-bg); --border-light: var(--border); }
.red-bg { color: var(--primary); }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 28px; }
    .hero-content h1 { font-size: 30px; }
    .features-grid, .download-grid { grid-template-columns: repeat(2, 1fr); }
    .text-areas { grid-template-columns: 1fr; }
    .nav { gap: 4px; }
    .article-content { padding: 24px 20px; }
}

@media (max-width: 560px) {
    .features-grid, .download-grid { grid-template-columns: 1fr; }
    .hero-panel .panel-stat strong { font-size: 26px; }
}
