/* ============================================================
   Download Center Page Styles
   Extends main.css — download-specific components only
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.dl-hero {
    padding: 120px 24px 64px;
    text-align: center;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, #e8f2ff 0%, #ffffff 60%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dl-hero-inner {
    max-width: 780px;
    margin: 0 auto;
}

.dl-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 113, 227, 0.07);
    border: 1px solid rgba(0, 113, 227, 0.18);
    border-radius: 40px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--accent-blue);
    margin-bottom: 24px;
}

.dl-hero h1 {
    font-size: clamp(34px, 5.5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 16px;
    background: linear-gradient(170deg, #1d1d1f 0%, #3a3a3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dl-hero-desc {
    font-size: clamp(15px, 2vw, 17px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

/* Platform pills in hero */
.dl-platform-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.dl-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 40px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.dl-pill:hover {
    background: rgba(0, 113, 227, 0.08);
    border-color: rgba(0, 113, 227, 0.25);
    color: var(--accent-blue);
}

/* ── Sticky Tab Bar ───────────────────────────────────────── */
.dl-tab-bar {
    position: sticky;
    top: 52px;
    height: auto;
    z-index: 900;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.dl-tab-inner {
    display: flex;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.dl-tab-inner::-webkit-scrollbar { display: none; }

.dl-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.dl-tab:hover {
    color: var(--text-main);
}

.dl-tab.is-active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* ── Main Content Area ────────────────────────────────────── */
.dl-main {
    background: var(--bg-color);
}

/* ── Platform Sections ────────────────────────────────────── */
.dl-section {
    padding: 72px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dl-section--alt {
    background: #fafafa;
}

.dl-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.dl-section-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 40px;
}

.dl-section-head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.dl-plat-icon {
    font-size: 42px;
    color: var(--text-main);
    opacity: 0.8;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 4px;
}

.dl-section-head h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.dl-section-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ── Client Cards Grid ────────────────────────────────────── */
.dl-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.dl-card {
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.dl-card:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.dl-card--primary {
    border-color: rgba(0, 113, 227, 0.25);
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 60%);
    box-shadow: 0 2px 16px rgba(0, 113, 227, 0.06);
}

.dl-card--primary:hover {
    box-shadow: 0 10px 48px rgba(0, 113, 227, 0.12);
}

.dl-card--archived {
    opacity: 0.75;
    background: #f9f9f9;
}

.dl-card--archived:hover {
    opacity: 1;
}

/* ── Card internal layout ─────────────────────────────────── */
.dl-card-head {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dl-card-title-row h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dl-card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Badges ───────────────────────────────────────────────── */
.dl-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.dl-badge--star {
    background: rgba(52, 199, 89, 0.12);
    color: #1a9e3b;
    border: 1px solid rgba(52, 199, 89, 0.25);
}

.dl-badge--blue {
    background: rgba(0, 113, 227, 0.10);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 113, 227, 0.2);
}

.dl-badge--archived {
    background: rgba(255, 149, 0, 0.10);
    color: #c76200;
    border: 1px solid rgba(255, 149, 0, 0.22);
}

/* ── Feature Chips ────────────────────────────────────────── */
.dl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dl-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    color: #555;
}

.dl-chip--warn {
    background: rgba(255, 149, 0, 0.10);
    color: #c76200;
}

/* ── Download Buttons ─────────────────────────────────────── */
.dl-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.btn-dl--primary {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 113, 227, 0.30);
}

.btn-dl--primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 4px 18px rgba(0, 113, 227, 0.38);
    transform: translateY(-1px);
}

.btn-dl--secondary {
    background: rgba(0, 113, 227, 0.09);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 113, 227, 0.18);
}

.btn-dl--secondary:hover {
    background: rgba(0, 113, 227, 0.15);
}

.btn-dl--ghost {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.10);
}

.btn-dl--ghost:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Pulse animation for primary download CTA */
@keyframes btn-pulse-anim {
    0%   { box-shadow: 0 2px 10px rgba(0, 113, 227, 0.30); }
    50%  { box-shadow: 0 0 0 8px rgba(0, 113, 227, 0.09), 0 2px 10px rgba(0, 113, 227, 0.30); }
    100% { box-shadow: 0 2px 10px rgba(0, 113, 227, 0.30); }
}

.btn-pulse {
    animation: btn-pulse-anim 2.4s ease-in-out infinite;
}

.btn-pulse:hover {
    animation: none;
}

/* ── System Requirements & GitHub link ───────────────────── */
.dl-sysreq {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: -6px;
}

.dl-github-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-top: auto;
    transition: color 0.2s ease;
}

.dl-github-link:hover {
    color: var(--text-main);
}

.dl-github-link--dead,
.dl-github-link--closed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #b0b0b5;
    margin-top: auto;
    cursor: default;
}

/* ── Platform Installation Notices ───────────────────────── */
.dl-notice {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(0, 113, 227, 0.04);
    border: 1px solid rgba(0, 113, 227, 0.12);
    border-radius: 14px;
    font-size: 13px;
    color: #444;
    line-height: 1.65;
    margin-top: 8px;
}

.dl-notice > i {
    color: var(--accent-blue);
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.dl-inline-code {
    display: inline;
    padding: 2px 7px;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 5px;
    font-family: 'JetBrains Mono', 'Fira Code', Menlo, monospace;
    font-size: 12px;
    color: var(--text-main);
    word-break: break-all;
}

/* ── iOS Guide ────────────────────────────────────────────── */
.dl-ios-guide {
    margin-top: 32px;
    background: linear-gradient(135deg, #fdf4ff 0%, #f9f9ff 100%);
    border: 1px solid rgba(175, 82, 222, 0.16);
    border-radius: 18px;
    padding: 28px 28px 24px;
}

.dl-ios-guide-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dl-ios-guide-head i {
    font-size: 24px;
    color: #555;
}

.dl-ios-guide-head h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.dl-ios-guide-intro {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.dl-ios-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dl-ios-steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.dl-ios-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(175, 82, 222, 0.12);
    color: #8b28c8;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.dl-ios-steps li > div {
    flex: 1;
}

.dl-ios-steps li strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dl-ios-steps li p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.dl-ios-steps li a {
    color: var(--accent-blue);
    text-decoration: none;
}

/* ── Linux CLI Block ──────────────────────────────────────── */
.dl-linux-cli {
    margin: 28px 0 20px;
    border-radius: 14px;
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Fira Code', Menlo, monospace;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.dl-cli-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #2a2a2e;
}

.dl-cli-dots {
    display: flex;
    gap: 6px;
}

.dl-cli-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.dl-cli-dot--red    { background: #ff5f56; }
.dl-cli-dot--yellow { background: #ffbd2e; }
.dl-cli-dot--green  { background: #27c93f; }

.dl-cli-title {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 4px;
}

.dl-cli-body {
    background: #1c1c1e;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dl-cli-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.dl-cli-prompt {
    color: #30d158;
    font-weight: 700;
    flex-shrink: 0;
    user-select: none;
}

.dl-cli-cmd {
    color: #e8e8ed;
    word-break: break-all;
}

.dl-cli-line--comment .dl-cli-comment {
    color: #636366;
    font-style: italic;
    padding-left: 20px;
}

/* ── Quick Start Section ──────────────────────────────────── */
.dl-quickstart {
    padding: 72px 24px;
    background: var(--bg-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dl-qs-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 48px 0 40px;
}

.dl-qs-step {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 24px;
    border-radius: 18px;
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dl-qs-num {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: rgba(0, 113, 227, 0.18);
    line-height: 1;
}

.dl-qs-body h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.dl-qs-body p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.dl-qs-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── FAQ Section ──────────────────────────────────────────── */
.dl-faq {
    padding: 72px 24px;
    background: #fafafa;
}

.dl-faq-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-faq-item {
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: var(--bg-color);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.dl-faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.dl-faq-item[open] {
    border-color: rgba(0, 113, 227, 0.2);
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.07);
}

.dl-faq-q {
    padding: 18px 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
}

.dl-faq-q::-webkit-details-marker { display: none; }

.dl-faq-q::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.dl-faq-item[open] .dl-faq-q::after {
    transform: rotate(180deg);
}

.dl-faq-a {
    padding: 0 20px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dl-faq-a p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 14px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .dl-qs-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .dl-hero {
        padding: 100px 20px 48px;
    }

    .dl-section {
        padding: 48px 20px;
    }

    .dl-cards {
        grid-template-columns: 1fr;
    }

    .dl-section-head {
        flex-direction: column;
        gap: 10px;
    }

    .dl-plat-icon {
        font-size: 32px;
    }

    .dl-tab-inner {
        padding: 0 16px;
    }

    .dl-ios-guide {
        padding: 20px 18px;
    }

    .dl-notice {
        flex-direction: column;
        gap: 8px;
    }

    .dl-quickstart {
        padding: 48px 20px;
    }

    .dl-faq {
        padding: 48px 20px;
    }

    .dl-qs-step {
        padding: 22px 18px;
    }
}

@media (max-width: 420px) {
    .dl-platform-pills {
        gap: 8px;
    }

    .dl-pill {
        padding: 8px 14px;
        font-size: 12.5px;
    }
}
