:root {
    --install-bg: #f4f8ff;
    --install-panel: rgba(255, 255, 255, 0.9);
    --install-border: rgba(110, 143, 197, 0.18);
    --install-heading: #0e1726;
    --install-copy: #4a5568;
    --install-accent: #2f6df6;
    --install-accent-strong: #1f56cf;
    --install-shadow: 0 28px 70px rgba(35, 64, 122, 0.16);
}

.downloads-page {
    width: min(1040px, calc(100% - 3rem));
    min-height: 100vh;
    margin: 0 auto;
    padding: 9rem 0 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.downloads-header {
    max-width: 760px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.downloads-title {
    font-size: clamp(2.35rem, 5.2vw, 4.45rem);
    letter-spacing: 0;
}

.download-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.8rem, 2vw, 1.5rem);
    align-items: start;
}

.platform-option {
    display: grid;
    grid-template-rows: minmax(116px, auto) auto auto;
    justify-items: center;
    gap: 1rem;
    text-align: center;
}

.platform-logo {
    width: clamp(76px, 10vw, 112px);
    height: clamp(76px, 10vw, 112px);
    color: #8f949d;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.08));
}

body.dark-mode .platform-logo {
    color: #a8adb6;
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.36));
}

.platform-logo svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.platform-logo path,
.platform-logo circle {
    fill: currentColor;
}

.download-button {
    width: 100%;
    max-width: 260px;
}

.download-button.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.download-button.btn-secondary:hover {
    border-color: var(--accent-color);
    background: var(--bg-secondary);
}

.mac-select-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.mac-select {
    width: 100%;
    max-width: 260px;
    min-height: 44px;
    padding: 0.75rem 2.35rem 0.75rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    appearance: none;
    color: var(--text-primary);
    background:
        linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%) calc(100% - 18px) 52% / 6px 6px no-repeat,
        linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%) calc(100% - 13px) 52% / 6px 6px no-repeat,
        var(--bg-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
    transition: var(--transition);
}

.mac-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.install-page {
    width: min(760px, calc(100% - 3rem));
    min-height: 100vh;
    margin: 0 auto;
    padding: 9rem 0 5rem;
    display: grid;
    place-items: center;
}

body.install-screen {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(111, 168, 255, 0.42), transparent 30%),
        radial-gradient(circle at bottom right, rgba(47, 109, 246, 0.16), transparent 28%),
        linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
    color: var(--install-heading);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.install-screen main {
    background: transparent;
}

.install-card {
    width: 100%;
    padding: clamp(2rem, 4vw, 3rem);
    border: 1px solid var(--install-border);
    border-radius: 32px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 255, 0.94) 100%);
    box-shadow: var(--install-shadow);
    text-align: center;
    backdrop-filter: blur(18px);
}

.install-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.15rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(47, 109, 246, 0.1);
    color: var(--install-accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.install-card h1 {
    margin-bottom: 1rem;
    color: var(--install-heading);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.install-card p {
    max-width: 46ch;
    margin: 0 auto;
    color: var(--install-copy);
    font-size: 1.05rem;
    line-height: 1.7;
}

.install-status {
    margin-top: 1.75rem;
}

.restart-link {
    color: var(--install-accent);
    font-weight: 700;
    text-decoration: none;
}

.restart-link:hover {
    text-decoration: underline;
}

.install-actions {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.install-actions .btn {
    min-height: 56px;
    padding: 0.95rem 1.55rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: none;
}

.install-actions .btn-primary {
    background: linear-gradient(180deg, #3d82ff 0%, #2f6df6 100%);
    color: #ffffff;
    border-color: #2f6df6;
}

.install-actions .btn-primary:hover {
    background: linear-gradient(180deg, #4c8cff 0%, #275edf 100%);
    border-color: #275edf;
}

.install-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.58);
    color: var(--install-heading);
    border-color: rgba(110, 143, 197, 0.24);
}

.install-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(47, 109, 246, 0.24);
}

.install-note {
    margin-top: 1.25rem;
    font-size: 0.92rem;
}

@media (max-width: 860px) {
    .downloads-page {
        width: min(100% - 2rem, 1040px);
        padding-top: 8.5rem;
    }

    .download-picker {
        grid-template-columns: 1fr;
        gap: 2.4rem;
    }

    .platform-option {
        grid-template-rows: auto auto auto;
        gap: 0.9rem;
    }

    .install-page {
        width: min(100% - 2rem, 760px);
        padding-top: 8.5rem;
    }

    .install-card {
        padding: 2rem 1.35rem;
        border-radius: 28px;
    }
}

@media (max-width: 420px) {
    .download-button,
    .mac-select {
        max-width: 100%;
    }

    .install-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
