:root {
    --bg: #0a0a0c;
    --panel: #141416;
    --muted: #8e9199;
    --accent: #4a4d54;
    --accent-active: #35363b;
    --green: #2fb56b;
    --orange: #ff9b2e;
    --border: rgba(255,255,255,0.06);
    --card-shadow: 0 10px 28px rgba(0,0,0,0.55);
    font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
}

html,body {
    height: 100%;
    margin: 0;
    background: radial-gradient(ellipse at 50% -20%, rgba(255,255,255,0.03), transparent 55%), var(--bg);
    color: #ececef;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-wrap {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 16px;
    box-sizing: border-box;
}

.app {
    width: 1090px;
    max-width: calc(100% - 32px);
    margin: 28px auto;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.panel {
    background: linear-gradient(180deg, rgba(24,24,27,0.96), rgba(14,14,16,0.98));
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    padding: 14px;
}

.left {
    width: 310px;
}

.left .head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #d4d6db;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}

.modes-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    cursor: pointer;
    transition: color .15s, background .15s, transform .12s;
}

.modes-refresh-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.modes-refresh-btn.is-spinning i {
    animation: modesRefreshSpin .65s linear;
}

@keyframes modesRefreshSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mode-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mode {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, transform .06s;
    background: rgba(255,255,255,0.01);
}

.mode:hover {
    background: rgba(255,255,255,0.03);
    transform: translateY(-1px);
}

.mode.active {
    background: linear-gradient(180deg, #3a3b40, #2e2f34);
    color: white;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 14px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.07);
}

.mode.active .count {
    color: rgba(255,255,255,0.82);
}

.mode .count {
    color: var(--muted);
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.center {
    width: 480px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-legal {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 4px 0 2px;
    margin-top: 2px;
}

.menu-legal__sep {
    color: var(--muted);
    font-size: 13px;
    user-select: none;
}

.menu-legal__link {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.menu-legal__link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* —— Menu navigation —— */
.menu-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    background: linear-gradient(180deg, #141418 0%, #101012 100%);
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.menu-nav__tabs,
.menu-nav__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.menu-nav__divider,
.top-icons__sep {
    width: 1px;
    align-self: stretch;
    min-height: 36px;
    margin: 2px 4px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    flex-shrink: 0;
}

.menu-nav__item.icon-btn {
    width: auto;
    min-width: 52px;
    height: auto;
    min-height: 44px;
    flex-direction: column;
    gap: 3px;
    padding: 6px 10px 5px;
    border: 1px solid transparent;
    background: transparent;
}

.menu-nav__icon {
    font-size: 15px;
    line-height: 1;
}

.menu-nav__label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.1;
    opacity: 0.88;
}

.menu-nav__item.icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.menu-nav__item.icon-btn.active {
    background: rgba(125, 211, 252, 0.1);
    border-color: rgba(125, 211, 252, 0.28);
    color: #eaf6ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.menu-nav__item.icon-btn.active .menu-nav__label {
    opacity: 1;
    color: #9ec9ff;
}

.top-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.icon-btn--action {
    color: rgba(200, 210, 230, 0.85);
}

.icon-btn--action:hover {
    color: #fff;
    background: rgba(125, 211, 252, 0.08);
}

.icon-btn--store:hover {
    color: #fde68a;
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.25);
}

.icon-btn {
    width: 44px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.1s;
    border: none;
    font: inherit;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.03);
    color: #fff;
    transform: translateY(-2px);
}

.icon-btn.active {
    background: rgba(255,255,255,0.08);
    color: #f0f0f2;
    border: 1px solid rgba(255,255,255,0.1);
}

/* —— Play card —— */
.play-hero {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.play-hero__logo {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #f8fafc 0%, #9ec9ff 55%, #7dd3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.play-hero__tagline {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.input-row--nick {
    margin-bottom: 4px;
}

.actions--play {
    margin-top: 12px;
}

.btn-play--primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    font-size: 15px;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #f0fdf4;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 6px 20px rgba(34, 197, 94, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-play--primary:hover {
    background: linear-gradient(180deg, #34d399 0%, #22c55e 100%);
    color: #fff;
}

.btn-short--ghost {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: auto;
    min-width: 72px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-short__label {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.85;
}

.play-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.telegram-link {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, rgba(34, 158, 217, 0.18) 0%, rgba(14, 116, 178, 0.1) 55%, rgba(10, 12, 16, 0.35) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 24px rgba(34, 158, 217, 0.12);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.telegram-link:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.55);
    box-shadow: 0 12px 28px rgba(34, 158, 217, 0.22);
    background: linear-gradient(135deg, rgba(34, 158, 217, 0.28) 0%, rgba(14, 116, 178, 0.16) 55%, rgba(10, 12, 16, 0.4) 100%);
}

.telegram-link:active {
    transform: translateY(0);
}

.telegram-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
    color: #ffffff;
    background: linear-gradient(145deg, #38bdf8 0%, #229ed9 55%, #0e7490 100%);
    box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
}

.telegram-link__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.telegram-link__title {
    font-size: 14px;
    font-weight: 700;
    color: #e8f6ff;
    letter-spacing: 0.01em;
}

.telegram-link__hint {
    font-size: 11px;
    color: rgba(186, 230, 253, 0.78);
    line-height: 1.35;
}

.telegram-link__handle {
    font-size: 11px;
    font-weight: 700;
    color: #7dd3fc;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(14, 116, 178, 0.28);
    border: 1px solid rgba(125, 211, 252, 0.25);
}

.telegram-link__arrow {
    font-size: 12px;
    color: rgba(186, 230, 253, 0.65);
}

.telegram-link--panel {
    margin-top: 0;
    width: 100%;
    grid-template-columns: 38px 1fr;
    grid-template-rows: auto auto;
    gap: 8px 10px;
    padding: 10px 12px;
}

.telegram-link--panel .telegram-link__icon {
    width: 38px;
    height: 38px;
    font-size: 19px;
    grid-row: 1 / 3;
    align-self: center;
}

.telegram-link--panel .telegram-link__body {
    grid-column: 2;
    grid-row: 1;
}

.telegram-link--panel .telegram-link__title {
    font-size: 13px;
}

.telegram-link--panel .telegram-link__hint {
    font-size: 10px;
}

.telegram-link--panel .telegram-link__handle {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    font-size: 10px;
    padding: 3px 7px;
}

.telegram-link--panel .telegram-link__arrow {
    display: none;
}

.play-tip {
    font-size: 11px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.play-tip__key,
.play-tips kbd {
    display: inline-block;
    min-width: 1.4em;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d4e4ff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* —— Settings accordion —— */
.settings-accordion {
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.settings-accordion__summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #e6edf7;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.12s;
}

.settings-accordion__summary::-webkit-details-marker {
    display: none;
}

.settings-accordion__summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 2px solid rgba(255, 255, 255, 0.35);
    border-bottom: 2px solid rgba(255, 255, 255, 0.35);
    transform: rotate(45deg);
    transition: transform 0.15s;
}

.settings-accordion[open] > .settings-accordion__summary::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.settings-accordion__summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.settings-accordion__summary i {
    opacity: 0.75;
    width: 1.1em;
    text-align: center;
}

.settings-accordion__body {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-accordion__body .settings-subgroup__desc {
    margin-top: 10px;
}

.multibox-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.multibox-color-row__label {
    font-size: 13px;
    color: var(--muted);
}

.multibox-color-row__input {
    width: 48px;
    height: 32px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

/* —— Right panel shortcuts —— */
.right-panel__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.right-panel__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: var(--muted);
}

.right-panel__footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.right-panel__server strong {
    color: #9ec9ff;
    font-weight: 700;
}

.panel.right {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.panel.right .auth-panel--sidebar {
    flex: 1;
}

.card--play.active {
    animation: menu-card-in 0.2s ease-out;
}

@keyframes menu-card-in {
    from {
        opacity: 0.6;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .menu-nav__label {
        display: none;
    }

    .menu-nav__item.icon-btn {
        min-width: 44px;
        padding: 8px;
    }
}

.menu.menu-cards {
    margin-top: 10px;
}

.card {
    display: none;
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(16,16,18,0.95), rgba(12,12,14,0.92));
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.card.active {
    display: block;
}

.menu-panel-head {
    margin-bottom: 12px;
}

.menu-panel-head__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #eaf0ff;
}

.menu-panel-head__hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.menu-hint__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.menu-settings-scroll {
    max-height: min(62vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.menu-settings-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.settings-subgroup__desc {
    margin: -6px 0 10px;
    font-size: 12px;
    line-height: 1.4;
}

.settings-subgroup__title i {
    margin-right: 6px;
    opacity: 0.75;
    font-size: 0.92em;
}

.menu-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-quick-actions__btn {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #eaf0ff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.menu-quick-actions__btn i {
    font-size: 20px;
    color: #9ec9ff;
}

.menu-quick-actions__btn small {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    text-align: right;
}

.menu-quick-actions__btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(125, 211, 252, 0.35);
    transform: translateY(-1px);
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.settings-subgroup {
    margin-top: 18px;
    padding: 14px 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#settings > .settings-subgroup:first-child {
    margin-top: 0;
}

.settings-subgroup__title {
    font-size: 15px;
    font-weight: 600;
    color: #e6edf7;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-subgroup .toggle-group {
    gap: 14px;
}

.settings-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 2px;
}

.settings-color-row .label-text {
    flex: 1;
    min-width: 0;
}

.settings-color-row input[type="color"] {
    flex-shrink: 0;
    width: 48px;
    height: 30px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.settings-color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.settings-color-row input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    justify-content: space-between;
}

.toggle input {
    display: none;
}

.slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: #2b2b2b;
    border-radius: 50px;
    transition: 0.3s;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.4);
}

.slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 0px;
    left: -3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .slider {
    background: #5a5d64;
}

.toggle input:checked + .slider::before {
    transform: translateX(24px);
}

.label-text {
    font-size: 15px;
    color: #eaeaea;
}

.title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.title--brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    text-align: center;
}

.title--brand small {
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.02em;
}

.input-row--nick .input--full {
    flex: 1;
    width: 100%;
}

.input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    background: #0e0e10;
    border: 1px solid rgba(255,255,255,0.05);
}

.input input {
    flex: 1;
    min-width: 0;
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #eaf0ff;
    font-size: 14px;
    caret-color: #eaf0ff;
}

.input input::selection {
    background: rgba(125, 249, 255, 0.35);
    color: #fff;
}

.input input:-webkit-autofill,
.input input:-webkit-autofill:hover,
.input input:-webkit-autofill:focus,
.input input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0e0e10 inset !important;
    box-shadow: 0 0 0 1000px #0e0e10 inset !important;
    -webkit-text-fill-color: #eaf0ff !important;
    caret-color: #eaf0ff;
    transition: background-color 99999s ease-out 0s;
}

.small {
    width: 110px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    align-items: stretch;
}

.btn-play {
    flex: 1;
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.08));
    color: #ececef;
    border: none;
    padding: 12px 14px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
}

.btn-short {
    width: 54px;
    background: rgba(255,255,255,0.08);
    color: #ececef;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-play:hover,
.btn-short:hover {
    background: rgba(255,255,255,0.12);
}

.btn-play:active,
.btn-short:active {
    transform: translateY(1px);
}

.right {
    width: 310px;
}

.info {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}

.footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.shop-cosmetics__hint {
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 14px;
}

.shop-cosmetics__hint code {
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
}

.shop-cosmetics__label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.shop-cosmetics__input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0b0f15;
    color: #eaf0ff;
    font-size: 14px;
    margin-bottom: 10px;
}

.shop-cosmetics__input:focus {
    outline: none;
    border-color: rgba(31, 111, 235, 0.45);
}

.shop-cosmetics__actions {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.shop-cosmetics__actions .btn-play {
    flex: 1;
    padding: 10px 14px;
}

.shop-cosmetics__actions .btn-short {
    width: auto;
    min-width: 48px;
    padding: 10px 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shop-cosmetics--nick-color {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-cosmetics__actions--nick-color {
    align-items: center;
}

.shop-nick-color-input {
    width: 52px;
    height: 40px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: #0b0f15;
    cursor: pointer;
    flex-shrink: 0;
}

.shop-nick-color-input::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.shop-nick-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.shop-imgur-preview-wrap {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.shop-imgur-preview {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #0b0f15 center / cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.shop-imgur-msg {
    margin: 10px 0 0;
    font-size: 13px;
    min-height: 1.2em;
}

.hotkeys-wrap {
    color: #eaf0ff;
}

.hotkeys {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hotkeys--compact {
    gap: 8px;
}

.hotkeys--compact .hotkeys__line {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hotkeys--compact .hotkeys__line:last-child {
    border-bottom: none;
}

.hotkeys__group {
    display: inline-flex;
    gap: 6px;
    flex-shrink: 0;
}

.hotkeys__line {
    display: flex;
    justify-content: space-between;
}

.hotkeys__btn {
    width: 80px;
    background-color: #161a1f;
    color: var(--muted);;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 0;
    cursor: pointer;
    outline: none;
}

.hotkeys__btn.active {
    border: 1px solid var(--accent);
}

/* Rcon / админ: по центру сверху (top-center), моноширинный вывод как в консоли */
.admin-toast-root {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    pointer-events: none;
    box-sizing: border-box;
}

.admin-toast {
    pointer-events: auto;
    margin: 0;
    padding: 14px 16px;
    border-radius: 10px;
    font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    white-space: pre;
    tab-size: 4;
    -moz-tab-size: 4;
    word-break: normal;
    overflow: auto;
    max-width: min(920px, calc(100vw - 32px));
    max-height: min(78vh, 640px);
}

.admin-toast--info {
    background: rgba(18, 42, 68, 0.96);
    border: 1px solid rgba(80, 160, 255, 0.35);
    color: #e8f2ff;
}

.admin-toast--warn {
    background: rgba(52, 36, 18, 0.96);
    border: 1px solid rgba(255, 170, 72, 0.45);
    color: #fff3e0;
}

/* Фон меню до входа в игру — перекрывает канвас (топ, карта, чат) */
#canvas {
    z-index: 0;
}

body.menu-open #canvas {
    visibility: hidden;
}

body.pre-game-active {
    background: #08080a;
}

.pre-game-backdrop {
    position: fixed;
    inset: 0;
    z-index: 95;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.pre-game-backdrop--visible {
    opacity: 1;
    visibility: visible;
}

.pre-game-backdrop__layer {
    position: absolute;
    inset: 0;
}

.pre-game-backdrop__layer--base {
    background:
        radial-gradient(ellipse 70% 55% at 15% 25%, rgba(125, 211, 252, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 75%, rgba(168, 85, 247, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(47, 181, 107, 0.06), transparent 45%),
        linear-gradient(165deg, #0a0b10 0%, #06070a 45%, #0a0a0e 100%);
}

.pre-game-backdrop__layer--glow {
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), transparent 42%);
    animation: preGameGlowPulse 8s ease-in-out infinite alternate;
}

.pre-game-backdrop__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.35;
    will-change: transform;
}

.pre-game-backdrop__orb--1 {
    width: 280px;
    height: 280px;
    left: 8%;
    top: 18%;
    background: rgba(125, 211, 252, 0.2);
    animation: preGameOrb1 22s ease-in-out infinite alternate;
}

.pre-game-backdrop__orb--2 {
    width: 340px;
    height: 340px;
    right: 5%;
    bottom: 12%;
    background: rgba(255, 155, 46, 0.14);
    animation: preGameOrb2 26s ease-in-out infinite alternate;
}

.pre-game-backdrop__orb--3 {
    width: 200px;
    height: 200px;
    left: 42%;
    bottom: 28%;
    background: rgba(47, 181, 107, 0.16);
    animation: preGameOrb3 18s ease-in-out infinite alternate;
}

.pre-game-backdrop__cells {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.pre-game-cell {
    position: absolute;
    border-radius: 50%;
    opacity: 0.55;
    filter: blur(0.5px);
    animation: preGameCellFloat 14s ease-in-out infinite;
}

.pre-game-cell--1 { width: 42px; height: 42px; left: 8%; top: 22%; background: #ff6b6b; animation-duration: 16s; }
.pre-game-cell--2 { width: 28px; height: 28px; left: 22%; top: 68%; background: #4ecdc4; animation-delay: -2s; animation-duration: 18s; }
.pre-game-cell--3 { width: 56px; height: 56px; left: 78%; top: 18%; background: #ffe66d; animation-delay: -4s; }
.pre-game-cell--4 { width: 22px; height: 22px; left: 65%; top: 72%; background: #a78bfa; animation-delay: -1s; animation-duration: 12s; }
.pre-game-cell--5 { width: 34px; height: 34px; left: 45%; top: 12%; background: #2fb56b; animation-delay: -6s; }
.pre-game-cell--6 { width: 48px; height: 48px; left: 88%; top: 48%; background: #ff9b2e; animation-delay: -3s; animation-duration: 20s; }
.pre-game-cell--7 { width: 18px; height: 18px; left: 12%; top: 48%; background: #7df9ff; animation-delay: -5s; }
.pre-game-cell--8 { width: 38px; height: 38px; left: 35%; top: 38%; background: #ff6b9d; animation-delay: -7s; animation-duration: 15s; }
.pre-game-cell--9 { width: 26px; height: 26px; left: 55%; top: 58%; background: #95e1d3; animation-delay: -2.5s; }
.pre-game-cell--10 { width: 52px; height: 52px; left: 72%; top: 82%; background: #f38181; animation-delay: -8s; animation-duration: 17s; }
.pre-game-cell--11 { width: 20px; height: 20px; left: 5%; top: 82%; background: #aa96da; animation-delay: -4.5s; }
.pre-game-cell--12 { width: 30px; height: 30px; left: 92%; top: 28%; background: #fcbad3; animation-delay: -1.5s; animation-duration: 13s; }

.pre-game-backdrop__grid {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.35;
    animation: preGameGridDrift 40s linear infinite;
}

@keyframes preGameGlowPulse {
    from { opacity: 0.4; transform: scale(1); }
    to { opacity: 0.75; transform: scale(1.08); }
}

@keyframes preGameOrb1 {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(60px, 40px) scale(1.12); }
}

@keyframes preGameOrb2 {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-50px, -30px) scale(1.1); }
}

@keyframes preGameOrb3 {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(30px, -45px) scale(1.15); }
}

@keyframes preGameGridDrift {
    from { transform: translate(0, 0); }
    to { transform: translate(48px, 48px); }
}

@keyframes preGameCellFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.45;
    }
    25% {
        transform: translate(18px, -28px) scale(1.08);
        opacity: 0.7;
    }
    50% {
        transform: translate(-12px, 22px) scale(0.92);
        opacity: 0.55;
    }
    75% {
        transform: translate(24px, 14px) scale(1.04);
        opacity: 0.65;
    }
}

.right-panel__title {
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 10px;
    letter-spacing: 0.02em;
}

.right-panel__info {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-panel {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-panel--sidebar {
    margin-bottom: 0;
}

.auth-panel__offline code {
    font-size: 11px;
    opacity: 0.85;
}

.auth-panel__hint {
    font-size: 13px;
    margin: 0 0 10px;
    line-height: 1.35;
}

.auth-panel__google {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.auth-panel__signed-in {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-panel__avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.auth-panel__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-panel__name {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-panel__email {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-panel__set-nick {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-panel__nick-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.auth-panel__nick-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    color: inherit;
    font: inherit;
}

.auth-panel__nick-save {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
}

.kick-notice {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(232, 93, 93, 0.45);
    background: rgba(232, 93, 93, 0.12);
    color: #f8d4d4;
    font-size: 14px;
}

.kick-notice strong {
    color: #ff9b9b;
    font-size: 15px;
}

.kick-notice__hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width:1100px) {
    .app {
        flex-direction: column;
        align-items: center;
    }

    .left,.center,.right {
        width: 100%;
    }

    .center {
        order: 2;
    }

    .right {
        order: 3;
    }

    .left {
        order: 1;
    }
}