/* ====================================================
   Download Page Styles — clash download center
   ==================================================== */

/* ---- Sticky Platform Tab Bar ---- */
.dl-tabs-wrap {
    position: sticky;
    top: 80px;
    z-index: 90;
    background: #fff;
    border-bottom: 2px solid var(--color-border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.dl-tabs {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dl-tabs::-webkit-scrollbar { display: none; }

.dl-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 22px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.dl-tab i { font-size: 16px; }

.dl-tab:hover { color: var(--color-brand-orange); }

.dl-tab.active {
    color: var(--color-brand-orange);
    border-bottom-color: var(--color-brand-orange);
    font-weight: 600;
}

/* ---- Page Hero ---- */
.dl-hero {
    background: linear-gradient(160deg, #ffffff 0%, #fafafa 100%);
    border-bottom: 1px solid var(--color-border);
    padding: 72px 20px 60px;
    text-align: center;
}

.dl-hero h1 {
    font-size: 42px;
    font-weight: 400;
    color: var(--color-text-main);
    margin-bottom: 16px;
    line-height: 1.3;
}

.dl-hero h1 em {
    font-style: normal;
    color: var(--color-brand-orange);
}

.dl-hero-desc {
    font-size: 16px;
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.75;
}

.dl-hero-stats {
    display: inline-flex;
    gap: 32px;
    background: #f5f5f7;
    border-radius: 10px;
    padding: 16px 32px;
    font-size: 13px;
    color: var(--color-text-muted);
    flex-wrap: wrap;
    justify-content: center;
}

.dl-hero-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dl-hero-stats i { color: var(--color-brand-orange); }

/* ---- Platform Section ---- */
.platform-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.platform-section + .platform-section {
    border-top: 1px solid var(--color-border);
}

.platform-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.platform-section-header i {
    font-size: 32px;
    color: var(--color-text-main);
}

.platform-section-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text-main);
}

.platform-section-header p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* ---- Badge Labels ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge--star {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge--new {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge--archived {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ---- Primary Client Card ---- */
.client-card-primary {
    background: #fff;
    border: 2px solid var(--color-brand-orange);
    border-radius: 4px;
    padding: 36px 40px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: 0 4px 24px rgba(247, 147, 26, 0.08);
    transition: box-shadow 0.2s;
}

.client-card-primary:hover {
    box-shadow: 0 8px 32px rgba(247, 147, 26, 0.14);
}

.client-card-primary-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.client-card-primary-icon {
    font-size: 48px;
    color: var(--color-brand-orange);
    flex-shrink: 0;
    line-height: 1;
}

.client-card-primary-title h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 6px;
}

.client-card-primary-title p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 520px;
}

.client-card-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.client-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.chip {
    font-size: 12px;
    background: #f5f5f7;
    border: 1px solid #e8e8e8;
    padding: 4px 12px;
    border-radius: 16px;
    color: var(--color-text-muted);
}

.client-card-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

/* Pulse animation on primary download button */
@keyframes btn-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(247, 147, 26, 0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(247, 147, 26, 0); }
    100% { box-shadow: 0 0 0 0 rgba(247, 147, 26, 0); }
}

.btn-pulse {
    animation: btn-pulse 2.2s ease-out infinite;
}

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

.client-card-sysreq {
    font-size: 12px;
    color: #999;
    margin-bottom: 14px;
}

.client-card-sysreq i { margin-right: 4px; }

.client-card-github {
    font-size: 12px;
    color: var(--color-text-muted);
}

.client-card-github a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.client-card-github a:hover { color: var(--color-brand-orange); }
.client-card-github .github-deleted { color: #ccc; cursor: default; }
.client-card-github .github-closed { color: #ccc; cursor: default; }

/* ---- Secondary Client Cards Grid ---- */
.client-cards-secondary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.client-card-sec {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.client-card-sec:hover {
    border-color: var(--color-brand-orange);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.client-card-sec-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.client-card-sec-header i {
    font-size: 28px;
    color: var(--color-text-muted);
}

.client-card-sec-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 2px;
}

.client-card-sec-header p {
    font-size: 12px;
    color: var(--color-text-muted);
}

.client-card-sec .client-card-chips {
    margin-bottom: 20px;
}

.client-card-sec .client-card-downloads {
    margin-bottom: 16px;
    gap: 8px;
}

.btn-sm {
    padding: 9px 18px;
    font-size: 13px;
    min-width: auto;
}

.client-card-sec .client-card-github { margin-top: auto; }

/* ---- Archived / Notice Box ---- */
.archived-notice {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    padding: 18px 22px;
    font-size: 13px;
    color: #78350f;
    line-height: 1.7;
    margin-bottom: 20px;
}

.archived-notice strong { color: #92400e; }

/* ---- iOS Note Box ---- */
.ios-notice {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-left: 4px solid #6366f1;
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 32px;
    font-size: 13px;
    color: #3730a3;
    line-height: 1.75;
}

.ios-notice strong { color: #312e81; }

.ios-apple-id-guide {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 28px 32px;
    margin-top: 28px;
}

.ios-apple-id-guide h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ios-apple-id-guide ol {
    list-style: decimal;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ios-apple-id-guide li {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.ios-apple-id-guide li strong {
    color: var(--color-text-main);
}

/* ---- Linux CLI Code Block ---- */
.linux-cli-block {
    background: var(--color-darker-bg);
    border: 1px solid var(--color-border-dark);
    border-left: 4px solid var(--color-brand-orange);
    border-radius: 4px;
    padding: 24px 28px;
    margin: 28px 0;
    font-family: 'Courier New', 'Consolas', 'Menlo', monospace;
    font-size: 13px;
    line-height: 2;
    color: #a0a4b8;
    overflow-x: auto;
}

.linux-cli-block .cli-comment { color: #4a5568; }
.linux-cli-block .cli-cmd     { color: #f7931a; }
.linux-cli-block .cli-flag    { color: #79b8ff; }
.linux-cli-block .cli-path    { color: #85e89d; }

/* ---- Core Downloads Table ---- */
.core-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.core-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.core-table thead {
    background: #f5f5f7;
    border-bottom: 2px solid var(--color-border);
}

.core-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.core-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.core-table tr:last-child td { border-bottom: none; }

.core-table tr:hover td { background: #fafafa; }

.core-table .dl-link {
    color: var(--color-brand-orange);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

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

.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 3px 10px;
    background: #f0f0f0;
    border-radius: 12px;
    color: var(--color-text-muted);
}

/* ---- Quick Start Section (on download page) ---- */
.dl-quickstart {
    background: var(--color-dark-bg);
    padding: 80px 20px;
    color: #fff;
}

.dl-quickstart .container { max-width: 800px; }

.dl-quickstart h2 {
    font-size: 32px;
    font-weight: 400;
    color: #fff;
    text-align: center;
    margin-bottom: 12px;
}

.dl-quickstart p.subtitle {
    text-align: center;
    color: var(--color-text-light-muted);
    font-size: 15px;
    margin-bottom: 60px;
}

/* ---- Download FAQ Section ---- */
.dl-faq {
    background: #fff;
    padding: 80px 20px;
}

.dl-faq-inner {
    max-width: 860px;
    margin: 0 auto;
}

.dl-faq-inner h2 {
    font-size: 32px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 14px;
}

.dl-faq-inner p.subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 15px;
    margin-bottom: 52px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Platform Section Background Alternation ---- */
.platform-section-bg {
    background: #f9f9f9;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.platform-section-bg .platform-section {
    border-top: none;
}

/* ---- Section Scroll Anchor Offset (sticky header) ---- */
.section-anchor {
    display: block;
    height: 60px;
    margin-top: -60px;
    visibility: hidden;
    pointer-events: none;
}

/* ---- Divider with text ---- */
.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0 20px;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 600;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* ---- Android Architecture Guide ---- */
.arch-guide {
    background: rgba(59, 130, 246, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 4px;
    padding: 16px 20px;
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 24px;
    line-height: 1.65;
}

.arch-guide i { margin-right: 6px; }

/* ====================================================
   Responsive
   ==================================================== */
@media (max-width: 992px) {
    .client-cards-secondary { grid-template-columns: repeat(2, 1fr); }
    .dl-hero h1 { font-size: 32px; }
    .client-card-primary { padding: 28px 24px; }
    .client-card-primary-icon { font-size: 36px; }
    .client-card-primary-title h3 { font-size: 20px; }
}

@media (max-width: 768px) {
    .dl-hero h1 { font-size: 26px; }
    .dl-hero-stats { gap: 16px; padding: 14px 20px; }
    .client-cards-secondary { grid-template-columns: 1fr; }
    .client-card-primary-header { flex-direction: column; gap: 12px; }
    .platform-section { padding: 52px 16px; }
    .client-card-downloads { flex-direction: column; }
    .client-card-downloads .btn { width: 100%; max-width: 100%; justify-content: center; }
    .dl-tabs { gap: 0; }
    .dl-tab { padding: 14px 14px; font-size: 12px; }
    .dl-tab span { display: none; }
    .dl-tab i { font-size: 18px; }
    .core-table th:nth-child(2),
    .core-table td:nth-child(2) { display: none; }
    .core-table th,
    .core-table td { padding: 11px 12px; font-size: 13px; white-space: nowrap; }
    .ios-apple-id-guide { padding: 20px 16px; }
}
