/* =========================================================
   MARKER NORTH - DOWNLOADS PAGE
   ========================================================= */

:root {
    --downloads-bg: #020b14;
    --downloads-panel: #071522;
    --downloads-panel-light: #0b1b2a;
    --downloads-border: #20384d;
    --downloads-border-soft: rgba(120, 163, 198, 0.18);
    --downloads-text: #f7f9fc;
    --downloads-muted: #9db3c7;
    --downloads-gold: #ffb400;
    --downloads-green: #42d567;
    --downloads-blue: #36a2ff;
    --downloads-purple: #a35cff;
    --downloads-gray: #8394a3;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--downloads-bg);
    color: var(--downloads-text);
}

/* =========================================================
   MAIN PAGE
   ========================================================= */

.downloads-main {
    min-width: 0;
    padding: 22px 24px 28px;
    background: radial-gradient( circle at 72% 9%, rgba(26, 87, 139, 0.12), transparent 34% ), var(--downloads-bg);
}

.downloads-page-header {
    margin: 0 0 14px;
    padding: 0 !important;
    min-height: auto !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

    .downloads-page-header h1 {
        margin: 0;
        color: var(--downloads-text);
        font-size: 30px;
        line-height: 1.15;
        letter-spacing: -0.5px;
    }

    .downloads-page-header p {
        margin: 5px 0 0;
        color: var(--downloads-muted);
        font-size: 14px;
        font-style: italic;
    }

/* =========================================================
   DOWNLOAD HERO
   ========================================================= */

.client-download-hero {
    display: grid;
    grid-template-columns: minmax(410px, 1.2fr) minmax(430px, 1.1fr) minmax(235px, 0.55fr);
    align-items: center;
    min-height: 300px;
    margin-bottom: 11px;
    overflow: hidden;
    border: 1px solid var(--downloads-border);
    border-radius: 8px;
    background: linear-gradient( 135deg, rgba(8, 26, 40, 0.98), rgba(4, 16, 27, 0.98) );
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18), inset 0 1px rgba(255, 255, 255, 0.02);
}

/* PRODUCT IMAGE */

.client-product-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-width: 0;
    min-height: 300px;
    overflow: hidden;
    background: radial-gradient( circle at 45% 55%, rgba(255, 180, 0, 0.09), transparent 40% ), linear-gradient( 120deg, rgba(23, 59, 84, 0.14), transparent 62% );
}

    .client-product-visual::before {
        position: absolute;
        inset: 0;
        content: "";
        pointer-events: none;
        opacity: 0.27;
        background-image: linear-gradient( 35deg, transparent 48%, rgba(60, 103, 137, 0.22) 49%, rgba(60, 103, 137, 0.22) 50%, transparent 51% ), linear-gradient( 145deg, transparent 48%, rgba(60, 103, 137, 0.16) 49%, rgba(60, 103, 137, 0.16) 50%, transparent 51% );
        background-size: 105px 82px, 135px 98px;
    }

.client-product-glow {
    position: absolute;
    top: 50%;
    left: 48%;
    width: 340px;
    height: 185px;
    border-radius: 50%;
    background: rgba(255, 180, 0, 0.08);
    filter: blur(35px);
    transform: translate(-50%, -50%);
}

.client-product-visual img {
    position: relative;
    z-index: 1;
    display: block;
    width: 118%;
    max-width: 670px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 12px rgba(255, 180, 0, 0.07));
    transform: translateX(-2%);
}

/* DOWNLOAD INFORMATION */

.client-download-information {
    min-width: 0;
    padding: 28px 34px;
}

    .client-download-information h2 {
        margin: 0;
        color: var(--downloads-text);
        font-size: 31px;
        line-height: 1.15;
        letter-spacing: -0.45px;
    }

.client-version-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 10px;
}

    .client-version-row > span:first-child {
        color: var(--downloads-muted);
        font-size: 13px;
    }

.client-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 27px;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

    .client-badge.latest {
        border: 1px solid rgba(255, 180, 0, 0.75);
        background: rgba(255, 180, 0, 0.08);
        color: var(--downloads-gold);
    }

    .client-badge.windows {
        border: 1px solid rgba(54, 162, 255, 0.75);
        background: rgba(54, 162, 255, 0.08);
        color: #74c2ff;
    }

.client-download-information > p {
    max-width: 540px;
    margin: 20px 0 18px;
    color: #bdccd8;
    font-size: 13px;
    line-height: 1.55;
}

.client-download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    width: 100%;
    max-width: 530px;
    min-height: 59px;
    padding: 0 25px;
    border: 1px solid #ffc42f;
    border-radius: 6px;
    background: linear-gradient( 135deg, #ffc229, #eda000 );
    color: #06101a;
    font-size: 18px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(255, 180, 0, 0.21), inset 0 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .client-download-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 13px 31px rgba(255, 180, 0, 0.31), inset 0 1px rgba(255, 255, 255, 0.35);
    }

    .client-download-button i {
        font-size: 21px;
    }

.release-notes-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: var(--downloads-blue);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

    .release-notes-link:hover {
        color: #8fd0ff;
    }

/* RELEASE DETAILS */

.client-release-details {
    display: flex;
    align-self: stretch;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    margin: 33px 0;
    padding: 18px 25px;
    border-left: 1px solid var(--downloads-border-soft);
}

    .client-release-details > div {
        display: flex;
        align-items: center;
        gap: 13px;
        color: #bac8d4;
        font-size: 12px;
    }

        .client-release-details > div i {
            width: 23px;
            color: #d2dde6;
            font-size: 18px;
            text-align: center;
        }

    .client-release-details .client-current-status {
        margin-top: 2px;
        padding-top: 18px;
        border-top: 1px solid var(--downloads-border-soft);
        color: var(--downloads-green);
        font-weight: 700;
    }

        .client-release-details .client-current-status i {
            color: var(--downloads-green);
            font-size: 22px;
        }

/* =========================================================
   THREE-STEP SETUP
   ========================================================= */

.client-setup-panel {
    margin-bottom: 11px;
    padding: 16px 20px 18px;
    border: 1px solid var(--downloads-border);
    border-radius: 7px;
    background: linear-gradient( 145deg, rgba(10, 27, 42, 0.98), rgba(5, 18, 29, 0.98) );
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.13), inset 0 1px rgba(255, 255, 255, 0.015);
}

    .client-setup-panel h2 {
        margin: 0 0 15px;
        color: var(--downloads-text);
        font-size: 16px;
    }

.client-setup-steps {
    display: grid;
    grid-template-columns: max-content minmax(150px, 215px) max-content minmax(150px, 215px) max-content;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin: 0 auto;
}

.client-setup-step {
    display: grid;
    grid-template-columns: 49px 49px auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

.setup-step-number,
.setup-step-icon {
    display: grid;
    place-items: center;
    width: 49px;
    height: 49px;
    border-radius: 50%;
}

.setup-step-number {
    border: 2px solid var(--downloads-gold);
    background: rgba(255, 180, 0, 0.06);
    color: var(--downloads-gold);
    font-size: 21px;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(255, 180, 0, 0.1);
}

.setup-step-icon {
    border: 1px solid rgba(54, 162, 255, 0.55);
    background: rgba(54, 162, 255, 0.08);
    color: var(--downloads-blue);
    font-size: 19px;
}

.setup-step-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .setup-step-copy strong {
        color: white;
        font-size: 12px;
    }

    .setup-step-copy span {
        overflow: hidden;
        margin-top: 4px;
        color: var(--downloads-muted);
        font-size: 10px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

.setup-route-line {
    position: relative;
    width: 100%;
    height: 11px;
    overflow: visible;
    border-radius: 8px;
    background: linear-gradient( to bottom, rgba(255, 180, 0, 0.7) 0, rgba(255, 180, 0, 0.7) 1px, transparent 1px, transparent 10px, rgba(255, 180, 0, 0.7) 10px, rgba(255, 180, 0, 0.7) 11px );
    box-shadow: 0 0 6px rgba(255, 180, 0, 0.13);
}

    .setup-route-line::before {
        position: absolute;
        top: 50%;
        right: 4px;
        left: 4px;
        height: 1px;
        content: "";
        background: repeating-linear-gradient( 90deg, rgba(255, 190, 34, 0.8) 0, rgba(255, 190, 34, 0.8) 10px, transparent 10px, transparent 18px );
        transform: translateY(-50%);
    }

    .setup-route-line::after {
        display: none;
    }

/* =========================================================
   INFORMATION GRID
   ========================================================= */

.downloads-information-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.95fr) minmax(240px, 1fr) minmax(250px, 1.05fr) minmax(220px, 0.95fr) minmax(250px, 1.05fr);
    gap: 11px;
}

.download-information-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 236px;
    padding: 17px 18px;
    border: 1px solid var(--downloads-border);
    border-radius: 7px;
    background: linear-gradient( 145deg, rgba(10, 27, 42, 0.98), rgba(5, 18, 29, 0.98) );
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.13), inset 0 1px rgba(255, 255, 255, 0.015);
}

.download-card-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 31px;
    margin-bottom: 16px;
}

    .download-card-heading > div:last-child:not(.download-card-icon) {
        display: flex;
        flex-direction: column;
    }

    .download-card-heading h2 {
        margin: 0;
        color: white;
        font-size: 13px;
    }

    .download-card-heading > div:last-child > span {
        margin-top: 3px;
        color: var(--downloads-muted);
        font-size: 10px;
    }

.download-card-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border-radius: 50%;
    font-size: 17px;
}

    .download-card-icon.requirements {
        background: rgba(54, 162, 255, 0.14);
        color: var(--downloads-blue);
    }

    .download-card-icon.safety {
        background: rgba(66, 213, 103, 0.14);
        color: var(--downloads-green);
    }

    .download-card-icon.release {
        background: rgba(163, 92, 255, 0.14);
        color: var(--downloads-purple);
    }

    .download-card-icon.help {
        background: rgba(255, 180, 0, 0.14);
        color: var(--downloads-gold);
    }

    .download-card-icon.connection {
        background: rgba(54, 162, 255, 0.12);
        color: #8ccaff;
    }

/* FEATURE LISTS */

.download-feature-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .download-feature-list li {
        display: flex;
        align-items: flex-start;
        gap: 9px;
        min-width: 0;
        color: #bdcbd7;
        font-size: 10px;
        line-height: 1.35;
    }

        .download-feature-list li i {
            width: 12px;
            flex: 0 0 12px;
            margin-top: 2px;
            font-size: 8px;
            text-align: center;
        }

.requirements-list li i {
    color: var(--downloads-blue);
}

.safety-list li i {
    color: var(--downloads-green);
    font-size: 12px;
}

.release-list {
    gap: 8px;
}

    .release-list li i {
        color: var(--downloads-purple);
    }

.download-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    margin-top: auto;
    padding: 0 11px;
    border: 1px solid rgba(54, 162, 255, 0.67);
    border-radius: 4px;
    color: #88c9ff;
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
}

    .download-card-action:hover {
        background: rgba(54, 162, 255, 0.1);
    }

/* HELP LINKS */

.download-help-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .download-help-links a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 37px;
        padding: 0 11px;
        border: 1px solid rgba(54, 162, 255, 0.67);
        border-radius: 4px;
        color: #8acbff;
        font-size: 9px;
        font-weight: 700;
        text-decoration: none;
    }

        .download-help-links a:hover {
            background: rgba(54, 162, 255, 0.1);
            color: white;
        }

/* CONNECTION STATUS */

.client-detection-status {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 54px;
    padding: 0 13px;
    border: 1px solid var(--downloads-border-soft);
    border-radius: 5px;
    background: rgba(125, 145, 161, 0.07);
}

.detection-status-dot {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 50%;
    background: var(--downloads-gray);
    box-shadow: 0 0 0 5px rgba(131, 148, 163, 0.08);
}

.client-detection-status strong {
    color: #c3cfd9;
    font-size: 10px;
}

.connection-card > p {
    margin: 14px 0 7px;
    color: var(--downloads-muted);
    font-size: 9px;
    line-height: 1.5;
}

.connection-card > small {
    margin-top: auto;
    color: #71899d;
    font-size: 8px;
    font-style: italic;
}

/* =========================================================
   CAPS SIGNATURE
   ========================================================= */

.downloads-caps-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    padding: 18px 20px 2px;
    text-align: center;
}

.downloads-caps-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 1px solid rgba(54, 162, 255, 0.55);
    border-radius: 50%;
    color: var(--downloads-blue);
    font-size: 14px;
}

.downloads-caps-signature > div:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 9px;
}

.downloads-caps-signature strong {
    color: var(--downloads-text);
    font-size: 11px;
}

    .downloads-caps-signature strong span {
        color: var(--downloads-gold);
        letter-spacing: 0.7px;
    }

.downloads-caps-signature small {
    color: var(--downloads-muted);
    font-size: 9px;
    font-style: italic;
}

/* =========================================================
   SHARED PAGE FIXES
   ========================================================= */

.dashboard-page .dashboard-logo img {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
}

.dashboard-page .header-avatar img,
.dashboard-page .sidebar-driver-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
}

    .dashboard-sidebar .sidebar-driver-card {
        margin-top: 34px;
    }

    .dashboard-sidebar .sidebar-sign-out {
        margin-top: 14px;
    }

/* =========================================================
   RESPONSIVE LAYOUT
   ========================================================= */

@media (max-width: 1600px) {

    .downloads-main {
        padding-right: 17px;
        padding-left: 17px;
    }

    .client-download-hero {
        grid-template-columns: minmax(360px, 1.05fr) minmax(390px, 1fr) minmax(210px, 0.52fr);
    }

    .client-download-information {
        padding-right: 25px;
        padding-left: 25px;
    }

    .downloads-information-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .connection-card,
    .help-card {
        min-height: 210px;
    }
}

@media (max-width: 1250px) {

    .client-download-hero {
        grid-template-columns: minmax(330px, 0.9fr) minmax(400px, 1.1fr);
    }

    .client-release-details {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin: 0;
        padding: 17px 25px;
        border-top: 1px solid var(--downloads-border-soft);
        border-left: 0;
    }

        .client-release-details .client-current-status {
            margin: 0;
            padding: 0;
            border-top: 0;
        }

    .client-setup-steps {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .setup-route-line {
        width: 3px;
        height: 28px;
        margin-left: 23px;
        background: repeating-linear-gradient( 180deg, rgba(255, 180, 0, 0.75) 0, rgba(255, 180, 0, 0.75) 8px, transparent 8px, transparent 14px );
    }

    .downloads-information-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {

    .downloads-main {
        padding: 18px 14px 26px;
    }

    .client-download-hero {
        grid-template-columns: 1fr;
    }

    .client-product-visual {
        min-height: 280px;
    }

        .client-product-visual img {
            width: 90%;
            max-width: 630px;
        }

    .client-release-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {

    .downloads-page-header h1 {
        font-size: 26px;
    }

    .client-download-information {
        padding: 22px 18px;
    }

        .client-download-information h2 {
            font-size: 27px;
        }

    .client-release-details {
        grid-template-columns: 1fr;
    }

    .downloads-information-grid {
        grid-template-columns: 1fr;
    }

    .download-information-card {
        min-height: auto;
    }
}

@media (max-width: 480px) {

    .downloads-main {
        padding-right: 10px;
        padding-left: 10px;
    }

    .client-product-visual {
        min-height: 230px;
    }

        .client-product-visual img {
            width: 110%;
        }

    .client-download-button {
        min-height: 53px;
        font-size: 15px;
    }

    .client-setup-panel {
        padding-right: 13px;
        padding-left: 13px;
    }

    .client-setup-step {
        grid-template-columns: 43px 43px minmax(0, 1fr);
    }

    .setup-step-number,
    .setup-step-icon {
        width: 43px;
        height: 43px;
    }

    .downloads-caps-signature {
        flex-direction: column;
    }
}

/* =========================================================
   PRE-ALPHA DOWNLOAD STATES
   ========================================================= */

.client-download-button.download-disabled {
    border-color: rgba(255, 180, 0, 0.55);
    background: rgba(255, 180, 0, 0.10);
    color: var(--downloads-gold);
    cursor: not-allowed;
    box-shadow: none;
}

    .client-download-button.download-disabled:hover {
        transform: none;
        box-shadow: none;
    }

.client-current-status.pending {
    color: var(--downloads-gold) !important;
}

    .client-current-status.pending i {
        color: var(--downloads-gold) !important;
    }

.client-detection-status.online {
    border-color: rgba(66, 213, 103, 0.38);
    background: rgba(66, 213, 103, 0.08);
}

    .client-detection-status.online .detection-status-dot {
        background: var(--downloads-green);
        box-shadow: 0 0 0 5px rgba(66, 213, 103, 0.10), 0 0 12px rgba(66, 213, 103, 0.65);
    }

    .client-detection-status.online strong {
        color: var(--downloads-green);
    }

.download-runtime-notice {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    max-width: 420px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 180, 0, 0.55);
    border-radius: 8px;
    background: rgba(6, 16, 27, 0.98);
    color: #ffffff;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

    .download-runtime-notice.visible {
        opacity: 1;
        transform: translateY(0);
    }