:root {
    --bg-primary: #06111f;
    --bg-secondary: #0a1b2f;
    --bg-tertiary: #0d2541;
    --bg-elevated: #112e50;
    --text-primary: #f5f8ff;
    --text-secondary: #a8bad5;
    --text-tertiary: #7187a8;
    --border-subtle: rgba(126, 160, 211, 0.16);
    --border-medium: rgba(126, 160, 211, 0.32);
    --border-strong: rgba(126, 160, 211, 0.52);
    --accent-primary: #4c7ff0;
    --accent-secondary: #6d9bff;
    --accent-tertiary: #8eb2ff;
    --success: #69c7b2;
    --danger: #ff7585;
    --orbit-ease: cubic-bezier(.32, .72, 0, 1);
    --orbit-expo: cubic-bezier(.16, 1, .3, 1);
}

html {
    color-scheme: dark;
    background: #06111f;
}

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 76% 12%, rgba(50, 104, 196, 0.2), transparent 34rem),
        radial-gradient(circle at 16% 76%, rgba(21, 68, 124, 0.18), transparent 30rem),
        linear-gradient(145deg, #071421 0%, #06111f 48%, #04101e 100%) !important;
    color: var(--text-primary);
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border: 1px solid rgba(126, 160, 211, 0.17);
    border-radius: 50%;
}

body::before {
    top: -330px;
    right: -270px;
    width: 780px;
    height: 780px;
    box-shadow:
        0 0 0 72px rgba(126, 160, 211, 0.06),
        0 0 0 144px rgba(126, 160, 211, 0.035),
        0 0 0 216px rgba(126, 160, 211, 0.02);
}

body::after {
    left: -240px;
    bottom: -330px;
    width: 620px;
    height: 620px;
    border-style: dashed;
    opacity: 0.55;
}

.bg-gradient,
.noise {
    pointer-events: none;
}

nav,
main,
footer {
    position: relative;
    z-index: 1;
}

nav {
    border-bottom: 1px solid rgba(126, 160, 211, 0.14) !important;
    background: rgba(5, 15, 27, 0.76) !important;
    box-shadow: 0 14px 38px rgba(0, 7, 18, 0.18);
    backdrop-filter: blur(18px);
    animation: orbitPageDown 420ms var(--orbit-expo) both;
}

.nav-container {
    width: min(100% - 32px, 1440px);
    min-height: 78px;
    margin-inline: auto;
}

.logo {
    color: #fff !important;
}

.logo-icon img {
    filter: drop-shadow(0 5px 14px rgba(76, 127, 240, 0.3));
}

.nav-btn {
    min-height: 42px;
    border: 1px solid rgba(126, 160, 211, 0.22) !important;
    border-radius: 8px !important;
    background: rgba(10, 28, 48, 0.78) !important;
    color: #dce8fb !important;
    transition: transform 160ms var(--orbit-ease), border-color 180ms var(--orbit-ease), background 180ms var(--orbit-ease) !important;
}

.nav-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(126, 160, 211, 0.58) !important;
    background: #102d4e !important;
}

.nav-btn-primary {
    border-color: rgba(109, 155, 255, 0.72) !important;
    background: linear-gradient(135deg, #3f6fdf, #5689f4) !important;
    color: #fff !important;
    box-shadow: 0 10px 26px rgba(44, 98, 208, 0.28);
}

main {
    min-height: calc(100vh - 190px);
}

main > * {
    animation: orbitPageUp 620ms var(--orbit-expo) 80ms both;
}

.container {
    width: min(100% - 40px, 1440px);
    margin-inline: auto;
}

.download-container {
    display: flex;
    justify-content: center;
    padding-top: clamp(2.5rem, 6vw, 5.5rem) !important;
    padding-bottom: clamp(3rem, 7vw, 6rem) !important;
}

.download-card,
.auth-box,
.panel,
.card,
.comparison-card,
.email-card,
.contact-form,
.contact-info,
.policy-content,
.terms-content,
.api-content {
    border: 1px solid rgba(126, 160, 211, 0.27) !important;
    background: linear-gradient(145deg, rgba(12, 31, 54, 0.94), rgba(7, 20, 36, 0.94)) !important;
    box-shadow: 0 28px 70px rgba(0, 8, 22, 0.38) !important;
    backdrop-filter: blur(16px);
}

.download-card {
    width: min(100%, 880px) !important;
    padding: clamp(1.4rem, 4vw, 3rem) !important;
    border-radius: 22px !important;
}

.download-header {
    align-items: center !important;
    gap: 1.1rem !important;
    margin-bottom: 1.8rem !important;
}

.download-icon {
    width: 62px !important;
    height: 62px !important;
    flex: 0 0 62px;
    border: 1px solid rgba(109, 155, 255, 0.44) !important;
    border-radius: 14px !important;
    background: linear-gradient(145deg, rgba(76, 127, 240, 0.24), rgba(18, 48, 84, 0.9)) !important;
    color: #8fb3ff !important;
}

.download-title {
    color: #fff !important;
    font-size: clamp(1.45rem, 4vw, 2.25rem) !important;
    line-height: 1.18 !important;
    overflow-wrap: anywhere;
}

.download-subtitle,
.download-footer-text {
    color: var(--text-secondary) !important;
}

.download-meta {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(126, 160, 211, 0.18) !important;
    border-radius: 12px !important;
    background: rgba(5, 17, 31, 0.72) !important;
}

.meta-item {
    min-width: 0;
    padding: 1.1rem 1rem !important;
    border-right: 1px solid rgba(126, 160, 211, 0.14);
}

.meta-item:last-child {
    border-right: 0;
}

.meta-label {
    color: #7086a6 !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
}

.meta-value {
    color: #f4f7ff !important;
    font-size: 0.88rem !important;
    overflow-wrap: anywhere;
}

.btn-primary,
.auth-submit,
.download-btn-main,
.cta-btn:not(.secondary),
.form-submit {
    min-height: 50px;
    border: 1px solid rgba(122, 164, 255, 0.65) !important;
    border-radius: 9px !important;
    background: linear-gradient(135deg, #3f70df 0%, #568af5 100%) !important;
    color: #fff !important;
    box-shadow: 0 14px 30px rgba(39, 91, 199, 0.28) !important;
    transition: transform 150ms var(--orbit-ease), box-shadow 180ms var(--orbit-ease), background 180ms var(--orbit-ease) !important;
}

.btn-primary:hover,
.auth-submit:hover,
.download-btn-main:hover,
.cta-btn:not(.secondary):hover,
.form-submit:hover {
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #4a7bea 0%, #6597ff 100%) !important;
    box-shadow: 0 18px 34px rgba(39, 91, 199, 0.36) !important;
}

.btn-primary:active,
.auth-submit:active,
.download-btn-main:active {
    transform: translateY(0) scale(0.99) !important;
}

.download-security {
    gap: 0.55rem !important;
}

.security-pill,
.pill,
.badge,
.card-badge {
    border: 1px solid rgba(126, 160, 211, 0.22) !important;
    background: rgba(14, 38, 66, 0.72) !important;
    color: #a9bddb !important;
}

.link,
a:not(.logo):not(.nav-btn):not(.btn):not(.cta-btn):not(.download-btn) {
    color: #82a9ff;
}

.form-input,
.auth-input,
.modal-input,
input,
textarea,
select {
    border-color: rgba(126, 160, 211, 0.28) !important;
    background: rgba(5, 18, 32, 0.8) !important;
    color: #f5f8ff !important;
}

.form-input:focus,
.auth-input:focus,
.modal-input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: #6d9bff !important;
    box-shadow: 0 0 0 3px rgba(76, 127, 240, 0.14) !important;
    outline: 0;
}

.auth-container {
    min-height: calc(100vh - 190px) !important;
    padding: clamp(2.5rem, 6vw, 5rem) 1rem !important;
}

.auth-box {
    border-radius: 20px !important;
}

.auth-title,
.about-hero h1,
.policy-hero h1,
.terms-hero h1,
.api-hero h1,
.contact-hero h1,
.app-hero h1 {
    background: linear-gradient(180deg, #fff 20%, #a9bddd 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.about-hero,
.policy-hero,
.terms-hero,
.api-hero,
.contact-hero,
.app-hero {
    padding-top: clamp(3.5rem, 8vw, 7rem) !important;
}

.section-title,
.card h3,
.panel h3,
.comparison-card h3 {
    color: #f5f8ff !important;
}

.card p,
.panel p,
.section-subtitle,
.auth-subtitle,
.contact p,
.api p,
.policy-content p,
.terms-content p {
    color: var(--text-secondary) !important;
}

.pdf-preview-wrapper,
.preview-skeleton {
    border: 1px solid rgba(126, 160, 211, 0.24);
    background: #071729 !important;
    box-shadow: 0 20px 48px rgba(0, 7, 19, 0.36) !important;
}

.preview-btn {
    border-color: rgba(126, 160, 211, 0.28) !important;
    background: rgba(12, 34, 59, 0.82) !important;
    color: #dce7f8 !important;
}

footer {
    border-top: 1px solid rgba(126, 160, 211, 0.13) !important;
    background: rgba(5, 14, 25, 0.86) !important;
    backdrop-filter: blur(16px);
}

.footer-container {
    width: min(100% - 40px, 1440px);
    margin-inline: auto;
}

.footer-logo {
    color: #fff !important;
}

.footer-link,
.footer-copy {
    color: #7f93b1 !important;
}

.footer-link:hover {
    color: #dbe7fb !important;
}

@keyframes orbitPageDown {
    from { opacity: 0; transform: translate3d(0, -12px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes orbitPageUp {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (max-width: 760px) {
    .nav-container,
    .container,
    .footer-container {
        width: min(100% - 24px, 1440px);
    }

    .nav-container {
        min-height: 68px;
    }

    .download-card {
        padding: 1.2rem !important;
        border-radius: 16px !important;
    }

    .download-header {
        align-items: flex-start !important;
    }

    .download-icon {
        width: 52px !important;
        height: 52px !important;
        flex-basis: 52px;
    }

    .download-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .meta-item:nth-child(2) {
        border-right: 0;
    }

    .meta-item:nth-child(-n+2) {
        border-bottom: 1px solid rgba(126, 160, 211, 0.14);
    }
}

@media (max-width: 480px) {
    .nav-actions {
        gap: 0.45rem !important;
    }

    .nav-btn {
        min-height: 40px;
        padding-inline: 0.75rem !important;
        font-size: 0.76rem !important;
    }

    .download-header {
        display: grid !important;
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .download-icon {
        width: 48px !important;
        height: 48px !important;
        flex-basis: 48px;
    }

    .download-meta {
        grid-template-columns: 1fr !important;
    }

    .meta-item {
        border-right: 0 !important;
        border-bottom: 1px solid rgba(126, 160, 211, 0.14);
    }

    .meta-item:last-child {
        border-bottom: 0;
    }

    .download-security {
        align-items: stretch !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
