/*
 * WAR OF SPACE - NEBULA GLASS AUTH THEME
 * Login, registration and password recovery.
 * Only public/login templates are targeted; in-game skin.css is untouched.
 */

:root {
    --auth-cyan: #22d3ee;
    --auth-cyan-light: #67e8f9;
    --auth-line: rgba(103, 232, 249, .20);
    --auth-line-strong: rgba(103, 232, 249, .42);
    --auth-glass: rgba(5, 17, 32, .78);
    --auth-glass-strong: rgba(4, 13, 26, .92);
    --auth-text: #e8f5fa;
    --auth-muted: #9bb7c5;
    --auth-radius: 16px;
    --auth-shadow: 0 18px 55px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255,255,255,.055);
}

html {
    min-height: 100%;
    background: #030914;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    padding-top: 92px;
    color: var(--auth-text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    background:
        radial-gradient(ellipse at 15% 5%, rgba(34, 211, 238, .13), transparent 42%),
        radial-gradient(ellipse at 88% 28%, rgba(74, 91, 190, .16), transparent 38%),
        linear-gradient(180deg, rgba(2, 8, 19, .34), rgba(2, 8, 19, .72)),
        url("../../images/login/bg.jpg") center center / cover fixed no-repeat,
        #030914;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(1, 7, 17, .22), rgba(1, 7, 17, .12) 48%, rgba(1, 7, 17, .58)),
        radial-gradient(circle at 50% 45%, transparent 0, rgba(0,0,0,.20) 100%);
}

/* Top navigation */
body > nav.navbar {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    min-height: 58px;
    padding: 7px 14px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: rgba(4, 17, 32, .82) !important;
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
}

body > nav.navbar .container-xl {
    max-width: 1480px;
}

body > nav.navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 24px;
    color: #f4fbff !important;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.auth-brand-logo {
    display: block;
    width: auto;
    height: 39px;
    max-width: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 9px rgba(34,211,238,.25));
}

body > nav.navbar .nav-link {
    padding: 9px 11px !important;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #b9d7e3 !important;
    font-size: 12px;
    font-weight: 600;
    transition: .18s ease;
}

body > nav.navbar .nav-link:hover,
body > nav.navbar .nav-link:focus {
    color: #fff !important;
    border-color: var(--auth-line);
    background: rgba(34, 211, 238, .10);
    text-shadow: 0 0 12px rgba(34,211,238,.4);
}

body > nav.navbar .navbar-toggler {
    border: 1px solid var(--auth-line-strong);
    border-radius: 9px;
    outline: none;
}

/* Main page width and vertical rhythm */
.auth-page {
    width: min(1420px, calc(100% - 36px));
    max-width: 1420px;
    margin: 22px auto 44px;
    padding: 0;
}

.auth-hero,
.auth-card {
    color: var(--auth-text);
    border: 1px solid var(--auth-line) !important;
    border-radius: var(--auth-radius) !important;
    background: var(--auth-glass) !important;
    box-shadow: var(--auth-shadow) !important;
    backdrop-filter: blur(15px) saturate(140%);
    -webkit-backdrop-filter: blur(15px) saturate(140%);
    overflow: hidden;
}

.auth-hero {
    position: relative;
    min-height: 190px;
    margin: 0 0 16px !important;
    padding: 34px 38px;
    background:
        linear-gradient(105deg, rgba(3, 15, 29, .94), rgba(4, 24, 42, .72) 62%, rgba(5, 20, 38, .82)),
        url("../../images/login/bg.jpg") center 43% / cover no-repeat !important;
}

.auth-hero::after {
    content: "";
    position: absolute;
    right: 8%;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(transparent, rgba(103,232,249,.42), transparent);
    box-shadow: 0 0 28px rgba(34,211,238,.2);
}

.auth-hero h1 {
    max-width: 850px;
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(26px, 3.2vw, 42px);
    font-weight: 800;
    letter-spacing: .2px;
    text-shadow: 0 3px 24px rgba(0,0,0,.55);
}

.auth-hero .lead {
    max-width: 820px;
    margin-bottom: 20px;
    color: #bad4df;
    font-size: 15px;
    line-height: 1.65;
}

.auth-home-grid {
    align-items: stretch;
    margin-left: -8px;
    margin-right: -8px;
}

.auth-home-grid > .auth-column {
    display: flex;
    padding-left: 8px;
    padding-right: 8px;
}

.auth-card {
    width: 100%;
    margin-bottom: 16px !important;
}

.auth-card .card-body,
.auth-card .auth-card-body {
    padding: 22px;
}

.auth-card .card-title,
.auth-card h5 {
    color: #f5fbff;
    font-size: 17px;
    font-weight: 750;
}

.auth-card-heading {
    padding: 22px 26px 18px;
    border-bottom: 1px solid var(--auth-line);
    background: linear-gradient(100deg, rgba(34,211,238,.13), transparent 76%);
}

.auth-card-heading h1 {
    margin: 5px 0 0;
    color: #fff;
    font-size: 25px;
    font-weight: 800;
}

.auth-card-heading p {
    margin: 7px 0 0;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-eyebrow {
    color: var(--auth-cyan-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

/* Forms */
.auth-form label {
    display: block;
    margin-bottom: 7px;
    color: #b9d9e5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .25px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .form-control,
.auth-form select,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    min-height: 43px;
    padding: 10px 13px;
    color: #edfaff !important;
    border: 1px solid rgba(103,232,249,.23) !important;
    border-radius: 9px !important;
    outline: none;
    background: rgba(1, 9, 20, .72) !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.35) !important;
    font-size: 13px;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.auth-form .form-control::placeholder,
.auth-form input::placeholder {
    color: #6f929f !important;
    opacity: 1;
}

.auth-form .form-control:focus,
.auth-form input:focus,
.auth-form select:focus {
    color: #fff !important;
    border-color: var(--auth-cyan) !important;
    background: rgba(2, 15, 29, .92) !important;
    box-shadow: 0 0 0 3px rgba(34,211,238,.13), 0 0 18px rgba(34,211,238,.10) !important;
}

.auth-form select option {
    color: #e8f5fa;
    background: #0b1b2d;
}

.auth-form .inputDesc,
.auth-form .inputDesc small {
    display: block;
    margin-top: 5px;
    color: #87a9b7;
    font-size: 11px;
    line-height: 1.45;
}

.auth-form .checkbox {
    color: #c9dfe7;
    font-size: 12px;
    line-height: 1.55;
}

.auth-form input[type="checkbox"] {
    margin-right: 7px;
    accent-color: var(--auth-cyan);
}

.auth-form .error {
    display: block;
    margin-top: 5px;
    color: #fb7185;
    font-size: 11px;
}

.auth-form button,
.auth-page .btn {
    min-height: 40px;
    padding: 9px 18px;
    color: #f4fdff !important;
    border: 1px solid rgba(103,232,249,.42) !important;
    border-radius: 9px !important;
    background: linear-gradient(135deg, rgba(34,211,238,.32), rgba(14,116,144,.50)) !important;
    box-shadow: 0 7px 20px rgba(0,0,0,.18);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .35px;
    text-shadow: none !important;
    transition: .18s ease;
}

.auth-form button:hover,
.auth-page .btn:hover {
    border-color: var(--auth-cyan) !important;
    background: linear-gradient(135deg, rgba(34,211,238,.48), rgba(14,116,144,.66)) !important;
    box-shadow: 0 0 18px rgba(34,211,238,.22);
    transform: translateY(-1px);
}

.auth-page .btn-success {
    border-color: rgba(52,211,153,.42) !important;
    background: linear-gradient(135deg, rgba(16,185,129,.32), rgba(5,150,105,.48)) !important;
}

.auth-page .btn-danger {
    border-color: rgba(103,232,249,.42) !important;
    background: linear-gradient(135deg, rgba(34,211,238,.32), rgba(14,116,144,.50)) !important;
}

.auth-page a {
    color: var(--auth-cyan-light);
    text-decoration: none;
}
.auth-page a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(34,211,238,.35);
}

.auth-login-form .form-group:last-of-type {
    margin-bottom: 18px;
}

/* Registration form: two balanced columns on desktop, one on phones. */
.auth-register-card {
    max-width: 900px;
    margin-left: auto !important;
    margin-right: auto !important;
}
.auth-register-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    align-items: start;
}
.auth-register-form > input[type="hidden"] {
    display: none;
}
.auth-register-form .form-group {
    min-width: 0;
}
.auth-register-form #captchaRow,
.auth-register-form .checkbox,
.auth-register-form > div[style*="text-align"],
.auth-register-form .g-recaptcha {
    grid-column: 1 / -1;
}
.auth-register-form #captchaRow {
    margin: 4px 0 16px;
    overflow-x: auto;
}
.auth-register-form .g-recaptcha {
    max-width: 100%;
}
.auth-register-form > div[style*="text-align"] {
    width: 100%;
}

/* Server list, carousel and news card */
.auth-server-card .list-group {
    color: #c8e0e9;
    border: 1px solid rgba(103,232,249,.12);
    border-radius: 9px;
    background: rgba(1,9,20,.46);
    padding: 10px;
    line-height: 1.8;
}
.auth-news-card .carousel {
    margin: 12px;
    overflow: hidden;
    border-radius: 10px !important;
}
.auth-news-card .carousel img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.auth-news-card .card-body {
    padding-top: 12px;
}

/* General card/list styles on public pages */
.auth-page .card-header {
    padding: 15px 20px;
    color: #fff;
    border: 0;
    border-bottom: 1px solid var(--auth-line);
    background: linear-gradient(90deg, rgba(34,211,238,.15), transparent 78%);
    font-weight: 800;
}
.auth-page .card-text,
.auth-page p {
    color: #b8d0da;
    line-height: 1.65;
}
.auth-page .img-thumbnail {
    border-color: var(--auth-line);
    border-radius: 10px;
    background: rgba(2,10,22,.75);
}
.auth-page .list-group-item {
    color: #d9edf4;
    border-color: var(--auth-line);
    background: rgba(2,12,25,.65);
}

/* Footer */
body > footer {
    margin-top: 30px;
    color: #83a6b5;
    border-top: 1px solid rgba(103,232,249,.14);
    background: rgba(2,10,21,.68);
    backdrop-filter: blur(12px);
}
body > footer .container {
    padding-top: 14px;
    padding-bottom: 8px;
}
body > footer a {
    color: var(--auth-cyan-light);
}

/* Small screens */
@media (max-width: 767.98px) {
    body {
        padding-top: 82px;
        background-attachment: scroll, scroll, scroll, scroll, scroll;
    }
    body > nav.navbar {
        top: 7px;
        left: 7px;
        right: 7px;
        min-height: 54px;
        padding: 6px 10px;
    }
    .auth-brand-logo {
        height: 33px;
        max-width: 125px;
    }
    body > nav.navbar .navbar-brand {
        gap: 7px;
        margin-right: 8px;
        font-size: 14px;
    }
    body > nav.navbar .navbar-collapse {
        margin-top: 8px;
        padding: 8px;
        border: 1px solid var(--auth-line);
        border-radius: 10px;
        background: rgba(3,14,27,.97);
    }
    body > nav.navbar .nav-link {
        padding: 9px 10px !important;
    }
    .auth-page {
        width: calc(100% - 20px);
        margin-top: 12px;
        margin-bottom: 24px;
    }
    .auth-hero {
        min-height: 0;
        padding: 24px 20px;
    }
    .auth-hero::after {
        display: none;
    }
    .auth-hero h1 {
        font-size: 27px;
    }
    .auth-hero .lead {
        font-size: 13px;
    }
    .auth-card .card-body,
    .auth-card .auth-card-body {
        padding: 17px;
    }
    .auth-register-card {
        max-width: none;
    }
    .auth-register-form {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
    }
    .auth-register-form #captchaRow,
    .auth-register-form .checkbox,
    .auth-register-form > div[style*="text-align"],
    .auth-register-form .g-recaptcha {
        grid-column: 1;
    }
    .auth-home-grid > .auth-column {
        display: block;
    }
    .auth-news-card .carousel {
        margin: 10px;
    }
}

@media (max-width: 380px) {
    .auth-page {
        width: calc(100% - 14px);
    }
    .auth-card .card-body,
    .auth-card .auth-card-body {
        padding: 14px;
    }
    .auth-hero {
        padding: 20px 16px;
    }
    .auth-hero h1 {
        font-size: 23px;
    }
}
