:root {
    --bg: #080b12;
    --bg-soft: #0e1420;
    --panel: rgba(18, 26, 41, 0.94);
    --panel-2: #151e2e;
    --panel-3: #1c273a;
    --line: rgba(255,255,255,.09);
    --text: #eef4ff;
    --muted: #96a4ba;
    --accent: #6c8cff;
    --accent-2: #56d6c9;
    --danger: #ff647c;
    --success: #52d68a;
    --warning: #ffca69;
    --shadow: 0 18px 45px rgba(0,0,0,.35);
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(108,140,255,.14), transparent 28rem),
        radial-gradient(circle at 85% 85%, rgba(86,214,201,.10), transparent 28rem),
        linear-gradient(135deg, #070a10 0%, #0b111c 55%, #080c14 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .16;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 32px 32px;
}

h1, h2, h3, p { position: relative; }
h1, h2, h3 { letter-spacing: -.02em; }
h2 { margin: 0 0 16px; font-size: clamp(1.35rem, 2vw, 2rem); }
h3 { font-size: 1.05rem; }
p { color: #cbd5e5; }
a { color: var(--accent-2); }

button,
input,
textarea,
select { font: inherit; }

input:not([type="hidden"]):not([type="submit"]):not([type="color"]),
textarea,
select {
    width: min(100%, 420px);
    min-height: 42px;
    margin: 6px 0 12px;
    padding: 10px 12px;
    color: var(--text);
    background: rgba(5, 9, 16, .75);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

textarea { min-height: 180px; resize: vertical; }
input[type="color"] {
    width: 52px;
    height: 38px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel-3);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(108,140,255,.13);
}

button,
input[type="submit"] {
    min-height: 39px;
    padding: 9px 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #7c65e8);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(85,105,230,.22);
    cursor: pointer;
    font-weight: 700;
    transition: transform .15s, filter .15s, opacity .15s;
}

button:hover,
input[type="submit"]:hover { transform: translateY(-1px); filter: brightness(1.08); }
button:active,
input[type="submit"]:active { transform: translateY(0); }
button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

form { color: var(--muted); }

/* Login and register */
body > div[style*="height:100vh"] {
    min-height: 100vh !important;
    height: auto !important;
    padding: 32px 18px;
}

body > div[style*="height:100vh"] > div {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

body > div[style*="height:100vh"] > div::before {
    content: "HQQT SMP";
    grid-column: 1 / -1;
    text-align: center;
    color: #fff;
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -.06em;
    text-shadow: 0 0 30px rgba(108,140,255,.35);
}

body > div[style*="height:100vh"] form {
    min-height: 315px;
    padding: 26px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

body > div[style*="height:100vh"] h2 {
    display: inline-block;
    width: calc(50% - 15px);
    margin: 0 0 10px;
    text-align: center;
}

/* Top navigation */
.tabs {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 14px 18px;
    background: rgba(8, 12, 20, .82);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 35px rgba(0,0,0,.22);
    backdrop-filter: blur(18px);
}

.logged-in-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #cfcfcf;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.logged-in-user .user-prefix,
.logged-in-user .user-badge {
    margin-right: 0;
}

.logged-in-user strong {
    color: #fff;
    margin-left: 6px;
    font-weight: 700;
}

.tabs::before {
    content: "HQQT";
    margin-right: 12px;
    align-self: center;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: .08em;
    color: #fff;
}

.tab-link {
    padding: 9px 13px;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 700;
    transition: .2s ease;
}

.tab-link:hover {
    color: #fff;
    background: rgba(108,140,255,.12);
    border-color: rgba(108,140,255,.22);
    transform: translateY(-1px);
}

.tab-link:last-child:hover {
    color: #fff;
    background: rgba(255,100,124,.14);
    border-color: rgba(255,100,124,.28);
}

/* Main page content */
.tabs + div[style*="margin-left"] {
    width: min(560px, calc(100% - 900px));
    min-width: 300px;
    margin: 28px 0 100px 24px !important;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.tabs + div[style*="margin-left"] form {
    padding: 16px;
    margin: 12px 0;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.tabs + div[style*="margin-left"] p {
    padding: 12px 14px;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.tabs + div[style*="margin-left"] p form { padding: 0; margin: 0 0 0 8px; border: 0; background: none; }

#searchResults p {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chats */
.global-chat,
.friend-chat {
    padding: 16px !important;
    overflow-y: auto !important;
    color: var(--text);
    background: rgba(13, 19, 31, .96) !important;
    border: 1px solid var(--line) !important;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    word-wrap: break-word;
    scrollbar-width: thin;
    scrollbar-color: var(--panel-3) transparent;
}

.global-chat { right: 24px !important; top: 116px !important; height: calc(100vh - 250px) !important; }
.friend-chat { right: 448px !important; top: 116px !important; height: calc(100vh - 250px) !important; }

body > div[style*="right:20px"][style*="top:70px"],
body > div[style*="right:440px"][style*="top:70px"] {
    top: 72px !important;
    padding: 14px 16px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
}

body > div[style*="right:20px"][style*="top:70px"] { right: 24px !important; }
body > div[style*="right:440px"][style*="top:70px"] { right: 448px !important; }

body > div[style*="right:20px"][style*="top:510px"],
body > div[style*="right:440px"][style*="top:510px"] {
    top: auto !important;
    bottom: 22px !important;
    padding: 10px;
    background: rgba(13,19,31,.96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

body > div[style*="right:20px"][style*="top:510px"] { right: 24px !important; }
body > div[style*="right:440px"][style*="top:510px"] { right: 448px !important; }

#globalForm,
#friendForm { margin: 0; }

#globalInput,
#friendInput {
    width: 100%;
    margin: 0;
    background: #080d16;
}

#globalCooldown,
#friendCooldown { color: var(--warning) !important; }

.global-chat p,
.friend-chat p {
    width: fit-content;
    max-width: 88%;
    margin: 8px 0;
    padding: 10px 12px;
    color: #dce5f4;
    background: var(--panel-3);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 5px 14px 14px 14px;
    line-height: 1.42;
    box-shadow: 0 6px 14px rgba(0,0,0,.13);
}

.global-chat .message-right,
.friend-chat .message-right {
    margin-left: auto;
    text-align: left;
    background: linear-gradient(135deg, rgba(108,140,255,.34), rgba(92,105,210,.22));
    border-color: rgba(123,149,255,.24);
    border-radius: 14px 5px 14px 14px;
}

.global-chat .message-left,
.friend-chat .message-left { margin-right: auto; }

.global-chat p form,
.friend-chat p form { display: inline !important; }
.global-chat p button,
.friend-chat p button {
    min-height: auto;
    padding: 1px 6px;
    margin-right: 4px;
    color: #ffd7dd;
    background: rgba(255,100,124,.13);
    box-shadow: none;
    font-size: .72rem;
}

.user-name {
    font-weight: 800;
    color: #fff;
    cursor: pointer;
}

.user-prefix {
    display: inline-block;
    font-weight: 800;
}

.user-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 4px;
    vertical-align: middle;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

/* Hide any old suffixes still returned by PHP */
.user-suffix {
    display: none !important;
}

/* Friend popup */
.add-friend-box {
    position: absolute;
    z-index: 100;
    display: flex;
    gap: 6px;
    padding: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.add-friend-box button:last-child { background: #2a3446; box-shadow: none; }

/* Admin badge editor */
#adminBadgePanel {
    bottom: 74px !important;
    right: 24px !important;
    width: min(340px, calc(100vw - 30px)) !important;
    padding: 20px !important;
    color: var(--text);
    background: rgba(18,26,41,.98) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    backdrop-filter: blur(16px);
}

#adminBadgePanel input[type="text"] { width: 100% !important; }
#toggleBadgePanel {
    right: 24px !important;
    bottom: 22px !important;
    background: linear-gradient(135deg, #f0a550, #e66e62);
}

.footer-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 10px;
    color: white;
    background: var(--accent);
    text-align: center;
    font-weight: bold;
}

img.pasted { max-width: 100%; display: block; margin: 8px 0; border-radius: 10px; }

@media (max-width: 1250px) {
    .tabs + div[style*="margin-left"] {
        width: calc(100% - 480px);
    }
    .friend-chat,
    body > div[style*="right:440px"] { display: none !important; }
}

@media (max-width: 820px) {
    body { padding-bottom: 30px; }
    .tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
    .tabs::before { position: sticky; left: 0; background: rgba(8,12,20,.95); padding-right: 10px; }

    .tabs + div[style*="margin-left"] {
        width: auto;
        min-width: 0;
        margin: 18px 14px 420px !important;
        padding: 18px;
    }

    body > div[style*="right:20px"][style*="top:70px"] {
        position: fixed !important;
        top: auto !important;
        right: 12px !important;
        bottom: 332px !important;
        width: calc(100% - 24px) !important;
    }

    .global-chat {
        position: fixed !important;
        top: auto !important;
        right: 12px !important;
        bottom: 102px !important;
        width: calc(100% - 24px) !important;
        height: 230px !important;
    }

    body > div[style*="right:20px"][style*="top:510px"] {
        position: fixed !important;
        right: 12px !important;
        bottom: 12px !important;
        width: calc(100% - 24px) !important;
    }

    #toggleBadgePanel { bottom: 104px !important; }
    #adminBadgePanel { bottom: 154px !important; }
}

@media (max-width: 640px) {
    body > div[style*="height:100vh"] > div { display: block; }
    body > div[style*="height:100vh"] h2 { width: 100%; margin-top: 16px; }
    body > div[style*="height:100vh"] form { min-height: 0; margin-bottom: 20px; }
    .tab-link { padding: 8px 10px; font-size: .82rem; }
    .global-chat p, .friend-chat p { max-width: 95%; font-size: .9rem; }
}


/* ================= ADMIN PANEL ================= */

.admin-tab-link {
    color: #fff;
    background: rgba(108, 140, 255, 0.16);
    border-color: rgba(108, 140, 255, 0.32);
    font-weight: 800;
}

.admin-tab-link:hover {
    color: #fff;
    background: rgba(108, 140, 255, 0.26);
    border-color: rgba(108, 140, 255, 0.48);
}

.admin-panel-page {
    width: 100%;
    max-width: 760px;
    min-width: 0;
    margin: 0 0 100px;
    color: var(--text);
}

.admin-panel-header {
    margin-bottom: 18px;
}

.admin-panel-header h2 {
    margin: 0 0 5px;
    color: #fff;
}

.admin-panel-page .admin-panel-header p {
    margin: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
}

.admin-search-card,
.admin-user-editor {
    padding: 20px;
    margin-bottom: 18px;
    color: var(--text);
    background:
        linear-gradient(
            145deg,
            rgba(24, 34, 53, 0.98),
            rgba(15, 23, 37, 0.98)
        );
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.admin-search-card > label {
    display: block;
    margin-bottom: 9px;
    color: #eaf0fc;
    font-weight: 750;
}

.admin-search-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.admin-search-row input {
    flex: 1;
    min-width: 0;
}

.admin-search-row input,
.admin-form-grid input:not([type="checkbox"]) {
    width: 100%;
    max-width: none;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    color: var(--text);
    background: rgba(5, 9, 16, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: none;
}

.admin-search-row input::placeholder,
.admin-form-grid input::placeholder {
    color: #71809a;
}

.admin-search-row input:focus,
.admin-form-grid input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(108, 140, 255, 0.13);
}

.admin-search-row button,
.admin-editor-actions button {
    min-height: 42px;
    padding: 9px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #7c65e8);
    border: 0;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 18px rgba(85, 105, 230, 0.22);
    cursor: pointer;
    font-weight: 750;
    white-space: nowrap;
}

.admin-search-row button:hover,
.admin-editor-actions button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.admin-search-row button:disabled,
.admin-editor-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.admin-user-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.admin-user-result {
    width: 100%;
    min-height: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    color: var(--text);
    text-align: left;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: none;
    cursor: pointer;
}

.admin-user-result:hover {
    color: #fff;
    background: rgba(108, 140, 255, 0.11);
    border-color: rgba(108, 140, 255, 0.3);
    transform: translateY(-1px);
}

.admin-result-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-result-main strong {
    color: #fff;
    overflow-wrap: anywhere;
}

.admin-result-main small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.admin-result-tags {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
}

.admin-tag {
    padding: 3px 8px;
    color: #dce5ff;
    background: rgba(108, 140, 255, 0.18);
    border: 1px solid rgba(108, 140, 255, 0.3);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.owner-tag {
    color: #ffe4ac;
    background: rgba(255, 202, 105, 0.14);
    border-color: rgba(255, 202, 105, 0.3);
}

.badge-tag {
    color: #d8fff9;
    background: rgba(86, 214, 201, 0.14);
    border-color: rgba(86, 214, 201, 0.3);
}

.admin-user-editor h3 {
    margin: 0 0 16px;
    color: #fff;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.admin-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #dfe7f5;
    font-weight: 700;
}

.admin-form-grid input[type="color"] {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 4px;
    background: rgba(5, 9, 16, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.admin-form-grid .admin-checkbox-label {
    min-height: 42px;
    align-self: end;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    color: #dfe7f5;
    background: rgba(5, 9, 16, 0.48);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.admin-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.admin-user-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding: 12px 14px;
    color: #dfe7f5;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.admin-panel-page .admin-user-summary p {
    flex: 1;
    min-width: 180px;
    margin: 0;
    padding: 0;
    color: #dfe7f5;
    background: transparent;
    border: 0;
}

.admin-user-summary strong {
    color: #fff;
}

.admin-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.admin-editor-actions .secondary-button {
    color: #dce5f4;
    background: var(--panel-3);
    border: 1px solid var(--line);
    box-shadow: none;
}

.admin-editor-actions .secondary-button:hover {
    background: #26344b;
}

.admin-status {
    min-height: 18px;
    margin-top: 11px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.admin-status-success {
    color: var(--success);
}

.admin-status-error {
    color: var(--danger);
}

.admin-panel-page p.admin-empty-result {
    margin: 0;
    padding: 10px 0 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    font-style: italic;
}

@media (max-width: 640px) {
    .admin-search-row {
        flex-direction: column;
    }

    .admin-search-row button {
        width: 100%;
    }

    .admin-search-card,
    .admin-user-editor {
        padding: 16px;
    }
}


.user-badge {
    margin-right: 0;
}

.logged-in-user {
    display: block;
    margin-left: auto;
    color: #cfcfcf;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.logged-in-user .logged-in-label {
    color: #b5b5b5;
    margin: 0 3px 0 0;
}

.logged-in-user .user-prefix {
    margin: 0 3px 0 0;
    font-size: 13px;
    font-weight: 700;
    vertical-align: baseline;
}

.logged-in-user .user-badge {
    width: 18px;
    height: 18px;
    margin: 0 3px 0 0;
    vertical-align: middle;
}

.logged-in-user strong {
    margin: 0;
    color: #fff;
    font-weight: 700;
}

.logged-in-user .user-suffix {
    display: none !important;
}

/* ================= ADMIN TERMINAL ================= */

.admin-terminal {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.admin-terminal > label {
    display: block;
    margin-bottom: 9px;
    color: #eaf0fc;
    font-weight: 750;
}

.admin-terminal textarea {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    margin: 0;
    padding: 12px;
    color: #d8ffe3;
    background: #050a08;
    border: 1px solid rgba(91, 210, 131, 0.32);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.45;
}

.admin-terminal textarea::placeholder {
    color: #64806c;
}

.admin-terminal textarea:focus {
    border-color: #5bd283;
    box-shadow: 0 0 0 4px rgba(91, 210, 131, 0.12);
}

.admin-terminal-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.admin-terminal-actions button {
    min-height: 40px;
    padding: 9px 16px;
    color: #06120a;
    background: linear-gradient(135deg, #65df8d, #43bd75);
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 800;
}

.admin-terminal-actions button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.admin-terminal-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.admin-terminal-actions span {
    color: var(--muted);
    font-size: 12px;
}

.admin-terminal-output {
    min-height: 120px;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 12px;
    padding: 13px;
    color: #bfe7ca;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #030705;
    border: 1px solid rgba(91, 210, 131, 0.2);
    border-radius: var(--radius-sm);
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.admin-terminal-line-command {
    color: #fff;
    margin-top: 7px;
}

.admin-terminal-line-success {
    color: #85e8a5;
}

.admin-terminal-line-error {
    color: #ff8d98;
}

.banned-tag {
    color: #ffd7db;
    background: rgba(255, 86, 103, 0.14);
    border-color: rgba(255, 86, 103, 0.34);
}

/* ================= ANNOUNCEMENTS ================= */

.global-chat p.message-announcement {
    max-width: 100%;
    margin: 9px 7px;
    padding: 10px 12px;
    color: #ff7d87;
    text-align: left;
    background: rgba(160, 22, 38, 0.2);
    border: 1px solid rgba(255, 82, 99, 0.36);
    border-radius: var(--radius-sm);
    box-shadow: none;
}

.message-announcement .announcement-label {
    color: #ff3f51;
    font-weight: 900;
}

.message-announcement a {
    color: #ffb8be !important;
}

/* ================= BAN POPUP ================= */

.ban-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;

    display: grid !important;
    place-items: center !important;

    padding: 20px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.ban-modal {
    position: relative !important;

    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    padding: 28px;
    box-sizing: border-box;

    color: #ffffff;
    text-align: center;

    background: linear-gradient(145deg, #241116, #10090c);
    border: 1px solid rgba(255, 75, 92, 0.55);
    border-radius: 14px;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.75),
        0 0 35px rgba(255, 45, 65, 0.12);

    animation: banPopupAppear 0.22s ease-out;
}

.ban-modal h2 {
    margin: 0 0 20px;
    padding: 0;

    color: #ff5364;
    font-size: 27px;
    font-weight: 900;
    text-align: center;
}

.ban-modal-label {
    margin: 0 0 7px;
    padding: 0;

    color: #ff9ca6;
    background: none;
    border: 0;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
}

.ban-modal-reason {
    display: block;

    margin: 0 0 22px;
    padding: 15px;

    color: #ffffff;
    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;

    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
}

.ban-modal button {
    display: block;

    width: 100%;
    min-height: 44px;
    padding: 10px 16px;

    color: #ffffff;
    background: linear-gradient(135deg, #e14354, #a92132);
    border: 0;
    border-radius: 9px;

    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
}

.ban-modal button:hover {
    filter: brightness(1.12);
}

@keyframes banPopupAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(15px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 520px) {
    .ban-modal-overlay {
        padding: 14px;
    }

    .ban-modal {
        padding: 22px 18px;
    }

    .ban-modal h2 {
        font-size: 23px;
    }
}
