/* Downloads Page - Redesigned */
.downloads-page {
    min-height: calc(100vh - 200px);
    padding: 40px 20px 60px;
    position: relative;
    overflow: hidden;
}

.downloads-page::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(74, 163, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.downloads-container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header Section */
.downloads-header {
    text-align: center;
    margin-bottom: 36px;
}

.downloads-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(74, 163, 255, 0.2), rgba(74, 163, 255, 0.05));
    border: 1px solid rgba(74, 163, 255, 0.3);
    border-radius: 18px;
    margin-bottom: 20px;
}

.downloads-icon i {
    font-size: 1.8rem;
    color: #60a5fa;
}

.downloads-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(to bottom, #e0f0ff, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.downloads-subtitle {
    color: #8899b5;
    font-size: 1rem;
}

/* Stats Banner */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(15, 20, 35, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
}

.stat-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #60a5fa;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.78rem;
    color: #7a8aa5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tab {
    padding: 12px 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #8a94a8;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-tab:hover {
    background: rgba(74, 163, 255, 0.1);
    border-color: rgba(74, 163, 255, 0.25);
    color: #c5d9f0;
}

.category-tab.active {
    background: rgba(74, 163, 255, 0.18);
    border-color: rgba(74, 163, 255, 0.4);
    color: #fff;
}

.category-tab i {
    font-size: 1.1rem;
}

.tab-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
}

/* Download Cards */
.downloads-category {
    display: none;
}

.downloads-category.active {
    display: block;
}

.downloads-grid {
    display: grid;
    gap: 20px;
}

.download-card {
    background: rgba(15, 20, 35, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    transition: all 0.25s ease;
}

.download-card:hover {
    background: rgba(74, 163, 255, 0.06);
    border-color: rgba(74, 163, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.download-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(74, 163, 255, 0.2), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(74, 163, 255, 0.25);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.download-info {
    min-width: 0;
}

.download-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.download-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e4ecff;
}

.required-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.2), rgba(255, 77, 77, 0.1));
    color: #ff6b6b;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-desc {
    font-size: 0.9rem;
    color: #8a94a8;
    margin-bottom: 12px;
}

/* Download Stats Row */
.download-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8rem;
    color: #5a6a85;
}

.download-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-stat .stat-icon-small {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Checksum Toggle */
.checksum-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.checksum-toggle {
    background: none;
    border: none;
    color: #60a5fa;
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    transition: all 0.2s ease;
}

.checksum-toggle:hover {
    color: #80c4ff;
}

.checksum-toggle .chevron {
    transition: transform 0.2s ease;
}

.checksum-toggle.expanded .chevron {
    transform: rotate(180deg);
}

.checksum-content {
    display: none;
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 14px;
}

.checksum-content.visible {
    display: block;
}

.checksum-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.checksum-row:last-child {
    margin-bottom: 0;
}

.checksum-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7a8aa5;
    width: 50px;
    text-transform: uppercase;
}

.checksum-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    color: #a0b0c5;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 10px;
    border-radius: 6px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checksum-copy {
    background: rgba(74, 163, 255, 0.12);
    border: 1px solid rgba(74, 163, 255, 0.25);
    color: #60a5fa;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checksum-copy:hover {
    background: rgba(74, 163, 255, 0.2);
}

/* Download Button */
.download-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.btn-download {
    padding: 14px 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4aa3ff, #2563eb);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    box-shadow: 0 4px 16px rgba(74, 163, 255, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-download:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 8px 24px rgba(74, 163, 255, 0.45);
    color: #fff;
}

.btn-download i {
    font-size: 1.1rem;
}

.download-count {
    font-size: 0.75rem;
    color: #7a8aa5;
    display: flex;
    align-items: center;
    gap: 4px;
}

.download-count i {
    font-size: 0.85rem;
}

/* Instructions Box */
.instructions-box {
    background: rgba(15, 20, 35, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    margin-top: 32px;
}

.instructions-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #d4e4ff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions-title i {
    color: #60a5fa;
}

.instructions-list {
    margin: 0;
    padding-left: 22px;
    color: #a0b0c5;
    font-size: 0.9rem;
    line-height: 1.8;
}

.instructions-list li {
    margin-bottom: 8px;
}

.instructions-list code {
    background: rgba(74, 163, 255, 0.12);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
}

/* Empty State */
.no-downloads {
    text-align: center;
    padding: 60px 20px;
    color: #5a6a85;
    background: rgba(15, 20, 35, 0.6);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.no-downloads-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.4;
    color: #5a6a85;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(15, 20, 35, 0.95);
    border: 1px solid rgba(74, 163, 255, 0.4);
    border-radius: 12px;
    padding: 14px 20px;
    color: #e4ecff;
    font-size: 0.9rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    font-size: 1.2rem;
    color: #10b981;
}

/* Responsive */
@media (max-width: 768px) {
    .downloads-page {
        padding: 24px 16px 40px;
    }

    .download-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .download-icon {
        margin: 0 auto;
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .download-name-row {
        justify-content: center;
    }

    .download-stats {
        justify-content: center;
    }

    .download-actions {
        align-items: center;
        width: 100%;
    }

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

    .checksum-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .checksum-value {
        width: 100%;
    }
}

/* Modern downloads refresh */
.downloads-page {
    padding: 42px 20px 70px;
}

.downloads-page::before {
    top: -120px;
    left: 12%;
    transform: none;
    width: 980px;
    height: 680px;
    background:
        radial-gradient(ellipse at 20% 8%, rgba(74, 163, 255, 0.12), transparent 52%),
        radial-gradient(ellipse at 72% 26%, rgba(16, 185, 129, 0.06), transparent 46%);
}

.downloads-page::after {
    content: '';
    position: absolute;
    right: -220px;
    bottom: 8%;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(125, 175, 255, 0.055), transparent 64%);
    pointer-events: none;
}

.downloads-container {
    max-width: 1180px;
}

.downloads-header,
.install-order-box,
.stat-card,
.category-tabs,
.download-card,
.instructions-box,
.no-downloads {
    background:
        radial-gradient(ellipse at 18% 0%, rgba(74, 163, 255, 0.10), transparent 44%),
        linear-gradient(180deg, rgba(10, 15, 25, 0.62), rgba(7, 12, 22, 0.54));
    backdrop-filter: blur(16px) saturate(130%);
    border: 1px solid rgba(125, 175, 255, 0.14);
    box-shadow: 0 18px 44px rgba(0,0,0,0.24);
    position: relative;
    overflow: hidden;
}

.downloads-header::before,
.install-order-box::before,
.stat-card::before,
.category-tabs::before,
.download-card::before,
.instructions-box::before,
.no-downloads::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 175, 255, 0.42), transparent);
}

.downloads-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    text-align: left;
    padding: 30px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.downloads-icon {
    width: 58px;
    height: 58px;
    margin: 0;
    border-radius: 16px;
    background: rgba(74, 163, 255, 0.11);
    border-color: rgba(125, 175, 255, 0.20);
}

.downloads-title {
    margin: 0 0 8px;
    color: #f4f8ff;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-size: 2.1rem;
    line-height: 1.05;
}

.downloads-subtitle {
    margin: 0;
    color: #9fb2ce;
    line-height: 1.6;
}

.downloads-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 999px;
    color: #7bb4ff;
    border: 1px solid rgba(125, 175, 255, 0.18);
    background: rgba(255,255,255,0.045);
    font-weight: 900;
    white-space: nowrap;
}

.install-order-box {
    padding: 22px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.install-order-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #f4f8ff;
    font-size: 1.1rem;
    font-weight: 900;
}

.install-order-title i {
    color: #7bb4ff;
}

.install-order-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.install-order-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.075);
}

.install-order-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #7bb4ff;
    background: rgba(74, 163, 255, 0.10);
    border: 1px solid rgba(125, 175, 255, 0.16);
    font-weight: 900;
}

.install-order-step h2 {
    margin: 0 0 6px;
    color: #f4f8ff;
    font-size: 0.95rem;
    font-weight: 900;
}

.install-order-step p {
    margin: 0;
    color: #9fb2ce;
    font-size: 0.82rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.install-order-link {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7bb4ff;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}

.stats-banner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 12px;
    align-items: center;
    text-align: left;
    padding: 16px;
    border-radius: 16px;
}

.stat-icon {
    grid-row: span 2;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 13px;
    background: rgba(74, 163, 255, 0.10);
    border: 1px solid rgba(125, 175, 255, 0.14);
}

.stat-value {
    color: #f4f8ff;
    font-size: 1.42rem;
    line-height: 1;
}

.stat-label {
    color: #8fa5c4;
    font-weight: 900;
}

.category-tabs {
    justify-content: flex-start;
    padding: 12px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.category-tab {
    flex: 1;
    min-width: 150px;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.045);
    border-color: rgba(255,255,255,0.08);
    color: #d7e6ff;
}

.category-tab.active {
    background: rgba(74, 163, 255, 0.18);
    border-color: rgba(125, 175, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.tab-count {
    margin-left: auto;
    background: rgba(74, 163, 255, 0.15);
    color: #a9ccff;
}

.downloads-grid {
    gap: 14px;
}

.download-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    padding: 22px;
    border-radius: 18px;
}

.download-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.28);
}

.download-icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    color: #7bb4ff;
    background: rgba(74, 163, 255, 0.10);
    border-color: rgba(125, 175, 255, 0.16);
}

.download-icon i {
    font-size: 1.55rem;
}

.download-name {
    color: #f4f8ff;
    font-weight: 900;
}

.required-badge {
    border-radius: 999px;
}

.download-desc {
    color: #9fb2ce;
    line-height: 1.55;
}

.download-stats {
    gap: 8px;
}

.download-stat {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.07);
    color: #b3c4df;
    font-weight: 800;
}

.checksum-section {
    border-top-color: rgba(255,255,255,0.08);
}

.checksum-toggle {
    color: #7bb4ff;
    font-weight: 900;
}

.checksum-content {
    background: rgba(5, 10, 18, 0.48);
    border: 1px solid rgba(255,255,255,0.07);
}

.checksum-copy,
.btn-download {
    border-radius: 999px;
    font-weight: 900;
}

.btn-download {
    padding: 13px 26px;
}

.btn-download.disabled,
.btn-download.disabled:hover {
    cursor: not-allowed;
    color: #9ca8bb;
    background: rgba(255,255,255,0.07);
    box-shadow: none;
    transform: none;
    filter: none;
}

.download-card.highlight-pulse {
    border-color: rgba(34, 197, 94, 0.44);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12), 0 20px 48px rgba(0,0,0,0.28);
}

.instructions-box {
    border-radius: 18px;
    padding: 22px;
}

.instructions-title {
    color: #f4f8ff;
    font-weight: 900;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.instructions-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-left: 0;
    list-style: none;
    counter-reset: install-step;
    color: #aebed6;
    line-height: 1.5;
}

.instructions-list li {
    counter-increment: install-step;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 0;
    min-height: 0;
    padding: 13px 15px;
    border-radius: 14px;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(74, 163, 255, 0.08), transparent 52%),
        rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.075);
}

.instructions-list li::before {
    content: counter(install-step);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #7bb4ff;
    background: rgba(74, 163, 255, 0.10);
    border: 1px solid rgba(125, 175, 255, 0.16);
    font-weight: 900;
}

.instruction-text {
    min-width: 0;
    align-self: center;
}

.instructions-list code,
.instructions-list strong {
    display: inline;
    width: auto;
    margin: 0;
    vertical-align: baseline;
    white-space: nowrap;
}

.instructions-list code {
    border: 1px solid rgba(125, 175, 255, 0.16);
}

@media (max-width: 768px) {
    .downloads-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .downloads-icon,
    .downloads-hero-pill {
        margin: 0 auto;
    }

    .stats-banner {
        grid-template-columns: 1fr;
    }

    .install-order-grid {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        flex-direction: column;
    }
}

