/* ==========================================================================
   download.css — page-specific styles for zh-Hans/download.html
   Depends on index.css (design tokens and base resets must be loaded first).
   ========================================================================== */

/* ==========================================================================
   1. Hero
   ========================================================================== */
.dl-hero {
    background: var(--bg-main);
    padding: 96px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 35%, rgba(255,126,95,0.13) 0%, transparent 46%),
        radial-gradient(circle at 82% 65%, rgba(94,92,230,0.09) 0%, transparent 46%),
        radial-gradient(circle at 50% 0%,  rgba(254,180,123,0.10) 0%, transparent 36%);
    pointer-events: none;
}

.dl-hero .section-label {
    color: var(--brand);
}

.dl-hero-title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.05;
    color: var(--text-main);
    margin-bottom: 18px;
}

.dl-hero-sub {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.dl-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: 100px;
    padding: 8px 20px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 40px;
    box-shadow: var(--shadow-soft);
}

.dl-version-badge strong { color: var(--text-main); }
.dl-version-sep { opacity: 0.35; }

.dl-version-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.25);
    animation: dl-pulse 2.4s ease-in-out infinite;
}

@keyframes dl-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(0,208,132,0.25); }
    50%       { box-shadow: 0 0 0 6px rgba(0,208,132,0.08); }
}

/* Platform quick-jump pills */
.dl-platform-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.dl-platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.dl-platform-pill:hover {
    background: var(--bg-card);
    border-color: var(--brand);
    color: var(--brand);
    box-shadow: 0 4px 16px rgba(255,126,95,0.12);
}

.dl-platform-pill--soon {
    opacity: 0.55;
}

.dl-platform-pill--soon em {
    font-style: normal;
    font-size: 11px;
    background: rgba(255,126,95,0.22);
    color: var(--brand-alt);
    padding: 2px 7px;
    border-radius: 100px;
    font-weight: 700;
}

/* ==========================================================================
   2. Platform card section wrapper
   ========================================================================== */
.dl-section {
    padding: 80px 0;
}

.dl-section > .container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==========================================================================
   3. Platform download cards
   ========================================================================== */
.dl-platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: var(--r-lg);
    padding: 36px 40px 32px;
    box-shadow: var(--shadow-card);
}

.dl-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.dl-card-icon {
    width: 56px; height: 56px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dl-card-icon--windows { background: linear-gradient(135deg, #0078D4 0%, #00A2E8 100%); color: #fff; }
.dl-card-icon--macos   { background: linear-gradient(135deg, #636366 0%, #48484A 100%); color: #fff; }
.dl-card-icon--android { background: linear-gradient(135deg, #3DDC84 0%, #05A55A 100%); color: #fff; }
.dl-card-icon--linux   { background: linear-gradient(135deg, #FCC624 0%, #E6A800 100%); color: #333; }
.dl-card-icon--ios     { background: linear-gradient(135deg, #7B7B8A 0%, #555560 100%); color: #fff; }

.dl-card-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    color: var(--text-main);
}

.dl-card-meta {
    font-size: 13px;
    color: var(--text-muted);
}

/* Architecture switcher */
.dl-arch-switcher {
    display: inline-flex;
    background: var(--bg-alt);
    border-radius: 100px;
    padding: 4px;
    gap: 2px;
    margin-bottom: 20px;
}

.dl-arch-btn {
    padding: 7px 18px;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.dl-arch-btn.active {
    background: #fff;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dl-arch-btn:hover:not(.active) {
    color: var(--text-main);
}

/* Download options grid */
.dl-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.dl-options-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.dl-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-alt);
    border-radius: var(--r-md);
    padding: 16px 20px;
    border: 1px solid var(--border-line);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dl-option-item:hover {
    border-color: rgba(255,126,95,0.3);
    box-shadow: 0 4px 16px rgba(255,126,95,0.07);
}

.dl-option-item--soon {
    opacity: 0.55;
}

.dl-option-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.dl-option-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.dl-option-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Download buttons */
.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.dl-btn--primary {
    background: var(--brand-gradient);
    color: #fff;
}

.dl-btn--primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.dl-btn--secondary {
    background: #fff;
    color: var(--text-main);
    border: 1.5px solid var(--border-line);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dl-btn--secondary:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
}

.dl-btn--disabled {
    background: var(--bg-alt);
    color: var(--text-light);
    border: 1.5px dashed var(--border-line);
    cursor: not-allowed;
    font-size: 12px;
    padding: 10px 16px;
}

/* iOS card button */
.dl-card--ios {
    background: linear-gradient(135deg, #1E1E28 0%, #28283A 100%);
    border-color: rgba(255,255,255,0.08);
}

.dl-card--ios .dl-card-title { color: #fff; }
.dl-card--ios .dl-card-meta  { color: rgba(255,255,255,0.5); }

.dl-ios-text {
    color: rgba(255,255,255,0.65);
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 620px;
}

.dl-btn--ios {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.88);
    border: 1.5px solid rgba(255,255,255,0.16);
    font-size: 14px;
    padding: 12px 24px;
}

.dl-btn--ios:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
    transform: translateY(-1px);
}

.dl-card-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.6;
}

.dl-inline-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.dl-inline-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   4. Installation guide
   ========================================================================== */
.dl-install-section {
    background: linear-gradient(160deg, #16161A 0%, #1E1E28 100%);
    padding: 80px 0;
}

.dl-install-section .section-label { color: var(--brand); }
.dl-install-section .section-title { color: #fff; }

.dl-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.dl-step {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--r-lg);
    padding: 36px 32px;
    position: relative;
}

.dl-step-num {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1;
}

.dl-step-title {
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.dl-step-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.58);
    line-height: 1.65;
    margin-bottom: 16px;
}

.dl-step-desc .dl-inline-link { color: var(--brand-alt); }

.dl-step-notes {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dl-step-notes li {
    font-size: 13px;
    color: rgba(255,255,255,0.52);
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
}

.dl-step-notes li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: 900;
}

.dl-step-notes code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background: rgba(255,255,255,0.07);
    border-radius: 5px;
    padding: 2px 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    word-break: break-all;
}

.dl-step-notes .dl-inline-link { color: var(--brand-alt); }

/* ==========================================================================
   5. System requirements
   ========================================================================== */
.dl-sysreq-section {
    background: var(--bg-alt);
}

.dl-sysreq-section .section-title { margin-bottom: 40px; }

.dl-sysreq-table-wrap {
    overflow-x: auto;
    border-radius: var(--r-md);
    border: 1px solid var(--border-line);
    box-shadow: var(--shadow-soft);
}

.dl-sysreq-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 14px;
}

.dl-sysreq-table thead tr {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border-line);
}

.dl-sysreq-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    white-space: nowrap;
}

.dl-sysreq-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-line);
    color: var(--text-main);
    vertical-align: middle;
}

.dl-sysreq-table tbody tr:last-child td { border-bottom: none; }

.dl-sysreq-table tbody tr:hover td { background: var(--bg-alt); }

.dl-sysreq-row--soon td { opacity: 0.6; }

.dl-sysreq-platform {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.dl-tag-soon {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,126,95,0.12);
    color: var(--brand);
    padding: 2px 8px;
    border-radius: 100px;
    vertical-align: middle;
    margin-left: 4px;
}

/* ==========================================================================
   6. FAQ accordion
   ========================================================================== */
.dl-faq-section {
    background: var(--bg-main);
}

.dl-faq-section .section-title { margin-bottom: 40px; }

.dl-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.dl-faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-line);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.dl-faq-item.open {
    border-color: rgba(255,126,95,0.3);
}

.dl-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    text-align: left;
    line-height: 1.4;
    word-break: break-word;
    min-width: 0;
}

.dl-faq-question:hover { color: var(--brand); }

.dl-faq-arrow {
    flex-shrink: 0;
    color: var(--text-light);
    transition: transform 0.3s var(--ease-out);
}

.dl-faq-item.open .dl-faq-arrow {
    transform: rotate(180deg);
    color: var(--brand);
}

.dl-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.36s var(--ease-out);
}

.dl-faq-item.open .dl-faq-answer {
    max-height: 600px;
}

.dl-faq-answer > * {
    padding: 0 24px 20px;
}

.dl-faq-answer p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

.dl-faq-answer p:last-child { margin-bottom: 0; }

.dl-faq-answer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.dl-faq-answer ul li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    padding-left: 16px;
    position: relative;
}

.dl-faq-answer ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--brand);
    font-size: 12px;
}

.dl-faq-answer pre {
    background: #F0F0F5;
    border-radius: var(--r-sm);
    padding: 12px 16px;
    margin: 0 24px 10px;
    overflow-x: auto;
}

.dl-faq-answer pre code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    color: var(--text-main);
    background: none;
    padding: 0;
    border-radius: 0;
}

.dl-faq-answer code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    background: #EDEDF5;
    border-radius: 5px;
    padding: 2px 6px;
    color: var(--text-main);
}

/* ==========================================================================
   7. CTA section
   ========================================================================== */
.dl-cta-section {
    padding: 80px 0;
    background: var(--bg-alt);
}

.dl-cta-inner {
    background: linear-gradient(135deg, #FF7E5F 0%, #FEB47B 100%);
    border-radius: var(--r-xl);
    padding: 72px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dl-cta-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 70%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}

.dl-cta-inner .section-label {
    color: rgba(255,255,255,0.8);
}

.dl-cta-title {
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.04em;
    margin-bottom: 14px;
    line-height: 1.1;
}

.dl-cta-sub {
    font-size: 17px;
    color: rgba(255,255,255,0.78);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.dl-cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.dl-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}

.dl-cta-btn--primary {
    background: #fff;
    color: var(--brand);
}

.dl-cta-btn--primary:hover {
    opacity: 0.92;
    transform: translateY(-2px);
}

.dl-cta-btn--ghost {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.32);
}

.dl-cta-btn--ghost:hover {
    background: rgba(255,255,255,0.26);
    transform: translateY(-2px);
}

.dl-cta-hint {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
}

/* ==========================================================================
   8. Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .dl-hero-title { font-size: 40px; }
    .dl-hero-sub   { font-size: 16px; }
    .dl-steps-grid { grid-template-columns: 1fr; }
    .dl-options-grid--3col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    .dl-hero { padding: 72px 0 60px; }
    .dl-hero-title { font-size: 32px; }

    .dl-platform-card { padding: 28px 24px; }
    .dl-card-header   { gap: 14px; }

    .dl-options-grid       { grid-template-columns: 1fr; }
    .dl-options-grid--3col { grid-template-columns: 1fr; }

    .dl-option-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dl-option-info { width: 100%; }
    .dl-option-title, .dl-option-desc { white-space: normal; }

    .dl-btn { width: 100%; justify-content: center; }

    .dl-cta-inner { padding: 48px 28px; }
    .dl-cta-title { font-size: 30px; }
    .dl-cta-actions { flex-direction: column; align-items: center; }
    .dl-cta-btn { width: 100%; max-width: 300px; justify-content: center; }

    .dl-sysreq-table th, .dl-sysreq-table td { padding: 12px 14px; font-size: 13px; }
}

@media (max-width: 480px) {
    .dl-hero-title { font-size: 26px; }
    .dl-platform-nav { gap: 8px; }
    .dl-platform-pill { padding: 8px 14px; font-size: 13px; }
    .dl-arch-switcher { width: 100%; justify-content: center; }
    .dl-faq-question { font-size: 14px; padding: 16px 18px; }
}
