/* Max VPN skin: maxvpn.org blue (#5271FF) replaces the theme's indigo/violet palette. */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --vpn-brand-50: #eef1ff;
    --vpn-brand-100: #dfe5ff;
    --vpn-brand-200: #c3ceff;
    --vpn-brand-300: #9eb0ff;
    --vpn-brand-400: #7a90ff;
    --vpn-brand-500: #5271ff;
    --vpn-brand-600: #3d5af0;
    --vpn-brand-700: #2f47cf;
    --vpn-brand-800: #2a3ca6;
    --vpn-accent: #0ea5e9;
    --vpn-grad-brand: linear-gradient(135deg, #3d5af0 0%, #5271ff 52%, #38bdf8 100%);
    --vpn-grad-accent: linear-gradient(135deg, #5271ff 0%, #22d3ee 100%);
    --vpn-glow-brand: 0 8px 24px -6px rgba(82, 113, 255, .5), 0 2px 6px -2px rgba(82, 113, 255, .35);
    --vpn-glow-pink: 0 8px 24px -6px rgba(34, 211, 238, .4), 0 2px 6px -2px rgba(34, 211, 238, .3);
    --vpn-ring: 0 0 0 3px rgba(82, 113, 255, .32);
    --bs-primary: #5271ff;
    --bs-primary-rgb: 82, 113, 255;
    --bs-link-color: #3d5af0;
    --bs-link-color-rgb: 61, 90, 240;
    --bs-link-hover-color: #2f47cf;
}

[data-bs-theme="dark"] {
    --vpn-accent: #38bdf8;
    --vpn-ring: 0 0 0 3px rgba(122, 144, 255, .4);
    --bs-link-color: #9eb0ff;
    --bs-link-color-rgb: 158, 176, 255;
    --bs-link-hover-color: #c3ceff;
}

.btn-primary {
    --bs-btn-bg: #5271ff;
    --bs-btn-border-color: #5271ff;
    --bs-btn-hover-bg: #3d5af0;
    --bs-btn-hover-border-color: #3d5af0;
    --bs-btn-active-bg: #2f47cf;
    --bs-btn-active-border-color: #2f47cf;
    --bs-btn-disabled-bg: #7a90ff;
    --bs-btn-disabled-border-color: #7a90ff;
}

.btn-outline-primary {
    --bs-btn-color: #3d5af0;
    --bs-btn-border-color: #5271ff;
    --bs-btn-hover-bg: #5271ff;
    --bs-btn-hover-border-color: #5271ff;
    --bs-btn-active-bg: #3d5af0;
}

.text-primary { color: #5271ff !important; }
.bg-primary { background-color: #5271ff !important; }
.form-control:focus,
.form-select:focus { border-color: #7a90ff; box-shadow: var(--vpn-ring); }
.form-check-input:checked { background-color: #5271ff; border-color: #5271ff; }
.progress-bar { background-color: #5271ff; }
.nav-pills .nav-link.active { background: var(--vpn-grad-brand); }
::selection { background: rgba(82, 113, 255, .22); }

/* background aurora in brand blues instead of violet/pink */
body::before {
    background:
        radial-gradient(46rem 30rem at 12% -8%, rgba(82, 113, 255, .22), transparent 60%),
        radial-gradient(38rem 26rem at 92% 4%, rgba(56, 189, 248, .16), transparent 62%),
        radial-gradient(34rem 24rem at 78% 96%, rgba(61, 90, 240, .12), transparent 60%),
        radial-gradient(30rem 22rem at 4% 88%, rgba(34, 211, 238, .10), transparent 62%);
}
[data-bs-theme="dark"] body::before {
    background:
        radial-gradient(46rem 30rem at 12% -8%, rgba(82, 113, 255, .28), transparent 62%),
        radial-gradient(38rem 26rem at 92% 4%, rgba(56, 189, 248, .16), transparent 64%),
        radial-gradient(34rem 24rem at 78% 96%, rgba(61, 90, 240, .14), transparent 62%);
}

/* sign-in / sign-up card: wider on desktop, never wider than the screen on phones */
.vpn-auth .col-md-6.col-lg-4 { flex: 0 0 auto; width: 100%; max-width: 440px; }
.vpn-auth .card { width: 100%; max-width: 100%; }
.vpn-auth .container { padding-left: 16px; padding-right: 16px; }
body { overflow-x: hidden; }
@media (max-width: 480px) {
    .vpn-auth .card-body { padding: 24px 18px; }
}

/* outline buttons stay readable on the dark card */
.vpn-auth .btn-outline-primary { white-space: nowrap; padding-left: .75rem; padding-right: .75rem; color: #c3ceff !important; border-color: rgba(122, 144, 255, .55) !important; }
.vpn-auth .btn-outline-primary:hover { color: #fff !important; background: #5271ff !important; border-color: #5271ff !important; }
.vpn-auth .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #c3ceff;
    --bs-btn-border-color: rgba(122, 144, 255, .55);
    --bs-btn-hover-color: #fff;
}

/* the logo is a wide wordmark, so give it room */
.navbar-brand img,
.auth-logo img,
img[alt="Max VPN"] { height: 34px; width: auto; max-width: 180px; }

/* header language picker: keep "简体中文" on one line */
.js-locale-selector { white-space: nowrap; min-width: 7.5rem; width: auto !important; }
@media (max-width: 480px) { .js-locale-selector { min-width: 6.5rem; padding-right: 1.9rem; } }
