/* Vice authentication modal ------------------------------------------------ */

body.vice-auth-open { overflow: hidden; }

#vice-auth-modal.ui.modal {
    display: none;
    width: min(92vw, 42rem) !important;
    max-height: 92vh;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255, 178, 198, .24) !important;
    border-radius: 1.75rem !important;
    background:
        radial-gradient(circle at 12% 0, rgba(255, 178, 198, .18), transparent 18rem),
        linear-gradient(150deg, #20172f 0%, #120e20 58%, #0d0a17 100%) !important;
    box-shadow: 0 35px 110px rgba(3, 2, 10, .68), 0 0 70px rgba(255, 109, 169, .08) !important;
}

#vice-auth-modal.ui.modal.is-open {
    position: fixed;
    inset: 50% auto auto 50%;
    z-index: 10001;
    display: block !important;
    transform: translate(-50%, -50%);
}

body.vice-auth-open::before {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(7, 4, 16, .76);
    backdrop-filter: blur(14px) saturate(1.15);
    content: "";
}

body.vice-auth-open > .ui.dimmer.modals { z-index: 10000 !important; }

body.vice-auth-open .ui.dimmer.modals {
    background: rgba(7, 4, 16, .76) !important;
    backdrop-filter: blur(14px) saturate(1.15);
}

.vice-auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 4;
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.vice-auth-close i { margin: 0 !important; }

.vice-auth-close:hover,
.vice-auth-close:focus-visible {
    border-color: rgba(255, 178, 198, .55);
    background: rgba(255, 178, 198, .14);
    transform: rotate(7deg) scale(1.04);
}

.vice-auth-close:focus-visible {
    outline: 2px solid #ffb2c6;
    outline-offset: 2px;
}

.vice-auth-modal-header {
    padding: 1.35rem 4.5rem .8rem 1.5rem;
}

.vice-auth-eyebrow {
    display: block;
    margin-bottom: .25rem;
    color: #ffb2c6;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.vice-auth-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    line-height: 1;
}

.vice-auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
    margin: .35rem 1.5rem 1rem;
    padding: .32rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    background: rgba(4, 3, 11, .38);
}

.vice-auth-switch button {
    min-height: 2.65rem;
    padding: .65rem 1rem;
    border: 0;
    border-radius: 999px;
    color: rgba(255, 255, 255, .58);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.vice-auth-switch button i { margin-right: .45rem; }

.vice-auth-switch button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .055);
}

.vice-auth-switch button.is-active {
    color: #160d1d;
    background: linear-gradient(110deg, #ffb2c6, #ffc06f);
    box-shadow: 0 8px 24px rgba(255, 178, 198, .18);
}

.vice-auth-switch button:focus-visible {
    outline: 2px solid #ffb2c6;
    outline-offset: 2px;
}

.vice-auth-frame-shell {
    position: relative;
    height: min(67vh, 42rem);
    min-height: 25rem;
    margin: 0 .65rem .65rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 1.25rem;
    background: rgba(6, 4, 14, .42);
}

#vice-auth-modal[data-auth-mode="login"] .vice-auth-frame-shell {
    height: min(61vh, 34rem);
}

#vice-auth-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.vice-auth-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 2.35rem;
    height: 2.35rem;
    margin: -1.175rem 0 0 -1.175rem;
    border: 3px solid rgba(255, 255, 255, .1);
    border-top-color: #ffb2c6;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: vice-auth-spin .75s linear infinite;
    transition: opacity .18s ease;
}

.vice-auth-frame-shell.is-loading .vice-auth-loader { opacity: 1; }
.vice-auth-frame-shell.is-loading iframe { opacity: .15; }

@keyframes vice-auth-spin { to { transform: rotate(360deg); } }

/* The same NamelessMC forms render inside the modal iframe. */
html.vice-auth-frame,
html.vice-auth-frame body {
    min-height: 0 !important;
    color: #fff !important;
    background: transparent !important;
}

html.vice-auth-frame body { margin: 0 !important; padding: 0 !important; overflow-x: hidden; }

html.vice-auth-frame #toc,
html.vice-auth-frame .vice-city-strip,
html.vice-auth-frame #navbar,
html.vice-auth-frame .vice-hero-scrollstage,
html.vice-auth-frame #footer,
html.vice-auth-frame #vice-auth-modal,
html.vice-auth-frame .vice-auth-page-title,
html.vice-auth-frame .vice-auth-alternate-divider,
html.vice-auth-frame .vice-auth-alternate-action,
html.vice-auth-frame .vice-palm {
    display: none !important;
}

html.vice-auth-frame .pusher,
html.vice-auth-frame #wrapper {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    transform: none !important;
}

html.vice-auth-frame #vice-content.ui.container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: .45rem !important;
}

html.vice-auth-frame #ie-message,
html.vice-auth-frame #update-message { display: none !important; }

html.vice-auth-frame #login.ui.segment,
html.vice-auth-frame #register.ui.segment {
    margin: 0 !important;
    padding: 1rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html.vice-auth-frame #login .ui.grid,
html.vice-auth-frame #register .ui.grid { margin: 0 !important; }

html.vice-auth-frame #login .row,
html.vice-auth-frame #register .row,
html.vice-auth-frame #login .column,
html.vice-auth-frame #register .column {
    width: 100% !important;
    padding: .35rem !important;
}

html.vice-auth-frame .ui.form .field > label,
html.vice-auth-frame .ui.checkbox label,
html.vice-auth-frame .ui.radio.checkbox label {
    color: rgba(255, 255, 255, .82) !important;
    font-size: .88rem !important;
    font-weight: 750 !important;
}

html.vice-auth-frame .ui.form input:not([type="checkbox"]):not([type="radio"]),
html.vice-auth-frame .ui.form textarea,
html.vice-auth-frame .ui.form .ui.dropdown {
    min-height: 3.15rem;
    border: 1px solid rgba(255, 255, 255, .11) !important;
    border-radius: .9rem !important;
    color: #fff !important;
    background: rgba(255, 255, 255, .055) !important;
    box-shadow: none !important;
    font-size: 1rem !important;
}

html.vice-auth-frame .ui.form input:focus,
html.vice-auth-frame .ui.form textarea:focus,
html.vice-auth-frame .ui.form .ui.dropdown.active {
    border-color: rgba(255, 178, 198, .62) !important;
    box-shadow: 0 0 0 3px rgba(255, 178, 198, .08) !important;
}

html.vice-auth-frame .ui.form input[type="submit"].button {
    min-height: 3rem;
    padding: .85rem 1.35rem !important;
    border-radius: 999px !important;
    color: #160d1d !important;
    background: linear-gradient(110deg, #ffb2c6, #ffc06f) !important;
    box-shadow: 0 12px 26px rgba(255, 178, 198, .16) !important;
    font-weight: 900 !important;
}

html.vice-auth-frame .ui.form .right.floated.button {
    border-radius: 999px !important;
    color: rgba(255, 255, 255, .72) !important;
    background: rgba(255, 255, 255, .06) !important;
}

html.vice-auth-frame .ui.horizontal.divider {
    margin: 1.35rem 0 !important;
    color: rgba(255, 255, 255, .42) !important;
    font-size: .75rem;
}

html.vice-auth-frame .ui.message {
    margin: .45rem !important;
    border-radius: 1rem !important;
}

html.vice-auth-frame .vi-scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
}

@media (max-width: 640px) {
    #vice-auth-modal.ui.modal {
        width: calc(100vw - 1rem) !important;
        max-height: calc(100vh - 1rem);
        border-radius: 1.35rem !important;
    }

    .vice-auth-modal-header { padding: 1.1rem 4rem .65rem 1rem; }
    .vice-auth-switch { margin: .25rem 1rem .75rem; }
    .vice-auth-frame-shell { height: 72vh; min-height: 22rem; margin: 0 .4rem .4rem; }
    #vice-auth-modal[data-auth-mode="login"] .vice-auth-frame-shell { height: 64vh; }
}

@media (prefers-reduced-motion: reduce) {
    .vice-auth-close,
    .vice-auth-switch button { transition: none; }
    .vice-auth-loader { animation-duration: 1.5s; }
}

/* Cinematic auth redesign -------------------------------------------------- */

#vice-auth-modal.ui.modal {
    width: min(94vw, 62rem) !important;
    border-color: rgba(255, 178, 198, .2) !important;
    border-radius: 2rem !important;
    background: #0d0917 !important;
    box-shadow:
        0 45px 130px rgba(3, 2, 10, .78),
        0 0 0 1px rgba(255, 255, 255, .025),
        0 0 90px rgba(255, 82, 161, .09) !important;
}

.vice-auth-layout {
    display: grid;
    grid-template-columns: minmax(17rem, .82fr) minmax(0, 1.35fr);
    min-height: 32rem;
}

.vice-auth-art {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 1.9rem 0 0 1.9rem;
    background:
        linear-gradient(180deg, rgba(9, 6, 18, .05), rgba(9, 6, 18, .2) 42%, rgba(9, 6, 18, .94)),
        linear-gradient(115deg, rgba(255, 97, 170, .18), transparent 55%),
        url('../assets/images/arcadeon-keyart-sunset-v3.png') center / cover no-repeat;
    isolation: isolate;
}

.vice-auth-art::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 72% 18%, rgba(255, 192, 111, .34), transparent 26%),
        linear-gradient(90deg, transparent 70%, #0d0917 100%);
    content: "";
}

.vice-auth-art::after {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: inherit;
    box-shadow: inset -35px 0 65px rgba(13, 9, 23, .58);
    content: "";
    pointer-events: none;
}

.vice-auth-art-glow {
    position: absolute;
    top: 14%;
    right: 8%;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    background: rgba(255, 176, 116, .48);
    filter: blur(44px);
    opacity: .72;
}

.vice-auth-art-roman {
    position: absolute;
    right: -.45rem;
    bottom: -1.7rem;
    color: rgba(255, 255, 255, .105);
    font-size: clamp(9rem, 17vw, 14rem);
    font-weight: 1000;
    letter-spacing: -.12em;
    line-height: .8;
    text-shadow: 0 0 55px rgba(255, 178, 198, .16);
    user-select: none;
}

.vice-auth-art-copy {
    position: absolute;
    right: 1.65rem;
    bottom: 1.75rem;
    left: 1.65rem;
    z-index: 2;
}

.vice-auth-art-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .65rem;
    color: #ffd4df;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.vice-auth-art-kicker::before {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: #ffb2c6;
    box-shadow: 0 0 18px rgba(255, 178, 198, .75);
    content: "";
}

.vice-auth-art-copy strong {
    display: block;
    max-width: 14rem;
    color: #fff;
    font-size: clamp(1.8rem, 3.4vw, 2.75rem);
    font-weight: 950;
    letter-spacing: -.045em;
    line-height: .92;
    text-shadow: 0 6px 30px rgba(3, 2, 10, .65);
}

.vice-auth-art-rule {
    display: block;
    width: 4.4rem;
    height: .25rem;
    margin-top: 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffb2c6, #ffc06f);
    box-shadow: 0 0 20px rgba(255, 178, 198, .28);
}

.vice-auth-panel {
    position: relative;
    min-width: 0;
    padding: 1.35rem 1.45rem 1.15rem;
    background:
        radial-gradient(circle at 100% 0, rgba(156, 73, 255, .1), transparent 18rem),
        linear-gradient(155deg, rgba(27, 20, 42, .99), rgba(12, 9, 21, .995));
}

.vice-auth-panel::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffb2c6, #ff72b2 46%, #9e61ff 78%, transparent);
    content: "";
    opacity: .72;
}

.vice-auth-modal-header {
    padding: .15rem 3.6rem .95rem 0;
}

.vice-auth-eyebrow {
    margin-bottom: .38rem;
    color: rgba(255, 178, 198, .82);
    font-size: .69rem;
}

.vice-auth-modal-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -.045em;
}

.vice-auth-switch {
    gap: .3rem;
    margin: 0 0 1.05rem;
    padding: .3rem;
    border-color: rgba(255, 255, 255, .07);
    background: rgba(2, 1, 8, .42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.vice-auth-switch button {
    min-height: 2.8rem;
    font-size: .9rem;
}

.vice-auth-switch button.is-active {
    background: linear-gradient(115deg, #ffabc2 0%, #ff91bd 42%, #ffc36d 100%);
    box-shadow: 0 9px 28px rgba(255, 142, 187, .2);
}

.vice-auth-frame-shell,
#vice-auth-modal[data-auth-mode="login"] .vice-auth-frame-shell {
    height: 20rem;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 1rem;
    background: transparent;
    transition: none;
}

.vice-auth-frame-shell.is-scrollable {
    background: rgba(2, 1, 8, .16);
    box-shadow: inset 0 -18px 28px -28px rgba(255, 255, 255, .2);
}

html.vice-auth-frame #vice-content.ui.container { padding: 0 !important; }

html.vice-auth-frame #login.ui.segment,
html.vice-auth-frame #register.ui.segment { padding: .15rem !important; }

html.vice-auth-frame #login .row,
html.vice-auth-frame #register .row,
html.vice-auth-frame #login .column,
html.vice-auth-frame #register .column { padding: 0 !important; }

html.vice-auth-frame .ui.form .field { margin-bottom: 1rem !important; }

html.vice-auth-frame .ui.form .field > label,
html.vice-auth-frame .ui.checkbox label,
html.vice-auth-frame .ui.radio.checkbox label {
    margin-bottom: .45rem !important;
    color: rgba(255, 255, 255, .72) !important;
    font-size: .82rem !important;
    letter-spacing: .015em;
}

html.vice-auth-frame .ui.form input:not([type="checkbox"]):not([type="radio"]),
html.vice-auth-frame .ui.form textarea,
html.vice-auth-frame .ui.form .ui.dropdown {
    min-height: 3.25rem;
    border-color: rgba(255, 255, 255, .095) !important;
    border-radius: .95rem !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .035)) !important;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

html.vice-auth-frame .ui.form input:not([type="checkbox"]):not([type="radio"]):hover,
html.vice-auth-frame .ui.form textarea:hover,
html.vice-auth-frame .ui.form .ui.dropdown:hover {
    border-color: rgba(255, 178, 198, .22) !important;
}

html.vice-auth-frame .ui.form input:focus,
html.vice-auth-frame .ui.form textarea:focus,
html.vice-auth-frame .ui.form .ui.dropdown.active {
    border-color: rgba(255, 178, 198, .58) !important;
    background: rgba(255, 255, 255, .07) !important;
    box-shadow: 0 0 0 4px rgba(255, 178, 198, .07) !important;
    transform: translateY(-1px);
}

html.vice-auth-frame .ui.checkbox label::before,
html.vice-auth-frame .ui.radio.checkbox label::before {
    border-color: rgba(255, 255, 255, .16) !important;
    border-radius: .4rem !important;
    background: rgba(255, 255, 255, .055) !important;
}

html.vice-auth-frame .ui.form input[type="submit"].button {
    width: 100%;
    min-height: 3.2rem;
    margin-top: .2rem !important;
    background: linear-gradient(115deg, #ffabc2, #ff92be 42%, #ffc36d) !important;
    box-shadow: 0 14px 32px rgba(255, 133, 181, .18) !important;
    transition: box-shadow .2s ease, transform .2s ease, filter .2s ease;
}

html.vice-auth-frame .ui.form input[type="submit"].button:hover {
    box-shadow: 0 18px 38px rgba(255, 133, 181, .28) !important;
    filter: saturate(1.08) brightness(1.03);
    transform: translateY(-2px);
}

html.vice-auth-frame #form-login .vice-auth-external {
    display: flex !important;
    float: none !important;
    width: max-content;
    margin: .75rem auto 0 !important;
    padding: .35rem .6rem !important;
    color: rgba(255, 255, 255, .52) !important;
    background: transparent !important;
    font-size: .82rem;
    box-shadow: none !important;
}

html.vice-auth-frame #form-login .vice-auth-external:hover {
    color: #ffb2c6 !important;
    text-decoration: underline;
    text-underline-offset: .22rem;
}

html.vice-auth-frame .ui.horizontal.divider {
    margin: 1.05rem 0 !important;
    font-size: .7rem;
}

@media (max-width: 820px) {
    #vice-auth-modal.ui.modal {
        width: min(95vw, 42rem) !important;
        border-radius: 1.65rem !important;
    }

    .vice-auth-layout { grid-template-columns: 1fr; min-height: 0; }

    .vice-auth-art {
        min-height: 8rem;
        border-radius: 1.55rem 1.55rem 0 0;
        background-position: center 47%;
    }

    .vice-auth-art::before {
        background:
            linear-gradient(180deg, rgba(9, 6, 18, .08), rgba(9, 6, 18, .82)),
            radial-gradient(circle at 78% 15%, rgba(255, 192, 111, .26), transparent 28%);
    }

    .vice-auth-art::after { box-shadow: inset 0 -28px 48px rgba(13, 9, 23, .72); }
    .vice-auth-art-copy { right: 1.2rem; bottom: 1rem; left: 1.2rem; }
    .vice-auth-art-copy strong { display: none; }
    .vice-auth-art-rule { width: 3.4rem; margin-top: .25rem; }
    .vice-auth-art-roman { right: 1rem; bottom: -.6rem; font-size: 7.5rem; }
    .vice-auth-panel { padding: 1.1rem 1.2rem 1rem; }
}

@media (max-width: 540px) {
    #vice-auth-modal.ui.modal {
        width: calc(100vw - .7rem) !important;
        max-height: calc(100vh - .7rem);
        border-radius: 1.35rem !important;
    }

    .vice-auth-art { min-height: 5.5rem; border-radius: 1.25rem 1.25rem 0 0; }
    .vice-auth-art-copy { bottom: .7rem; }
    .vice-auth-art-kicker { margin: 0; }
    .vice-auth-art-rule { display: none; }
    .vice-auth-art-roman { font-size: 5.5rem; }
    .vice-auth-panel { padding: .9rem .8rem .75rem; }
    .vice-auth-modal-header { padding: 0 3.3rem .75rem 0; }
    .vice-auth-modal-header h2 { font-size: 1.9rem; }
    .vice-auth-switch { margin-bottom: .75rem; }
    .vice-auth-switch button { min-height: 2.55rem; padding: .55rem .45rem; font-size: .82rem; }
    .vice-auth-switch button i { display: none; }
}

@media (max-height: 760px) and (max-width: 820px) {
    .vice-auth-art { min-height: 4.5rem; }
    .vice-auth-art-roman { font-size: 4.8rem; }
    .vice-auth-art-kicker { margin: 0; }
    .vice-auth-art-rule { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .vice-auth-frame-shell,
    html.vice-auth-frame .ui.form input,
    html.vice-auth-frame .ui.form textarea { transition: none !important; }
}
