:root {
    color-scheme: dark;
    --bg: #0c111b;
    --surface: #121a28;
    --surface-2: #182235;
    --surface-3: #202d44;
    --line: #2b3a55;
    --text: #edf4ff;
    --muted: #9eb0ca;
    --muted-2: #6f819c;
    --primary: #6ea8ff;
    --primary-strong: #4e8eea;
    --danger: #ff6b7a;
    --danger-strong: #e34b5d;
    --warning: #ffd166;
    --success: #78d381;
    --shadow: 0 24px 80px rgba(0, 0, 0, .35);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 20% -10%, rgba(110, 168, 255, .22), transparent 36rem),
        radial-gradient(circle at 90% 0%, rgba(255, 107, 122, .14), transparent 34rem),
        var(--bg);
    color: var(--text);
    overflow: hidden;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.muted-text {
    color: var(--muted);
    margin: 0;
}

.app-shell {
    height: 100%;
    display: grid;
    grid-template-rows: 78px 1fr;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    background: rgba(12, 17, 27, .78);
    backdrop-filter: blur(16px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 280px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: .5px;
    background: linear-gradient(135deg, var(--primary), #9c7cff);
    box-shadow: 0 16px 42px rgba(110, 168, 255, .25);
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: contain;
    background: rgba(0, 0, 0, .16);
    display: block;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .22);
    flex: 0 0 auto;
}

.brand h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.brand .service-status {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.service-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 18px;
    line-height: 1.2;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: var(--muted-2);
    box-shadow: 0 0 0 3px rgba(111, 129, 156, .12);
}

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

.service-status.status-ok .status-dot {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(120, 211, 129, .14);
}

.service-status.status-problem {
    color: var(--danger);
}

.service-status.status-problem .status-dot {
    background: var(--danger);
    box-shadow: 0 0 0 3px rgba(255, 107, 122, .14);
}

.service-status.status-checking {
    color: var(--muted);
}

.service-status.status-checking .status-dot {
    background: var(--warning);
    box-shadow: 0 0 0 3px rgba(255, 209, 102, .12);
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    min-height: 40px;
    color: var(--text);
    background: var(--surface-3);
    transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
    white-space: nowrap;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #08111f;
    font-weight: 800;
}

.button-ghost {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}

.button-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-strong));
    color: #19070a;
    font-weight: 800;
}

.icon-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    user-select: none;
}

.switch input {
    display: none;
}

.switch span {
    width: 44px;
    height: 24px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .12);
    position: relative;
    border: 1px solid rgba(255, 255, 255, .08);
}

.switch span::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    position: absolute;
    left: 2px;
    top: 2px;
    background: var(--muted);
    transition: left .16s ease, background .16s ease;
}

.switch input:checked + span {
    background: rgba(110, 168, 255, .22);
}

.switch input:checked + span::after {
    left: 22px;
    background: var(--primary);
}

.switch b {
    font-size: 13px;
    font-weight: 700;
}

.layout {
    min-height: 0;
    display: grid;
    grid-template-columns: 290px 360px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
}

.servers-panel,
.tickets-panel,
.chat-panel {
    min-height: 0;
    background: rgba(18, 26, 40, .86);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.servers-panel,
.tickets-panel {
    display: flex;
    flex-direction: column;
    padding: 14px;
}

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.panel-title-row h2 {
    margin: 0;
    font-size: 16px;
}

.badge {
    min-width: 24px;
    height: 24px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: #08111f;
    background: var(--warning);
    font-size: 12px;
    font-weight: 900;
}

.badge.muted {
    background: rgba(255, 255, 255, .1);
    color: var(--muted);
}

.servers-list,
.tickets-list {
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 3px;
}

.server-tab,
.ticket-card {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .045);
    color: var(--text);
    padding: 12px;
    display: grid;
    gap: 6px;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.server-tab:hover,
.ticket-card:hover {
    transform: none;
    background: rgba(255, 255, 255, .07);
    border-color: rgba(110, 168, 255, .36);
}

.server-tab.active,
.ticket-card.active {
    border-color: rgba(110, 168, 255, .7);
    background: rgba(110, 168, 255, .14);
}

.server-tab.has-unread,
.ticket-card.has-unread {
    border-color: rgba(255, 209, 102, .8);
    box-shadow: 0 0 0 1px rgba(255, 209, 102, .15), 0 14px 38px rgba(255, 209, 102, .07);
}

.server-main-line,
.ticket-main-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.server-name,
.ticket-player {
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-meta-line {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-handler {
    color: var(--success);
    font-size: 12px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted-2);
    font-size: 12px;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--danger);
    font-size: 12px;
}

.empty-state {
    display: grid;
    place-items: center;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, .1);
    border-radius: var(--radius-md);
}

.chat-panel {
    overflow: hidden;
}

.chat-empty {
    height: 100%;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.empty-illustration {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    font-size: 32px;
    background: rgba(255, 255, 255, .06);
}

.chat-empty h2 {
    color: var(--text);
    margin: 0 0 8px;
}

.chat-empty p {
    margin: 0;
}

.chat-view {
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 0;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chat-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.messages-list {
    min-height: 0;
    overflow: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: min(760px, 88%);
    border-radius: 18px;
    padding: 10px 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border: 1px solid rgba(255, 255, 255, .08);
}

.message.player {
    align-self: flex-start;
    background: rgba(255, 255, 255, .07);
}

.message.admin {
    align-self: flex-end;
    background: rgba(110, 168, 255, .18);
    border-color: rgba(110, 168, 255, .26);
}

.message.admin.own-admin {
    align-self: flex-end;
    background: rgba(110, 168, 255, .18);
    border-color: rgba(120, 211, 129, .62);
    box-shadow: 0 0 0 1px rgba(120, 211, 129, .18);
}

.message.admin.other-admin {
    align-self: flex-end;
    background: rgba(110, 168, 255, .11);
    border-color: rgba(110, 168, 255, .22);
}

.message.admin.own-admin .message-sender {
    color: var(--success);
}

.message.admin.other-admin .message-sender {
    color: #c9dcff;
}

.message.system {
    max-width: 100%;
    align-self: center;
    background: rgba(255, 209, 102, .10);
    border-color: rgba(255, 209, 102, .22);
    color: var(--muted);
    font-size: 13px;
}

.message-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.message-sender {
    color: var(--text);
    font-weight: 800;
}

.message-form {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .12);
}

textarea,
input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    outline: none;
    padding: 11px 12px;
}

textarea {
    resize: none;
    min-height: 44px;
    max-height: 180px;
}

textarea:focus,
input:focus {
    border-color: rgba(110, 168, 255, .7);
    box-shadow: 0 0 0 3px rgba(110, 168, 255, .14);
}

.modal {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    width: min(520px, calc(100vw - 28px));
}

.modal::backdrop {
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(4px);
}

.modal-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px;
    display: grid;
    gap: 14px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.modal-header h2 {
    margin: 0 0 4px;
}

.modal-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.modal label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.modal label input {
    font-weight: 500;
}

.advanced-block {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.advanced-block summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 800;
}

.advanced-block label {
    margin-top: 12px;
}

.checkbox-row {
    grid-template-columns: auto 1fr !important;
    align-items: center;
    color: var(--text) !important;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
}

.form-error {
    border: 1px solid rgba(255, 107, 122, .4);
    background: rgba(255, 107, 122, .10);
    color: #ffd1d6;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.danger-zone {
    border: 1px solid rgba(255, 107, 122, .22);
    background: rgba(255, 107, 122, .07);
    border-radius: var(--radius-md);
    padding: 12px;
}

.danger-zone h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.danger-zone p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
}

.toast-root {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 20;
    display: grid;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
}

.toast {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(18, 26, 40, .95);
    box-shadow: var(--shadow);
    color: var(--text);
}

.toast strong {
    display: block;
    margin-bottom: 3px;
}

.toast p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.toast.error {
    border-color: rgba(255, 107, 122, .4);
}

.toast.success {
    border-color: rgba(120, 211, 129, .35);
}

@media (max-width: 1180px) {
    body {
        overflow: auto;
    }

    .app-shell {
        min-height: 100%;
        height: auto;
    }

    .layout {
        grid-template-columns: 280px 1fr;
        grid-template-rows: 420px minmax(560px, 1fr);
    }

    .chat-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-shell {
        grid-template-rows: auto 1fr;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 560px;
    }

    .servers-panel,
    .tickets-panel {
        min-height: 240px;
    }

    .message {
        max-width: 96%;
    }
}

/* Mobile navigation drawer */
.mobile-nav-button {
    display: none;
    align-items: center;
    gap: 8px;
}

.mobile-nav-badge {
    min-width: 20px;
    height: 20px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: var(--warning);
    color: #08111f;
    font-size: 11px;
    font-weight: 900;
}

.mobile-navigation-panel {
    display: contents;
}

.mobile-drawer-header,
.mobile-nav-overlay {
    display: none;
}

@media (max-width: 640px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    .app-shell {
        height: 100dvh;
        min-height: 100dvh;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .topbar {
        position: relative;
        z-index: 40;
        flex-direction: row;
        align-items: center;
        padding: 9px 10px;
        gap: 8px;
    }

    .brand {
        min-width: 0;
        flex: 1 1 auto;
        gap: 9px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 13px;
        font-size: 13px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 13px;
    }

    .brand h1 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 42vw;
    }

    .service-status {
        margin-top: 2px;
        font-size: 11px;
        max-width: 46vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-actions {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
        gap: 7px;
    }

    .mobile-nav-button {
        display: inline-flex;
        min-height: 36px;
        min-width: 42px;
        justify-content: center;
        padding: 8px 10px;
        font-size: 18px;
    }

    #desktopNotifyBtn {
        display: none;
    }

    .switch b {
        display: none;
    }

    .switch span {
        width: 40px;
        height: 22px;
    }

    .switch span::after {
        width: 16px;
        height: 16px;
    }

    .switch input:checked + span::after {
        left: 20px;
    }

    .topbar-actions .button:not(.mobile-nav-button) {
        padding: 8px 10px;
        min-height: 36px;
        font-size: 13px;
    }

    .layout {
        position: relative;
        min-height: 0;
        height: 100%;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
        padding: 8px;
        overflow: hidden;
    }

    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(0, 0, 0, .58);
        backdrop-filter: blur(3px);
    }

    .mobile-nav-overlay[hidden] {
        display: none;
    }

    .mobile-navigation-panel {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 80;
        width: min(430px, 92vw);
        padding: 12px;
        background: rgba(12, 17, 27, .98);
        border-right: 1px solid rgba(255, 255, 255, .10);
        box-shadow: 22px 0 70px rgba(0, 0, 0, .48);
        transform: translateX(-104%);
        transition: transform .18s ease;
        overflow: hidden;
    }

    .mobile-navigation-panel.open {
        transform: translateX(0);
    }

    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 2px 0 0;
    }

    .servers-panel,
    .tickets-panel {
        min-height: 0;
        box-shadow: none;
        border-radius: 18px;
        padding: 12px;
    }

    .mobile-navigation-panel .servers-panel {
        flex: 0 0 min(260px, 35dvh);
    }

    .mobile-navigation-panel .tickets-panel {
        flex: 1 1 auto;
    }

    .chat-panel {
        grid-column: auto;
        height: 100%;
        min-height: 0;
        border-radius: 18px;
    }

    .chat-empty {
        min-height: 0;
        padding: 18px;
    }

    .chat-view {
        min-height: 0;
    }

    .chat-header {
        padding: 12px;
        align-items: flex-start;
    }

    .chat-header h2 {
        font-size: 16px;
    }

    .chat-header .muted-text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 12px;
    }

    #closeTicketBtn {
        padding: 8px 10px;
        min-height: 36px;
        font-size: 12px;
    }

    .messages-list {
        padding: 12px;
        gap: 8px;
    }

    .message {
        max-width: 94%;
        border-radius: 15px;
        padding: 9px 10px;
        font-size: 14px;
    }

    .message-head {
        font-size: 11px;
    }

    .message-form {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 9px;
    }

    .message-form textarea {
        min-height: 46px;
        max-height: 130px;
    }

    #sendBtn {
        width: 100%;
    }

    .toast-root {
        right: 10px;
        bottom: 10px;
        max-width: calc(100vw - 20px);
    }

    .modal {
        width: min(520px, calc(100vw - 18px));
    }

    .modal-card {
        max-height: calc(100dvh - 18px);
        overflow: auto;
        padding: 14px;
    }
}

@media (max-width: 520px) {
    .topbar-actions {
        gap: 5px;
    }

    .topbar-actions .button:not(.mobile-nav-button) {
        padding: 8px;
    }

    #settingsBtn {
        display: none;
    }

    .brand h1 {
        max-width: 34vw;
    }

    .service-status {
        max-width: 38vw;
    }
}


/* Top ad slot */
.top-ad-slot {
    flex: 1 1 420px;
    max-width: 560px;
    min-width: 260px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .035);
}

.top-ad-link {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
    overflow: hidden;
}

.top-ad-link.is-disabled {
    cursor: default;
}

.top-ad-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Theme switch button */
.theme-toggle-btn {
    min-width: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 12px;
}

.theme-toggle-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(110, 168, 255, .13);
}

:root[data-theme="zf"] .theme-toggle-dot {
    background: #81cf95;
    box-shadow: 0 0 0 3px rgba(129, 207, 149, .14);
}

.theme-toggle-text {
    font-weight: 800;
}

:root[data-theme="zf"] .top-ad-slot {
    border-color: rgba(192, 192, 192, .10);
    background: rgba(64, 67, 71, .28);
}

@media (max-width: 980px) {
    .top-ad-slot {
        flex: 1 1 260px;
        max-width: 360px;
        min-width: 180px;
        height: 38px;
    }
}

@media (max-width: 640px) {
    #themeToggleBtn {
        display: none;
    }
}


/* ZF logo color theme */
:root[data-theme="zf"] {
    --bg: #1a1a1e;
    --surface: #24262a;
    --surface-2: #303337;
    --surface-3: #404347;
    --line: #4c5055;
    --text: #f1f1f1;
    --muted: #c0c0c0;
    --muted-2: #8f949a;
    --primary: #81cf95;
    --primary-strong: #63b777;
    --danger: #ff6b75;
    --danger-strong: #d84f59;
    --warning: #d7d7d7;
    --success: #81cf95;
    --shadow: 0 24px 80px rgba(0, 0, 0, .42);
    color-scheme: dark;
}

:root[data-theme="zf"] body {
    background:
        radial-gradient(circle at 18% -12%, rgba(129, 207, 149, .18), transparent 34rem),
        radial-gradient(circle at 92% 0%, rgba(192, 192, 192, .08), transparent 30rem),
        linear-gradient(180deg, #1a1a1e, #121316),
        var(--bg);
}

:root[data-theme="zf"] .topbar {
    background: rgba(26, 26, 30, .86);
    border-bottom-color: rgba(192, 192, 192, .10);
}

:root[data-theme="zf"] .servers-panel,
:root[data-theme="zf"] .tickets-panel,
:root[data-theme="zf"] .chat-panel,
:root[data-theme="zf"] .modal-card,
:root[data-theme="zf"] .toast {
    background: rgba(36, 38, 42, .90);
    border-color: rgba(192, 192, 192, .10);
}

:root[data-theme="zf"] .brand-logo {
    box-shadow: 0 16px 42px rgba(0, 0, 0, .28);
}

:root[data-theme="zf"] .button-primary {
    background: linear-gradient(135deg, #81cf95, #63b777);
    color: #111316;
}

:root[data-theme="zf"] .button-ghost {
    background: rgba(192, 192, 192, .065);
    border-color: rgba(192, 192, 192, .12);
}

:root[data-theme="zf"] .button-ghost:hover {
    background: rgba(192, 192, 192, .09);
}

:root[data-theme="zf"] .server-tab,
:root[data-theme="zf"] .ticket-card {
    background: rgba(64, 67, 71, .36);
    border-color: rgba(192, 192, 192, .10);
}

:root[data-theme="zf"] .server-tab:hover,
:root[data-theme="zf"] .ticket-card:hover {
    background: rgba(76, 80, 85, .48);
    border-color: rgba(129, 207, 149, .38);
}

:root[data-theme="zf"] .server-tab.active,
:root[data-theme="zf"] .ticket-card.active {
    border-color: rgba(129, 207, 149, .72);
    background: linear-gradient(135deg, rgba(64, 67, 71, .76), rgba(76, 80, 85, .58));
}

:root[data-theme="zf"] .server-tab.has-unread,
:root[data-theme="zf"] .ticket-card.has-unread {
    border-color: rgba(129, 207, 149, .78);
    box-shadow: 0 0 0 1px rgba(129, 207, 149, .13), 0 14px 38px rgba(129, 207, 149, .06);
}

:root[data-theme="zf"] .badge {
    background: #81cf95;
    color: #111316;
}

:root[data-theme="zf"] .badge.muted {
    background: rgba(192, 192, 192, .12);
    color: var(--muted);
}

:root[data-theme="zf"] .empty-state {
    border-color: rgba(192, 192, 192, .12);
}

:root[data-theme="zf"] .message.player {
    background: rgba(64, 67, 71, .42);
    border-color: rgba(192, 192, 192, .10);
}

:root[data-theme="zf"] .message.admin {
    background: rgba(76, 80, 85, .46);
    border-color: rgba(192, 192, 192, .14);
}

:root[data-theme="zf"] .message.admin.own-admin {
    background: rgba(76, 80, 85, .50);
    border-color: rgba(129, 207, 149, .62);
    box-shadow: 0 0 0 1px rgba(129, 207, 149, .15);
}

:root[data-theme="zf"] .message.admin.other-admin {
    background: rgba(64, 67, 71, .42);
    border-color: rgba(192, 192, 192, .13);
}

:root[data-theme="zf"] .message.admin.own-admin .message-sender {
    color: #81cf95;
}

:root[data-theme="zf"] .message.admin.other-admin .message-sender {
    color: #d7d7d7;
}

:root[data-theme="zf"] .message.system {
    background: rgba(192, 192, 192, .075);
    border-color: rgba(192, 192, 192, .16);
}

:root[data-theme="zf"] textarea,
:root[data-theme="zf"] input {
    background: rgba(26, 26, 30, .40);
    border-color: rgba(192, 192, 192, .13);
}

:root[data-theme="zf"] textarea:focus,
:root[data-theme="zf"] input:focus {
    border-color: rgba(129, 207, 149, .70);
    box-shadow: 0 0 0 3px rgba(129, 207, 149, .14);
}

:root[data-theme="zf"] .switch input:checked + span {
    background: rgba(129, 207, 149, .24);
}

:root[data-theme="zf"] .switch input:checked + span::after {
    background: #81cf95;
}

:root[data-theme="zf"] .link-button {
    color: #ff7d86;
}

:root[data-theme="zf"] .form-error {
    border-color: rgba(255, 107, 117, .40);
    background: rgba(255, 107, 117, .10);
    color: #ffd5d8;
}

:root[data-theme="zf"] .danger-zone {
    border-color: rgba(255, 107, 117, .22);
    background: rgba(255, 107, 117, .06);
}

:root[data-theme="zf"] .mobile-nav-overlay {
    background: rgba(0, 0, 0, .62);
}

:root[data-theme="zf"] .mobile-navigation-panel {
    background: rgba(26, 26, 30, .96);
}

@media (max-width: 640px) {
    :root[data-theme="zf"] .mobile-navigation-panel {
        border-right-color: rgba(192, 192, 192, .12);
    }
}



.top-ad-slot.is-loading {
    opacity: .72;
}

.top-ad-slot.is-loading .top-ad-image {
    visibility: hidden;
}


@media (max-width: 640px) {
    .top-ad-slot {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 30px;
        margin-top: 2px;
        border-radius: 10px;
    }

    .top-ad-image {
        object-fit: contain;
        background: rgba(0, 0, 0, .18);
    }
}


/* Ad slot responsive fix */
@media (max-width: 1180px) {
    .top-ad-slot {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 38px;
    }

    .top-ad-image {
        object-fit: contain;
    }
}

@media (max-width: 640px) {
    .top-ad-slot {
        height: 30px;
        margin-top: 2px;
        border-radius: 10px;
    }
}


/* Hide ads on phones */
@media (max-width: 640px) {
    .top-ad-slot {
        display: none !important;
    }
}


/* Hide ads on phones / touch devices */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
    .top-ad-slot {
        display: none !important;
    }
}
