/* Neon theme overrides. Keep selectors scoped to body[data-theme="neon"]. */


body[data-theme="neon"] {
    --bg-primary: #0e1311;
    --bg-secondary: #141a18;
    --bg-tertiary: #171e1b;
    --bg-input: #202a25;
    --text-primary: #e8ede8;
    --text-secondary: #aab5ab;
    --text-muted: #7b867f;
    --accent-primary: #c8f26b;
    --accent-light: #d9ff86;
    --accent-dark: #7e9a3e;
    --link-color: #c8f26b;
    --link-visited: #c8f26b;
    --border-primary: #c8f26b;
    --border-secondary: #344239;
    --border-muted: #26322c;
    --status-success: #c8f26b;
    --status-error: #ff6b6b;
    --shadow-green: rgba(200, 242, 107, 0.24);
    --shadow-red: rgba(255, 107, 107, 0.28);
    --theme-shell-bg: #0e1311;
    --theme-panel-bg: #141a18;
    --theme-header-bg: #171e1b;
    --theme-header-border: #26322c;
    --theme-control-radius: 6px;
    --theme-message-radius: 8px;
}


body[data-theme="neon"] {
    background-color: var(--theme-shell-bg);
    background-image: radial-gradient(rgba(200, 242, 107, 0.04) 1.25px, transparent 1.25px);
    background-size: 5px 5px;
}


body[data-theme="neon"] .container {
    background: rgba(20, 26, 24, 0.96);
}


@media (min-width: 1025px) {
    body[data-theme="neon"] .container {
        border-left: 0px solid var(--theme-header-border);
        border-right: 0px solid var(--theme-header-border);
        box-shadow: 0 0 0px rgba(200, 242, 107, 0.12);
        position: relative;
        z-index: 2;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    body[data-theme="neon"] .container {
        width: 100%;
        max-width: 640px;
        margin: 0 auto;
        border-left: 0px solid var(--border-primary);
        border-right: 0px solid var(--border-primary);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body[data-theme="neon"] .container {
        width: 100%;
        max-width: 760px;
        margin: 0 auto;
        border-left: 0px solid var(--border-primary);
        border-right: 0px solid var(--border-primary);
    }
}

@media (min-width: 769px) {
    body[data-theme="neon"] .neon-float-logo {
        display: block;
        position: fixed;
        right: 50px;
        bottom: 40px;
        width: 80px;
        opacity: 0.4;
        filter: drop-shadow(0 0 14px rgba(200, 242, 107, 0.4));
        transform: rotate(8deg);
        pointer-events: none;
        z-index: 0;
    }
}


body[data-theme="neon"] .lobby-topbar {
    padding: 10px 14px;
    background: rgba(20, 26, 24, 1);
    border: 1px solid #232e29;
    border-bottom: none;
    border-radius: 14px 14px 0 0; 
    color: #9aa39a;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


body[data-theme="neon"] .neon-top-left {
    display: flex;
    align-items: center;
    gap: 8px;
}


body[data-theme="neon"] .neon-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c8f26b;
    box-shadow: 0 0 12px #c8f26b;
}


body[data-theme="neon"] .brand-text {
    color: #c8f26b;
}


body[data-theme="neon"] .chat-container {
    position: relative;
    background: #0e1311;
}


body[data-theme="neon"] .chat-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(200, 242, 107, 0.05) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
    z-index: 151;
}


body[data-theme="neon"] .lobby-topbar,
body[data-theme="neon"] .chat-session-header,
body[data-theme="neon"] .scrollable-content,
body[data-theme="neon"] .game-area,
body[data-theme="neon"] .input-wrapper.bottom-bar {
    position: relative;
    z-index: 1;
}


body[data-theme="neon"] .chat-session-header,
body[data-theme="neon"] .input-wrapper.bottom-bar,
body[data-theme="neon"] .game-area {
    border-color: var(--theme-header-border);
}


body[data-theme="neon"] .chat-session-header {
    min-height: auto;
    padding: 9px 0 9px 18px;
    align-items: stretch;
    background: #171e1b;
    border: 1px solid #232e29;
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    overflow: visible;
    z-index: 150;
}


body[data-theme="neon"] .chat-session-left {
    gap: 12px;
    align-items: center;
}


body[data-theme="neon"] .chat-session-actions {
    align-items: center;
    padding: 0 6px;
}


body[data-theme="neon"] .chat-session-logo {
    display: block;
    width: 40px;
    height: 40px;
    padding: 4px;
    background: #0e1311;
    border: 1px solid #232e29;
    border-radius: 10px;
}


body[data-theme="neon"] .chat-match-name,
body[data-theme="neon"] .chat-match-status,
body[data-theme="neon"] .theme-choice,
body[data-theme="neon"] .btn-primary,
body[data-theme="neon"] .btn-secondary,
body[data-theme="neon"] .icon-btn {
    font-family: ui-monospace, "JetBrains Mono", monospace;
}

body[data-theme="neon"] .theme-picker {
    background: #101511;
    border-color: var(--theme-header-border);
}

body[data-theme="neon"] .theme-choice {
    background: #0c1410;
    border-color: rgba(200, 242, 107, 0.16);
    color: rgba(200, 242, 107, 0.62);
}

body[data-theme="neon"] .theme-choice:hover {
    border-color: rgba(200, 242, 107, 0.38);
    box-shadow: 0 0 18px rgba(200, 242, 107, 0.08);
}

body[data-theme="neon"] .theme-choice.active {
    background: #101a14;
    border-color: rgba(200, 242, 107, 0.58);
    box-shadow:
        inset 0 0 0 1px rgba(200, 242, 107, 0.08),
        0 0 18px rgba(200, 242, 107, 0.12);
}

body[data-theme="neon"] .theme-choice-name {
    color: #c8f26b;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

body[data-theme="neon"] .theme-choice-note {
    color: rgba(200, 242, 107, 0.42);
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

body[data-theme="neon"] .theme-choice-default .theme-preview {
    background: #0c0c0c;
}

body[data-theme="neon"] .theme-choice-default .theme-preview-top {
    background: #191919;
    border: 1px solid #2a2a2a;
}

body[data-theme="neon"] .theme-choice-default .theme-preview-bubble-other {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
}

body[data-theme="neon"] .theme-choice-default .theme-preview-bubble-own {
    background: #ffffff;
}

body[data-theme="neon"] .theme-choice-neon .theme-preview {
    background:
        radial-gradient(rgba(200, 242, 107, 0.09) 1px, transparent 1px),
        linear-gradient(180deg, #17231d, #0e1511);
    background-size: 4px 4px, auto;
}

body[data-theme="neon"] .theme-choice-neon .theme-preview-top {
    background: rgba(200, 242, 107, 0.08);
    border: 1px solid rgba(200, 242, 107, 0.28);
}

body[data-theme="neon"] .theme-choice-neon .theme-preview-bubble-other {
    background: #1a2420;
    border: 1px solid rgba(200, 242, 107, 0.2);
}

body[data-theme="neon"] .theme-choice-neon .theme-preview-bubble-own {
    background: #c8f26b;
    box-shadow: 0 0 14px rgba(200, 242, 107, 0.22);
}


body[data-theme="neon"] .chat-match-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8ede8;
    font-size: 14px;
}


body[data-theme="neon"] .chat-match-status {
    color: #5a6560;
    font-size: 11px;
    margin-top: 3px;
    text-transform: none;
    letter-spacing: 0;
}


body[data-theme="neon"] .chat-match-status[data-status="connected"] {
    color: #c8f26b;
    letter-spacing: 0.08em;
}

body[data-theme="neon"] .chat-match-status[data-status="reconnecting"] {
    color: #f0c040;
    letter-spacing: 0.08em;
}

body[data-theme="neon"] .chat-match-status[data-status="ended"],
body[data-theme="neon"] .chat-match-status[data-status="disconnected"] {
    color: #ff6b6b;
    letter-spacing: 0.08em;
}


body[data-theme="neon"] .lobby-message {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 5rem 1.5rem 2rem;
}

@media (max-width: 520px) {
    body[data-theme="neon"] .lobby-message {
        padding: 5.8rem 1.5rem 2rem;
    }

    body[data-theme="neon"] .lobby-btn {
        min-width: min(238px, 82vw);
        padding: 18px 42px;
    }

    body[data-theme="neon"] .lobby-online-stat {
        bottom: 1.15rem;
    }
}


body[data-theme="neon"] .lobby-online-stat {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1.35rem;
    margin: 0;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: #5a6560;
    letter-spacing: 0.06em;
}


body[data-theme="neon"] .lobby-online-stat b {
    color: #9aa39a;
}


body[data-theme="neon"] .lobby-message::before {
    content: "\25CF  WELCOME TO LEMOSHI";
    padding: 6px 12px;
    border: 1px solid #7e9a3e;
    border-radius: 4px;
    color: #c8f26b;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
}


body[data-theme="neon"] .lobby-message h2 {
    display: none;
}


body[data-theme="neon"] .lobby-btn {
    padding: 16px 40px;
    background: #c8f26b;
    color: #0e1311;
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(200, 242, 107, 0.34);
    font-family: ui-monospace, monospace;
    letter-spacing: 0.12em;
}


body[data-theme="neon"] .message.own .message-content {
    background: #c8f26b;
    color: #0e1311;
    border-color: #c8f26b;
    box-shadow: none;
    border-radius: 14px;
    border-bottom-right-radius: 4px;
    border-width: 0;
    padding: 10px 14px;
    line-height: 1.4;
}


body[data-theme="neon"] .message.other .message-content {
    padding: 10px 14px;
    border-radius: 14px 14px 14px 4px;
    font-size: 14px;
    line-height: 1.4;
    background: #171e1b;
    color: rgb(232, 237, 232);
    border: 1px solid rgb(35, 46, 41);
}


body[data-theme="neon"] .system-message,
body[data-theme="neon"] .connection-status {
    border: 1px solid var(--theme-header-border);
    background: rgba(16, 21, 17, 0.56);
    color: var(--text-secondary);
    font-family: ui-monospace, "JetBrains Mono", monospace;
    backdrop-filter: blur(2px);
}


body[data-theme="neon"] .system-message.match-system-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: #5a6560;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: none;
}


body[data-theme="neon"] .system-message.match-system-message::before,
body[data-theme="neon"] .system-message.match-system-message::after {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #7e9a3e;
}

body[data-theme="neon"] .game-status {
    color: #9aa39a;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    letter-spacing: 0.04em;
}

body[data-theme="neon"] #endGame {
    min-width: 52px;
    border: 1px solid rgba(200, 242, 107, 0.24);
    background: #101511;
    color: rgba(200, 242, 107, 0.78);
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    border-radius: 6px;
    box-shadow: none;
}

body[data-theme="neon"] #endGame:hover {
    background: rgba(200, 242, 107, 0.08);
    border-color: rgba(200, 242, 107, 0.46);
    color: #c8f26b;
    box-shadow: 0 0 12px rgba(200, 242, 107, 0.1);
}

@media (max-width: 480px) {
    body[data-theme="neon"] #endGame,
    body[data-theme="neon"] .modal-close-btn,
    body[data-theme="neon"] .ar-window-close,
    body[data-theme="neon"] .close-bug-report-modal {
        min-width: 42px;
        min-height: 42px;
        font-size: 18px;
    }

    body[data-theme="neon"] #endGame {
        min-width: 68px;
        padding: 0.42rem 0.78rem;
        font-size: 12px;
    }
}

body[data-theme="neon"] .tic-tac-toe-board .cell.win {
    background: rgba(200, 242, 107, 0.16);
    border-color: rgba(200, 242, 107, 0.72);
    color: #c8f26b;
    box-shadow:
        inset 0 0 0 1px rgba(200, 242, 107, 0.18),
        0 0 18px rgba(200, 242, 107, 0.28);
}

body[data-theme="neon"] .tic-tac-toe-board .cell.win .game-icon {
    color: #c8f26b;
    filter: drop-shadow(0 0 8px rgba(200, 242, 107, 0.45));
}


body[data-theme="neon"] .scrollable-content {
    background: #141a18;
    border-left: 1px solid #232e29;
    border-right: 1px solid #232e29;
}


body[data-theme="neon"] .messages {
    background: transparent;
    padding: 20px 16px;
}


body[data-theme="neon"] .messages-wrap {
    min-height: 100%;
}


body[data-theme="neon"] .input-wrapper.bottom-bar {
    gap: 4px;
    align-items: center;
    padding: 6px 6px 6px 12px;
    background: #171e1b;
    border: 1px solid #232e29;
    border-radius: 0px 0px 14px 14px;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    min-height: 50px;
}

/* Reply indicator bar */
body[data-theme="neon"] .reply-indicator-bar {
    background: #0c1410;
    border: 1px solid rgba(200, 242, 107, 0.18);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.42);
    font-family: ui-monospace, "JetBrains Mono", monospace;
}

body[data-theme="neon"] .reply-indicator-text {
    color: #9aa39a;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

body[data-theme="neon"] .reply-indicator-text strong {
    color: #c8f26b;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(200, 242, 107, 0.24);
}

body[data-theme="neon"] .reply-cancel-btn {
    color: rgba(200, 242, 107, 0.72);
    border: 1px solid rgba(200, 242, 107, 0.16);
    border-radius: 4px;
}

body[data-theme="neon"] .reply-cancel-btn:hover {
    background: rgba(200, 242, 107, 0.08);
    color: #c8f26b;
    box-shadow: none;
}


body[data-theme="neon"] .chat-controls {
    gap: 3px;
    min-width: 0;
}


body[data-theme="neon"] .lobby-icon-btn,
body[data-theme="neon"] .neon-name-btn {
    height: 34px;
    background: #171e1b;
    border: 1px solid #232e29;
    border-radius: 8px;
    color: #9aa39a;
    cursor: pointer;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
}


body[data-theme="neon"] .lobby-icon-btn {
    width: 34px;
}


body[data-theme="neon"] .neon-name-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
}


body[data-theme="neon"] .neon-name-btn span:first-child {
    color: #c8f26b;
}


body[data-theme="neon"] .lobby-icon-btn:hover,
body[data-theme="neon"] .neon-name-btn:hover {
    color: #e8ede8;
    border-color: #344239;
    background: #1b241f;
}


body[data-theme="neon"] #activeChatControls::before {
    content: "›";
    color: #c8f26b;
    font-size: 16px;
    font-weight: 700;
    margin-right: 1px;
}


body[data-theme="neon"] #messageInput {
    background: transparent;
    border: none;
    color: #e8ede8;
    font-family: inherit;
    padding: 6px 4px;
    min-height: 32px;
    min-width: 0;
}


body[data-theme="neon"] #messageInput:focus {
    box-shadow: none;
    border: none;
}


body[data-theme="neon"] .invite-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 1px;
}

@media (max-width: 480px) {
    body[data-theme="neon"] .message-input-container {
        padding-right: 46px;
        box-sizing: border-box;
        min-width: 0;
    }

    body[data-theme="neon"] #messageInput {
        padding-right: 4px;
    }
}


body[data-theme="neon"] #lockChatButton,
body[data-theme="neon"] #inviteFromHeader {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #9aa39a;
    margin: 0;
    padding: 0;
}


body[data-theme="neon"] .send-btn-text {
    align-self: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    flex: 0 0 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #c8f26b;
    color: #0e1311;
    box-shadow: 0 0 16px rgba(200, 242, 107, 0.34);
}


body[data-theme="neon"] .chat-end-btn {
    align-self: center;
    height: 42px;
    width: 76px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(200, 242, 107, 0.18);
    padding: 0 12px;
    margin: 0 4px 0 6px;
    color: rgba(200, 242, 107, 0.82);
    background: rgba(200, 242, 107, 0.055);
    font-family: ui-monospace, monospace;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: inset 0 0 0 1px rgba(200, 242, 107, 0.025);
}


body[data-theme="neon"] .chat-end-btn:hover {
    background: rgba(200, 242, 107, 0.1);
    border-color: rgba(200, 242, 107, 0.3);
}


body[data-theme="neon"] .chat-end-btn.locked {
    color: #4a554f;
    background: transparent;
    cursor: default;
}


body[data-theme="neon"] .chat-end-btn.locked:hover {
    background: transparent;
}


body[data-theme="neon"] .chat-end-btn.next-state {
    color: rgba(200, 242, 107, 0.86);
    background: rgba(200, 242, 107, 0.06);
}


body[data-theme="neon"] .send-btn-text i {
    display: none;
}


body[data-theme="neon"] .send-btn-text::before {
    content: "›";
    font-family: ui-monospace, monospace;
    font-size: 20px;
    font-weight: 800;
}


body[data-theme="neon"] .system-message.game-invite-message {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    border-color: #7e9a3e;
    background: rgba(27, 42, 18, 0.72);
    border-radius: 12px;
    padding: 10px 12px;
}


body[data-theme="neon"] .system-message.game-invite-message::before {
    content: "*";
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: #c8f26b;
    color: #0e1311;
    font-size: 22px;
    font-weight: 800;
}


body[data-theme="neon"] .system-message.game-invite-message > div:first-child {
    flex: 1;
}


body[data-theme="neon"] .system-message .actions {
    margin-top: 0;
    gap: 0.35rem;
}


body[data-theme="neon"] .system-message .actions .btn-inline {
    border: none;
    border-radius: 7px;
    padding: 7px 10px;
    background: #c8f26b;
    color: #0e1311;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}


body[data-theme="neon"] .system-message .actions .btn-inline.danger {
    background: #141a18;
    color: #9aa39a;
    border: 1px solid #232e29;
}

/* ── Neon Marquee Strip ── */
body[data-theme="neon"] .marquee-strip {
    background: #0e1311;
    border-left: 1px solid #26322c;
    border-right: 1px solid #26322c;
    border-bottom: 1px solid #1e2b24;
    height: 30px;
}

body[data-theme="neon"] .marquee-text {
    font-family: 'Courier New', 'Courier', monospace;
    font-size: 11px;
    color: rgba(200, 242, 107, 0.6);
    letter-spacing: 0.06em;
    text-transform: lowercase;
}


body[data-theme="neon"] .marquee-strip:hover .marquee-text {
    color: rgba(200, 242, 107, 0.85);
}

body[data-theme="neon"] .marquee-broadcast.marquee-text {
    color: #c8f26b;
    --broadcast-pill-bg: rgba(200, 242, 107, 0.08);
    --broadcast-pill-border: rgba(200, 242, 107, 0.25);
}

body[data-theme="neon"] .marquee-strip:hover .marquee-broadcast.marquee-text {
    color: #d6f87a;
}

/* Neon admin password input */
body[data-theme="neon"] .admin-password-input {
    background: #171e1b;
    border-color: #344239;
    color: #e8ede8;
    font-family: 'Courier New', monospace;
}

body[data-theme="neon"] .admin-password-input:focus {
    border-color: #c8f26b;
    box-shadow: 0 0 0 2px rgba(200, 242, 107, 0.12);
}


/* ── Admin Rails (Neon overrides) ── */
body[data-theme="neon"] .admin-rail {
    background: transparent;
    border-color: transparent;
    font-family: 'Courier New', monospace;
}

/* ================================================================
   Neon Theme — Admin Rail Window (Terminal / Cyberpunk Aesthetic)
   ================================================================ */

body[data-theme="neon"] .admin-rail-window-content {
    background: #090d0b;
    border: 1px solid rgba(200, 242, 107, 0.2);
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    box-shadow:
        0 0 0 1px rgba(200, 242, 107, 0.06),
        0 40px 120px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(200, 242, 107, 0.06);
    position: relative;
}

/* Dot grain overlay */
body[data-theme="neon"] .admin-rail-window-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(200, 242, 107, 0.04) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

/* Scanline overlay */
body[data-theme="neon"] .admin-rail-window-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(200, 242, 107, 0.018) 2px,
        rgba(200, 242, 107, 0.018) 4px
    );
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

body[data-theme="neon"] .admin-rail-window .modal-header,
body[data-theme="neon"] .admin-rail-window .ar-window-tabs,
body[data-theme="neon"] .admin-rail-window-body {
    position: relative;
    z-index: 1;
}

/* Header — terminal prompt style */
body[data-theme="neon"] .admin-rail-window .modal-header {
    background: rgba(12, 20, 16, 0.92);
    border-bottom: 1px solid rgba(200, 242, 107, 0.12);
    padding: 11px 16px 10px;
}

body[data-theme="neon"] .admin-rail-window .modal-header::before {
    content: '>';
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: rgba(200, 242, 107, 0.6);
    font-weight: 700;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    opacity: 1;
    margin-right: 2px;
}

body[data-theme="neon"] .admin-rail-window .modal-header h2 {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c8f26b;
    text-shadow: 0 0 12px rgba(200, 242, 107, 0.5);
}

body[data-theme="neon"] .admin-rail-window .modal-close-btn {
    background: rgba(200, 242, 107, 0.06);
    border: 1px solid rgba(200, 242, 107, 0.18);
    color: rgba(200, 242, 107, 0.6);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

body[data-theme="neon"] .admin-rail-window .modal-close-btn:hover {
    background: rgba(200, 242, 107, 0.14);
    color: #c8f26b;
    border-color: rgba(200, 242, 107, 0.4);
}

/* Tab strip — terminal bracket style */
body[data-theme="neon"] .admin-rail-window .ar-window-tabs {
    background:
        linear-gradient(180deg, rgba(20, 31, 25, 0.94), rgba(14, 24, 19, 0.94));
    border-bottom: 1px solid rgba(200, 242, 107, 0.18);
    padding: 8px 14px;
    gap: 6px;
}

body[data-theme="neon"] .admin-rail-window .tab-btn {
    font-family: 'Courier New', monospace !important;
    font-size: 10px !important;
    letter-spacing: 0.1em !important;
    border-radius: 3px !important;
    border: 1px solid rgba(200, 242, 107, 0.24) !important;
    background: rgba(200, 242, 107, 0.045) !important;
    color: rgba(200, 242, 107, 0.62) !important;
    padding: 4px 10px !important;
    position: relative;
}

body[data-theme="neon"] .admin-rail-window .tab-btn::before {
    content: '[';
    margin-right: 3px;
    opacity: 0.6;
}

body[data-theme="neon"] .admin-rail-window .tab-btn::after {
    content: ']';
    margin-left: 3px;
    opacity: 0.6;
}

body[data-theme="neon"] .admin-rail-window .tab-btn:hover {
    background: rgba(200, 242, 107, 0.1) !important;
    color: rgba(200, 242, 107, 0.85) !important;
    border-color: rgba(200, 242, 107, 0.4) !important;
}

body[data-theme="neon"] .admin-rail-window .tab-btn.active {
    background: rgba(200, 242, 107, 0.18) !important;
    color: #c8f26b !important;
    border-color: rgba(200, 242, 107, 0.58) !important;
    text-shadow: 0 0 8px rgba(200, 242, 107, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(200, 242, 107, 0.1),
        0 0 14px rgba(200, 242, 107, 0.08);
}

/* Body */
body[data-theme="neon"] .admin-rail-window-body {
    background:
        linear-gradient(180deg, rgba(21, 31, 25, 0.92), rgba(13, 21, 17, 0.94));
}

/* Cards */
body[data-theme="neon"] .admin-rail-window .ar-card {
    background:
        linear-gradient(180deg, rgba(23, 34, 28, 0.96), rgba(14, 24, 19, 0.96));
    border: 1px solid rgba(200, 242, 107, 0.18);
    border-left: 2px solid rgba(200, 242, 107, 0.5);
    border-radius: 4px;
    box-shadow:
        inset 0 1px 0 rgba(200, 242, 107, 0.06),
        0 12px 28px rgba(0, 0, 0, 0.28);
}

body[data-theme="neon"] .admin-rail-window .ar-card-title {
    font-family: 'Courier New', monospace;
    color: rgba(200, 242, 107, 0.5);
    letter-spacing: 0.14em;
}

/* Section heads */
body[data-theme="neon"] .admin-rail-window .ar-section-head {
    border-bottom-color: rgba(200, 242, 107, 0.1);
    background: rgba(18, 29, 23, 0.52);
    border: 1px solid rgba(200, 242, 107, 0.08);
    border-radius: 4px;
    padding: 8px 10px;
}

/* Items — terminal list rows */
body[data-theme="neon"] .admin-rail-window .ar-item {
    background: rgba(18, 29, 23, 0.9);
    border: 1px solid rgba(200, 242, 107, 0.13);
    border-left: 2px solid rgba(200, 242, 107, 0.38);
    border-radius: 3px;
}

body[data-theme="neon"] .admin-rail-window .ar-item:hover {
    background: rgba(24, 38, 30, 0.95);
    border-left-color: rgba(200, 242, 107, 0.55);
}

body[data-theme="neon"] .admin-rail-window .ar-item-name {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgb(200, 230, 200);
}

body[data-theme="neon"] .admin-rail-window .ar-item-meta {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(200, 242, 107, 0.35);
}

/* Inputs */
body[data-theme="neon"] .admin-rail-window .ar-input,
body[data-theme="neon"] .admin-rail-window .ar-textarea {
    background: rgba(12, 20, 16, 0.94);
    border: 1px solid rgba(200, 242, 107, 0.24);
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgb(200, 230, 200);
    caret-color: #c8f26b;
}

body[data-theme="neon"] .admin-rail-window .ar-input:focus,
body[data-theme="neon"] .admin-rail-window .ar-textarea:focus {
    border-color: rgba(200, 242, 107, 0.5);
    box-shadow: 0 0 0 2px rgba(200, 242, 107, 0.08);
}

body[data-theme="neon"] .admin-rail-window .ar-input::placeholder,
body[data-theme="neon"] .admin-rail-window .ar-textarea::placeholder {
    color: rgba(200, 242, 107, 0.2);
    font-style: normal;
}

/* Buttons */
body[data-theme="neon"] .admin-rail-window .ar-btn {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border-radius: 3px;
    letter-spacing: 0.1em;
}

body[data-theme="neon"] .admin-rail-window .ar-btn-primary {
    background: rgba(200, 242, 107, 0.12);
    border: 1px solid rgba(200, 242, 107, 0.4);
    color: #c8f26b;
    text-shadow: 0 0 8px rgba(200, 242, 107, 0.4);
}

body[data-theme="neon"] .admin-rail-window .ar-btn-primary:hover {
    background: rgba(200, 242, 107, 0.2);
    box-shadow: 0 0 12px rgba(200, 242, 107, 0.2);
    filter: none;
}

body[data-theme="neon"] .admin-rail-window .ar-btn-sm {
    background: rgba(200, 242, 107, 0.06);
    border: 1px solid rgba(200, 242, 107, 0.2);
    color: rgba(200, 242, 107, 0.7);
}

body[data-theme="neon"] .admin-rail-window .ar-btn-danger {
    background: rgba(255, 80, 80, 0.08);
    border-color: rgba(255, 80, 80, 0.25);
    color: rgba(255, 120, 100, 0.9);
}

body[data-theme="neon"] .admin-rail-window .ar-btn-danger:hover {
    background: rgba(255, 80, 80, 0.16);
    box-shadow: 0 0 8px rgba(255, 80, 80, 0.15);
}

body[data-theme="neon"] .admin-rail-window-reports .ar-toggle-report-btn.ar-report-close-btn {
    background: rgba(255, 80, 80, 0.12);
    color: rgba(255, 135, 115, 0.95);
    border-color: rgba(255, 80, 80, 0.34);
}

body[data-theme="neon"] .admin-rail-window-reports .ar-toggle-report-btn.ar-report-close-btn:hover {
    background: rgba(255, 80, 80, 0.2);
    border-color: rgba(255, 80, 80, 0.5);
}

body[data-theme="neon"] .admin-rail-window-reports .ar-toggle-report-btn.ar-report-reopen-btn {
    background: rgba(72, 187, 120, 0.13);
    color: rgba(126, 240, 170, 0.95);
    border-color: rgba(72, 187, 120, 0.36);
}

body[data-theme="neon"] .admin-rail-window-reports .ar-toggle-report-btn.ar-report-reopen-btn:hover {
    background: rgba(72, 187, 120, 0.22);
    border-color: rgba(72, 187, 120, 0.52);
}

/* Icon buttons */
body[data-theme="neon"] .admin-rail-window .ar-icon-btn {
    color: rgba(200, 242, 107, 0.45);
}
body[data-theme="neon"] .admin-rail-window .ar-icon-btn:hover {
    color: #c8f26b;
}

/* Empty state */
body[data-theme="neon"] .admin-rail-window .ar-empty {
    font-family: 'Courier New', monospace;
    color: rgba(200, 242, 107, 0.48);
    background: rgba(18, 29, 23, 0.54);
    border: 1px dashed rgba(200, 242, 107, 0.14);
    border-radius: 4px;
    font-style: normal;
    letter-spacing: 0.06em;
}

body[data-theme="neon"] .admin-rail-window-reports .ar-report-title,
body[data-theme="neon"] .admin-rail-window-reports .ar-report-description,
body[data-theme="neon"] .admin-rail-window-reports .ar-report-meta,
body[data-theme="neon"] .admin-rail-window-reports .ar-item-meta {
    font-family: 'Courier New', monospace;
}

body[data-theme="neon"] .admin-rail-window-reports .ar-report-title {
    color: rgb(218, 242, 218);
}

body[data-theme="neon"] .admin-rail-window-reports .ar-report-description {
    color: rgba(218, 242, 218, 0.88);
}

body[data-theme="neon"] .admin-rail-window-reports .ar-report-meta {
    color: rgba(200, 242, 107, 0.52);
}

/* Banned user rows */
body[data-theme="neon"] .admin-rail-window .banned-users-header {
    background: #0c1410;
    border-color: rgba(200, 242, 107, 0.1);
    color: rgba(200, 242, 107, 0.4);
    font-family: 'Courier New', monospace;
}

body[data-theme="neon"] .admin-rail-window .banned-user-item {
    background: #0b0f0d;
    border-color: rgba(200, 242, 107, 0.08);
    border-left: 2px solid rgba(200, 242, 107, 0.2);
    border-radius: 3px;
}

body[data-theme="neon"] .ar-broadcast-row {
    background: #0d1612;
    border-color: #182418;
}

body[data-theme="neon"] .ar-label {
    color: #c8f26b;
    border-bottom-color: rgba(200, 242, 107, 0.3);
}

body[data-theme="neon"] .ar-label-sm {
    color: #6a9b7a;
    border-bottom-color: rgba(106, 155, 122, 0.2);
}

body[data-theme="neon"] .ar-card {
    background: #111a16;
    border-color: #1a2820;
}

body[data-theme="neon"] .ar-card-title {
    color: #3a5a48;
}

body[data-theme="neon"] .ar-partner-name {
    color: #c8f26b;
}

body[data-theme="neon"] .ar-pid {
    color: #3a5a48;
}

body[data-theme="neon"] .ar-input {
    background: #0a120f;
    border-color: #1a2820;
    color: #9ab8a8;
}

body[data-theme="neon"] .ar-input:focus {
    border-color: rgba(200, 242, 107, 0.4);
    color: #c8e8d0;
}

body[data-theme="neon"] .ar-input::placeholder {
    color: #2a3a32;
}

body[data-theme="neon"] .ar-textarea {
    background: #0a120f;
    border-color: #1a2820;
    color: #9ab8a8;
}

body[data-theme="neon"] .ar-textarea:focus {
    border-color: rgba(200, 242, 107, 0.4);
    color: #c8e8d0;
}

body[data-theme="neon"] .ar-textarea::placeholder {
    color: #2a3a32;
}

body[data-theme="neon"] .ar-btn-primary {
    background: #c8f26b;
    color: #080f06;
}

body[data-theme="neon"] .ar-btn-primary:hover {
    background: #d4ff7a;
}

body[data-theme="neon"] .ar-launch-btn {
    background: linear-gradient(180deg, rgba(200, 242, 107, 0.12), rgba(17, 26, 22, 0.92));
    color: #c8f26b;
    border: 1px solid rgba(200, 242, 107, 0.22);
    box-shadow: inset 0 0 0 1px rgba(200, 242, 107, 0.06), 0 0 18px rgba(200, 242, 107, 0.05);
}

body[data-theme="neon"] .ar-launch-btn:hover {
    background: #c8f26b;
    color: #080f06;
    border-color: #d4ff7a;
    box-shadow: 0 0 22px rgba(200, 242, 107, 0.22);
}

body[data-theme="neon"] #adminPanelBtn {
    background: rgba(200, 242, 107, 0.08);
    border-color: rgba(200, 242, 107, 0.28);
    color: #c8f26b;
    box-shadow: 0 0 12px rgba(200, 242, 107, 0.08);
}

body[data-theme="neon"] .admin-control-tile {
    background: #111a16;
    border-color: #1a2820;
    color: #9ab8a8;
}

body[data-theme="neon"] .admin-control-tile i {
    color: #c8f26b;
}

body[data-theme="neon"] .admin-control-tile:hover {
    border-color: rgba(200, 242, 107, 0.45);
    color: #c8e8d0;
    box-shadow: 0 0 18px rgba(200, 242, 107, 0.12);
}

body[data-theme="neon"] .ar-icon-btn {
    color: #3a5a48;
}

body[data-theme="neon"] .ar-icon-btn:hover {
    color: #c8f26b;
}

body[data-theme="neon"] .ar-item {
    background: #0d1612;
    border-color: #182418;
}

body[data-theme="neon"] .ar-item-name {
    color: #9ab8a8;
}

body[data-theme="neon"] .ar-item-meta {
    color: #3a5a48;
}

body[data-theme="neon"] .ar-empty {
    color: #2a3a32;
    opacity: 1;
}


body[data-theme="neon"] .poll-banner {
    background: #141a18;
    border-color: rgba(200, 242, 107, 0.18);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(200, 242, 107, 0.06);
}

body[data-theme="neon"] .poll-option-btn {
    background: #171e1b;
    border-color: rgba(200, 242, 107, 0.15);
    color: rgb(232, 237, 232);
    font-family: 'Courier New', monospace;
    font-size: 11px;
}
body[data-theme="neon"] .poll-option-btn:hover {
    background: rgba(200, 242, 107, 0.06);
    border-color: rgba(200, 242, 107, 0.4);
}

body[data-theme="neon"] .poll-result-bar {
    background: rgba(200, 242, 107, 0.75);
}

body[data-theme="neon"] .poll-result-check {
    color: rgba(200, 242, 107, 0.9);
}

/* Override global .tab-content.active { display: block !important } for admin rail */
body[data-theme="neon"] .admin-rail-window .tab-content.active {
    display: flex !important;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

body[data-theme="neon"] .admin-rail-window-users [data-ar-tab-content="active"].active,
body[data-theme="neon"] .admin-rail-window-broadcast [data-ar-tab-content="broadcast"].active,
body[data-theme="neon"] .admin-rail-window-marquee [data-ar-tab-content="marquee"].active,
body[data-theme="neon"] .admin-rail-window-polls [data-ar-tab-content="polls"].active {
    display: grid !important;
}

body[data-theme="neon"] .admin-rail-window-users [data-ar-tab-content="banned-users"].active,
body[data-theme="neon"] .admin-rail-window-users [data-ar-tab-content="banned-ips"].active,
body[data-theme="neon"] .admin-rail-window-reports [data-ar-tab-content="reports"].active {
    display: flex !important;
}

@media (max-width: 760px) {
    body[data-theme="neon"] .admin-rail-window-users [data-ar-tab-content="active"].active,
    body[data-theme="neon"] .admin-rail-window-broadcast [data-ar-tab-content="broadcast"].active,
    body[data-theme="neon"] .admin-rail-window-marquee [data-ar-tab-content="marquee"].active,
    body[data-theme="neon"] .admin-rail-window-polls [data-ar-tab-content="polls"].active {
        display: flex !important;
    }
}

/* Neon reaction picker + badges */
body[data-theme="neon"] .reaction-picker {
    background: #0d1210;
    border-color: #2a3830;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75), 0 0 12px rgba(200, 242, 107, 0.05), 0 1px 0 rgba(255,255,255,0.04) inset;
}
body[data-theme="neon"] .reaction-picker-btn:hover {
    background: #202a25;
}
body[data-theme="neon"] .reaction-badge {
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', ui-monospace, "JetBrains Mono", monospace;
    font-size: 0.73rem;
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
body[data-theme="neon"] .reaction-count {
    font-family: ui-monospace, "JetBrains Mono", monospace;
}
body[data-theme="neon"] .reaction-badge:hover {
    border-color: #344239;
}
body[data-theme="neon"] .reaction-badge.own-reacted {
    border-color: #c8f26b;
    background: var(--bg-tertiary);
}
body[data-theme="neon"] .reaction-badge.own-reacted .reaction-count {
    color: #c8f26b;
}

body[data-theme="neon"] .loading-overlay {
    background: #0b100e;
}

body[data-theme="neon"] .loading-overlay .loading-content,
body[data-theme="neon"] .loading-content {
    width: min(500px, calc(100vw - 36px));
    padding: 34px 32px 30px;
    background: #101714;
    border: 1px solid rgba(200, 242, 107, 0.72);
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(200, 242, 107, 0.04),
        0 18px 70px rgba(0, 0, 0, 0.58),
        0 0 32px rgba(200, 242, 107, 0.08);
}

body[data-theme="neon"] .loading-content .logo {
    width: 72px;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

body[data-theme="neon"] .loading-title,
body[data-theme="neon"] .loading-message {
    font-family: ui-monospace, "JetBrains Mono", monospace;
    letter-spacing: 0;
    text-transform: none;
}

body[data-theme="neon"] .loading-title {
    margin-bottom: 10px;
    color: #c8f26b;
    font-size: 0.98rem;
    font-weight: 800;
}

body[data-theme="neon"] .loading-message {
    margin-bottom: 18px;
    color: #b7c4bd;
    font-size: 0.9rem;
    line-height: 1.45;
}

body[data-theme="neon"] .loader {
    position: relative;
    display: block;
    width: 150px;
    height: 20px;
    margin: 0 auto 42px;
    overflow: visible;
    border-radius: 999px;
    background: transparent;
}

body[data-theme="neon"] .loader::before,
body[data-theme="neon"] .loader::after {
    content: "";
    position: absolute;
    inset: auto;
    aspect-ratio: auto;
    animation: none;
    box-shadow: none;
}

body[data-theme="neon"] .loader::before {
    top: 8px;
    left: 12px;
    width: 26px;
    height: 4px;
    border-radius: 999px;
    background: rgba(200, 242, 107, 0.52);
    box-shadow: 0 0 12px rgba(200, 242, 107, 0.28);
    animation: neon-loading-scan-echo 1.65s cubic-bezier(0.45, 0, 0.25, 1) infinite;
    animation-delay: -0.48s;
}

body[data-theme="neon"] .loader::after {
    top: 4px;
    left: 8px;
    width: 64px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg,
        rgba(200, 242, 107, 0),
        rgba(200, 242, 107, 0.16) 22%,
        rgba(200, 242, 107, 0.42) 45%,
        #d9ff7a 76%,
        rgba(217, 255, 122, 0.92));
    box-shadow:
        0 0 20px rgba(200, 242, 107, 0.44),
        0 0 5px rgba(217, 255, 122, 0.78);
    animation: neon-loading-scan 1.65s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

body[data-theme="neon"] .loading-ad-container {
    min-height: 210px;
    margin: 0;
    padding: 18px;
    background: #101714;
    border: 1px solid rgba(69, 91, 79, 0.78);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body[data-theme="neon"] .loading-ad-container .contact-section {
    color: #91a199;
    font-family: ui-monospace, "JetBrains Mono", monospace;
}

body[data-theme="neon"] .loading-ad-container h3 {
    color: #c8f26b;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    opacity: 0.88;
}

body[data-theme="neon"] .loading-ad-container a {
    color: #c8f26b;
    font-size: 0.78rem;
    text-decoration: none;
    opacity: 0.9;
}

@keyframes neon-loading-scan {
    0% {
        transform: translateX(0);
        opacity: 0.28;
    }
    12% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    88% {
        opacity: 1;
    }
    100% {
        transform: translateX(78px);
        opacity: 0.28;
    }
}

@keyframes neon-loading-scan-echo {
    0% {
        transform: translateX(0) scaleX(0.7);
        opacity: 0;
    }
    18% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.46;
    }
    82% {
        opacity: 0.18;
    }
    100% {
        transform: translateX(98px) scaleX(0.9);
        opacity: 0;
    }
}

body[data-theme="neon"] #resetReactionEmojis {
    border: 1px solid rgba(200, 242, 107, 0.18);
}

body[data-theme="neon"] .candy-cell.candy-suspense::after {
    border-color: rgba(200, 242, 107, 0.78);
    box-shadow: 0 0 16px rgba(200, 242, 107, 0.24);
}

body[data-theme="neon"] .candy-cell.candy-suspense .candy-icon {
    filter: drop-shadow(0 0 10px rgba(200, 242, 107, 0.38));
}

body[data-theme="neon"] .poison-candy-highlight {
    outline-color: #ff6b6b;
    box-shadow:
        0 0 0 1px rgba(255, 107, 107, 0.38),
        0 0 16px rgba(255, 107, 107, 0.42),
        0 0 28px rgba(200, 242, 107, 0.12);
}

body[data-theme="neon"] .game-rematch-btn {
    border: 1px solid rgba(200, 242, 107, 0.58);
    background: rgba(13, 18, 16, 0.88);
    color: #c8f26b;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.42),
        0 0 10px rgba(200, 242, 107, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="neon"] .game-rematch-btn:hover,
body[data-theme="neon"] .game-rematch-btn:focus-visible {
    border-color: rgba(200, 242, 107, 0.86);
    background: rgba(25, 34, 29, 0.94);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.44),
        0 0 14px rgba(200, 242, 107, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme="neon"] .game-rematch-btn:disabled {
    border-color: rgba(200, 242, 107, 0.25);
    color: rgba(200, 242, 107, 0.58);
    background: rgba(13, 18, 16, 0.62);
}

body[data-theme="neon"] .game-area.game-result-win {
    border-color: rgba(117, 255, 174, 0.78);
    box-shadow:
        0 -12px 20px -12px rgba(117, 255, 174, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="neon"] .game-area.game-result-loss {
    border-color: rgba(255, 95, 95, 0.78);
    box-shadow:
        0 -12px 20px -12px rgba(255, 95, 95, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="neon"] .game-area.game-result-draw {
    border-color: rgba(250, 204, 21, 0.72);
    box-shadow:
        0 -12px 20px -12px rgba(250, 204, 21, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="neon"] .game-area.game-result-win .game-title {
    color: #75ffae;
}

body[data-theme="neon"] .game-area.game-result-loss .game-title {
    color: #ff8b8b;
}

body[data-theme="neon"] .game-area.game-result-draw .game-title {
    color: #facc15;
}

.game-rematch-btn,
.game-rematch-btn:hover,
.game-rematch-btn:focus,
.game-rematch-btn:focus-visible,
.game-rematch-btn:active {
    transform: translateX(-50%) !important;
}
body[data-theme="neon"] .input-wrapper.bottom-bar.end-button-in-composer {
    gap: 4px;
    align-items: center;
    padding: 6px 6px 6px 6px;
}

body[data-theme="neon"] .input-wrapper.bottom-bar.ended-chat-visible {
    gap: 0;
    padding: 0;
}

body[data-theme="neon"] .ended-chat-actions,
body[data-theme="neon"] .feedback-actions,
body[data-theme="neon"] .feedback-followup,
body[data-theme="neon"] .feedback-tags {
    gap: 0;
}

body[data-theme="neon"] #endedChatControls.chat-controls {
    gap: 0;
}

body[data-theme="neon"] .ended-chat-actions > button,
body[data-theme="neon"] .feedback-choice,
body[data-theme="neon"] .feedback-tags button {
    border-radius: 0;
    font-family: ui-monospace, "JetBrains Mono", monospace;
}

body[data-theme="neon"] .ended-chat-actions > button {
    padding: 0rem 1.5rem;
}

body[data-theme="neon"] .ended-chat-actions > .btn-primary:hover {
    background: rgba(200, 242, 107, 0.22);
    color: #d9ff8f;
    box-shadow: none;
}

body[data-theme="neon"] .ended-chat-actions > .btn-secondary:hover {
    background: rgba(200, 242, 107, 0.1);
    color: #c8f26b;
    box-shadow: none;
}

body[data-theme="neon"] #nextChatButton {
    border-bottom-left-radius: 8px;
}

body[data-theme="neon"] #blockUserButton {
    border-bottom-right-radius: 8px;
}

body[data-theme="neon"] .ended-chat-actions #backToLobbyButton,
body[data-theme="neon"] .ended-chat-actions #blockUserButton {
    border: 0;
}

body[data-theme="neon"] .ended-chat-actions #blockUserButton {
    border-left: 1px solid rgba(200, 242, 107, 0.22);
}

body[data-theme="neon"] .feedback-choice[data-feedback="didnt-click"] {
    border-top-left-radius: 8px;
    background: rgba(255, 107, 107, 0.12);
    color: #ffb4b4;
}

body[data-theme="neon"] .feedback-choice[data-feedback="enjoyed"] {
    border-top-right-radius: 8px;
    background: rgba(200, 242, 107, 0.12);
    color: #d9ff8f;
}

body[data-theme="neon"] .feedback-choice[data-feedback="didnt-click"]:hover {
    background: rgba(255, 107, 107, 0.18);
}

body[data-theme="neon"] .feedback-choice[data-feedback="enjoyed"]:hover {
    background: rgba(200, 242, 107, 0.18);
}

body[data-theme="neon"] .ended-chat-actions > .btn-secondary + .btn-secondary,
body[data-theme="neon"] .feedback-tags button + button {
    border-left: 1px solid rgba(200, 242, 107, 0.22);
}

body[data-theme="neon"] #activeChatControls.end-button-in-composer {
    gap: 3px;
}

body[data-theme="neon"] #activeChatControls.end-button-in-composer::before {
    order: 1;
}

/* ---- Neon active/ended chat cleanup ---- */
body[data-theme="neon"] #bugReportButton,
body[data-theme="neon"] #userReportButton {
    display: none !important;
}

body[data-theme="neon"] .chat-safety-menu-wrap {
    display: flex;
    position: relative;
    align-items: center;
}

body[data-theme="neon"] .chat-safety-menu-button {
    color: #c8f26b;
}

body[data-theme="neon"] .chat-safety-menu-button[aria-expanded="true"],
body[data-theme="neon"] .chat-safety-menu-button:hover,
body[data-theme="neon"] .chat-session-actions .chat-header-btn:hover {
    background: rgba(200, 242, 107, 0.08);
    box-shadow: none;
}

body[data-theme="neon"] .chat-safety-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 2000;
    min-width: 205px;
    padding: 6px;
    border: 1px solid rgba(200, 242, 107, 0.22);
    border-radius: 8px;
    background: rgba(14, 19, 17, 0.96);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), 0 0 14px rgba(200, 242, 107, 0.05);
}

body[data-theme="neon"] .chat-safety-menu-item {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(232, 237, 232, 0.86);
    font: 700 12px/1.2 ui-monospace, "JetBrains Mono", monospace;
    letter-spacing: 0.03em;
    text-align: left;
    cursor: pointer;
}

body[data-theme="neon"] .chat-safety-menu-item:hover {
    background: rgba(200, 242, 107, 0.1);
    color: #d9ff8f;
}

body[data-theme="neon"] .chat-safety-menu-item i {
    width: 18px;
    color: rgba(200, 242, 107, 0.78);
    font-size: 14px;
    font-weight: 400;
    text-align: center;
}

body[data-theme="neon"] .system-message.match-system-message {
    color: rgba(170, 181, 171, 0.72);
    font-weight: 700;
}

body[data-theme="neon"] .system-message.match-system-message::before,
body[data-theme="neon"] .system-message.match-system-message::after {
    background: rgba(200, 242, 107, 0.82);
}

body[data-theme="neon"] .system-message.ended-system-message {
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 18px auto 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(232, 237, 232, 0.78);
    box-shadow: none;
    backdrop-filter: none;
    font-size: 13px;
    letter-spacing: 0.03em;
}

body[data-theme="neon"] .input-wrapper.bottom-bar.ended-chat-visible {
    gap: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}

body[data-theme="neon"] #endedChatControls.chat-controls,
body[data-theme="neon"] .post-chat-feedback,
body[data-theme="neon"] .feedback-actions,
body[data-theme="neon"] .feedback-followup,
body[data-theme="neon"] .feedback-tags,
body[data-theme="neon"] .ended-chat-actions {
    gap: 8px;
}

body[data-theme="neon"] .feedback-choice,
body[data-theme="neon"] .feedback-tags button,
body[data-theme="neon"] .ended-chat-actions > button {
    border-radius: 8px;
    border: 1px solid rgba(200, 242, 107, 0.18);
    min-height: 38px;
    padding: 8px 10px;
    box-shadow: none;
}

@media (max-width: 480px) {
    body[data-theme="neon"] .feedback-tags button {
        min-width: 0;
        padding-inline: 5px;
        font-size: clamp(10px, 2.8vw, 12px);
    }
}

body[data-theme="neon"] .feedback-choice[data-feedback="didnt-click"] {
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.08);
    color: #f4b2b2;
    border-color: rgba(255, 107, 107, 0.18);
}

body[data-theme="neon"] .feedback-choice[data-feedback="enjoyed"] {
    border-radius: 8px;
    background: rgba(200, 242, 107, 0.08);
    color: #d9ff8f;
    border-color: rgba(200, 242, 107, 0.2);
}

body[data-theme="neon"] .feedback-choice[data-feedback="didnt-click"]:hover {
    background: rgba(255, 107, 107, 0.13);
}

body[data-theme="neon"] .feedback-choice[data-feedback="enjoyed"]:hover {
    background: rgba(200, 242, 107, 0.13);
}

body[data-theme="neon"] #nextChatButton,
body[data-theme="neon"] #blockUserButton {
    border-radius: 8px;
}

body[data-theme="neon"] .ended-chat-actions #backToLobbyButton,
body[data-theme="neon"] .ended-chat-actions #blockUserButton {
    border: 1px solid rgba(200, 242, 107, 0.18);
}

body[data-theme="neon"] .ended-chat-actions #blockUserButton {
    color: #ffb4b4;
    border-color: rgba(255, 107, 107, 0.2);
}

body[data-theme="neon"] .ended-chat-actions > .btn-secondary + .btn-secondary,
body[data-theme="neon"] .feedback-tags button + button {
    border-left: 1px solid rgba(200, 242, 107, 0.18);
}

body[data-theme="neon"] #activeChatControls.end-button-in-composer .composer-end-btn {
    order: 0;
    margin-right: 2px;
    height: 36px;
    min-height: 36px;
    width: 56px;
    min-width: 56px;
    border: 1px solid rgba(200, 242, 107, 0.18);
    background: rgba(200, 242, 107, 0.045);
    color: rgba(232, 237, 232, 0.78);
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(200, 242, 107, 0.018);
}

body[data-theme="neon"] #activeChatControls.end-button-in-composer .composer-end-btn:hover {
    border-color: rgba(200, 242, 107, 0.28);
    background: rgba(200, 242, 107, 0.075);
    color: #d9ff8f;
}

body[data-theme="neon"] #activeChatControls.end-button-in-composer #messageInput {
    order: 2;
}

body[data-theme="neon"] #activeChatControls.end-button-in-composer .invite-wrap {
    order: 3;
}
/* Neon-only matchmaking loader */
body[data-theme="neon"] .loading-overlay {
    background: rgba(2, 8, 6, 0.92);
    backdrop-filter: blur(8px);
}

body[data-theme="neon"] .loading-content {
    width: min(500px, calc(100vw - 20px));
    min-height: auto;
    padding: 36px 32px 30px;
    border: 1px solid rgba(195, 255, 104, 0.72);
    border-radius: 8px;
    background: rgba(5, 18, 14, 0.86);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55), 0 0 42px rgba(195, 255, 104, 0.12);
}

body[data-theme="neon"] .loader {
    position: relative;
    --scan-travel: 50px;
    width: 190px;
    height: 64px;
    margin: 0 auto 28px;
    border: 1px solid rgba(195, 255, 104, 0.34);
    border-radius: 999px;
    background:
        radial-gradient(circle at center, rgba(242, 255, 154, 0.44), transparent 64%),
        linear-gradient(90deg, transparent, rgba(195, 255, 104, 0.18), transparent) 50% 50% / calc(100% - 36px) 1px no-repeat,
        repeating-linear-gradient(90deg, transparent 0 22px, rgba(195, 255, 104, 0.08) 23px 24px),
        radial-gradient(ellipse at center, rgba(195, 255, 104, 0.13), transparent 56%);
    background-size: 0 0, auto, 64px 100%, auto;
    background-position: center, center, 0 0, center;
    background-repeat: no-repeat, no-repeat, repeat, no-repeat;
    box-shadow: 0 0 14px rgba(195, 255, 104, 0.12), inset 0 0 0 1px rgba(195, 255, 104, 0.08);
    overflow: hidden;
    animation: neonScopeScan 2.4s linear infinite;
}

body[data-theme="neon"] .loader::before,
body[data-theme="neon"] .loader::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: neonMatchIn 1.85s cubic-bezier(0.42, 0, 0.18, 1) infinite;
}

body[data-theme="neon"] .loader::before {
    left: 40px;
    --scan-move: var(--scan-travel);
    z-index: 2;
    background: #d6ff5f;
    box-shadow:
        0 0 11px rgba(214, 255, 95, 0.72),
        -10px 0 8px rgba(214, 255, 95, 0.2);
}

body[data-theme="neon"] .loader::after {
    left: calc(100% - 48px);
    --scan-move: calc(var(--scan-travel) * -1);
    z-index: 1;
    background: #8fffd2;
    box-shadow:
        0 0 11px rgba(143, 255, 210, 0.64),
        10px 0 8px rgba(143, 255, 210, 0.18);
}

@keyframes neonMatchIn {
    0% { opacity: 0; transform: translate(0, -50%) scale(0.72); }
    16% { opacity: 1; }
    68% { opacity: 1; transform: translate(var(--scan-move), -50%) scale(1); }
    84% { opacity: 1; transform: translate(var(--scan-move), -50%) scale(1.25); }
    100% { opacity: 0; transform: translate(var(--scan-move), -50%) scale(0.72); }
}

@keyframes neonTerminalStatus {
    0%, 32% { content: "scanning active users"; }
    33%, 65% { content: "checking availability"; }
    66%, 100% { content: "syncing room"; }
}

@keyframes neonScopeScan {
    0% {
        background-size: 0 0, auto, 64px 100%, auto;
        background-position: center, center, -64px 0, center;
        border-color: rgba(195, 255, 104, 0.24);
        box-shadow: 0 0 10px rgba(195, 255, 104, 0.08), inset 0 0 0 1px rgba(195, 255, 104, 0.06);
    }
    66% {
        background-size: 0 0, auto, 64px 100%, auto;
        border-color: rgba(195, 255, 104, 0.32);
    }
    76% {
        background-size: 36px 36px, auto, 64px 100%, auto;
        border-color: rgba(195, 255, 104, 0.62);
        box-shadow: 0 0 20px rgba(195, 255, 104, 0.22), inset 0 0 12px rgba(195, 255, 104, 0.08);
    }
    86% {
        background-size: 18px 18px, auto, 64px 100%, auto;
        border-color: rgba(195, 255, 104, 0.44);
    }
    100% {
        background-size: 0 0, auto, 64px 100%, auto;
        background-position: center, center, 64px 0, center;
        border-color: rgba(195, 255, 104, 0.24);
        box-shadow: 0 0 10px rgba(195, 255, 104, 0.08), inset 0 0 0 1px rgba(195, 255, 104, 0.06);
    }
}

body[data-theme="neon"] .loading-ad-container {
    position: relative;
    min-height: 132px;
    border: 1px solid rgba(180, 255, 221, 0.24);
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.14);
    box-shadow: none;
}

body[data-theme="neon"] .loading-ad-container::before {
    content: "scanning active users";
    position: absolute;
    left: 0;
    right: 0;
    top: -30px;
    color: rgba(195, 255, 104, 0.68);
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
    animation: neonTerminalStatus 4.8s steps(1, end) infinite;
}

@media (max-width: 520px) {
    body[data-theme="neon"] .loader {
        --scan-travel: 38px;
        width: 166px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body[data-theme="neon"] .loader,
    body[data-theme="neon"] .loader::before,
    body[data-theme="neon"] .loader::after {
        animation: none;
        opacity: 1;
    }
}
