/* ===== Main layout: left sidebar | center | right sidebar ===== */
.launcher-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.launcher-layout > * { min-width: 0; }
.launcher-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.launcher-header .hd-tip { margin-left: auto; }

/* ===== Hologram cube ===== */
.cube-scene {
    width: 84px; height: 84px; flex-shrink: 0;
    perspective: 600px; position: relative;
    filter: drop-shadow(0 0 16px rgba(124,58,237,0.35));
}
.cube {
    position: absolute; inset: 0;
    transform-style: preserve-3d;
    animation: cube-spin 14s infinite linear;
}
.cube__face {
    position: absolute; width: 84px; height: 84px;
    border: 1.5px solid rgba(124,58,237,0.7);
    background: rgba(124,58,237,0.10);
    box-shadow: inset 0 0 26px rgba(124,58,237,0.30);
    backdrop-filter: blur(2px);
    border-radius: 6px;
}
.cube__face--front  { transform: translateZ(42px); }
.cube__face--back   { transform: rotateY(180deg) translateZ(42px); }
.cube__face--right  { transform: rotateY(90deg) translateZ(42px); }
.cube__face--left   { transform: rotateY(-90deg) translateZ(42px); }
.cube__face--top    { transform: rotateX(90deg) translateZ(42px); }
.cube__face--bottom { transform: rotateX(-90deg) translateZ(42px); }
@keyframes cube-spin {
    from { transform: rotateX(-22deg) rotateY(0deg); }
    to   { transform: rotateX(-22deg) rotateY(360deg); }
}

/* ===== Player profile header ===== */
.player-head {
    display: flex; align-items: center; gap: 18px;
    padding-bottom: 16px; border-bottom: 1px solid var(--glass-border);
}
.nick-block { min-width: 0; }
.nick-row { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.launcher-nick { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: 0.2px; }
.launcher-nick-sub { color: #fff; font-weight: 700; font-size: 14px; margin-top: 4px; }
.launcher-nick-sub .muted { color: var(--text-muted); font-weight: 500; }

/* editable nickname */
.nick-input {
    width: 210px; max-width: 100%;
    padding: 7px 12px; margin-left: 4px;
    font-size: 14px; font-weight: 700;
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.nick-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,0.22); }
.nick-input.bad { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,0.18); }

/* online dot + tooltip */
.online-dot {
    width: 13px; height: 13px; border-radius: 50%;
    background: var(--green); box-shadow: 0 0 10px rgba(22,163,74,0.8);
    position: relative; cursor: default;
}
.online-dot .tip {
    visibility: hidden; opacity: 0;
    position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px);
    width: max-content; max-width: 240px; padding: 8px 12px;
    background: #16192b; border: 1px solid var(--glass-border);
    border-radius: 8px; font-size: 12px; color: var(--text-secondary);
    white-space: nowrap; transition: all 0.15s ease; z-index: 60;
}
.online-dot:hover .tip { visibility: visible; opacity: 1; transform: translate(-50%, 0); }

/* ===== Server status card ===== */
.server-card {
    display: grid; grid-template-columns: 1fr repeat(4, auto); gap: 14px;
    align-items: center;
    margin: 16px 0 18px; padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
}
.srv-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.srv-name .live { font-size: 10px; font-weight: 800; color: var(--green); letter-spacing: 1px; }
.srv-stat { text-align: center; min-width: 60px; }
.srv-stat .num { font-size: 20px; font-weight: 800; line-height: 1.1; color: var(--text-primary); }
.srv-stat .lab { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); }
.stable-pill {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 700; color: var(--green);
    padding: 7px 12px; border-radius: 40px;
    background: rgba(22,163,74,0.12); border: 1px solid rgba(22,163,74,0.3);
}
.stable-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(22,163,74,0.8); animation: pulse 2.2s infinite; }
.stable-pill.warn { color: var(--orange); border-color: rgba(234,88,12,0.3); background: rgba(234,88,12,0.12); }
.stable-pill.warn .dot { background: var(--orange); box-shadow: 0 0 8px rgba(234,88,12,0.8); }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

/* ===== Build carousel: horizontal tiles, 2 per view, full-height ===== */
.builds-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.builds-head h3 { font-size: 15px; }
.builds-nav { display: flex; gap: 10px; }
.car-btn {
    width: 38px; height: 38px; border-radius: 12px;
    border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05);
    color: var(--text-secondary); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.car-btn svg { display: block; }
.car-btn:hover { color: #fff; border-color: var(--accent); background: rgba(124,58,237,0.18); box-shadow: 0 4px 16px rgba(124,58,237,0.35); }
.car-track {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 6px; scrollbar-width: none; align-items: stretch;
    flex: 1 1 auto; min-height: 0;
}
.car-track::-webkit-scrollbar { display: none; }
.car-track > * { scroll-snap-align: start; }

.build-card {
    flex: 0 0 250px; scroll-snap-align: start;
    background: rgba(20,20,30,0.7);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden; cursor: pointer;
    transition: all var(--transition); position: relative;
    display: flex; flex-direction: column;
}
.build-card:hover { border-color: var(--glass-border-hover); }
.build-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent), 0 12px 34px rgba(124,58,237,0.28); }
.build-card-img {
    height: 180px; display: flex; align-items: center; justify-content: center; font-size: 54px;
    flex-shrink: 0; position: relative;
}
.build-card-img.has-img { background-size: cover; background-position: center; font-size: 0; }

/* ===== Горизонтальная карточка сборки лаунчера ===== */
#carTrack .build-card {
    flex: 0 0 calc(50% - 8px); flex-direction: row; align-items: stretch; gap: 0;
    border-radius: 18px; height: auto;
}
#carTrack .build-card:hover,
#carTrack .build-card:not(.selected):hover { transform: none; }
#carTrack .build-card:hover { border-color: var(--glass-border-hover); box-shadow: 0 14px 34px rgba(0,0,0,0.4); }
#carTrack .build-card.selected { border-color: var(--accent); box-shadow: 0 14px 34px rgba(0,0,0,0.45); }
.bc-media {
    flex: 0 0 150px; position: relative; overflow: hidden; display: block;
    border-right: 1px solid var(--glass-border);
}
.bc-media .build-card-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    font-size: 40px; border-radius: 0;
}
.bc-media .build-card-img.has-img { font-size: 0; }
.bc-ver {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    font-size: 11px; font-weight: 800; letter-spacing: 1px; color: #fff;
    background: rgba(18,12,34,0.6); padding: 3px 9px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(3px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.bc-body {
    flex: 1 1 auto; min-width: 0; padding: 16px 18px;
    display: flex; flex-direction: column; gap: 8px;
}
.bc-title { font-size: 18px; font-weight: 800; line-height: 1.2; }
.bc-desc {
    font-size: 12.5px; color: var(--text-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bc-meta {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 2px;
}
.bc-chip {
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    padding: 3px 8px; border-radius: 8px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
}
.bc-stab { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; margin-left: auto; }
.bc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(22,163,74,0.8); }
/* Constellation fallback (no screenshot) */
.bi-fallback { position: relative; overflow: hidden; }
.bi-fallback::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.38)); pointer-events: none; }
.bi-orion { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(255,255,255,0.35)); }
.bi-orion circle { animation: bi-twinkle 2.6s ease-in-out infinite; }
.bi-orion circle:nth-child(2n) { animation-delay: .7s; }
.bi-orion circle:nth-child(3n) { animation-delay: 1.3s; }
@keyframes bi-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.card-play {
    width: 100%; padding: 11px; border: none; cursor: pointer;
    font-size: 14px; font-weight: 800; letter-spacing: 1px; color: #fff;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, #3F00FF, #6A00FF);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 4px 16px rgba(63,0,255,0.35);
    transition: all var(--transition); margin-top: auto;
}
.build-card:not(.selected) .card-play { opacity: 0.65; }
.build-card:hover .card-play { opacity: 1; }
.card-play:hover { filter: brightness(1.12); }
#carTrack .card-play { border-radius: 12px; letter-spacing: 1px; }
.build-empty { padding: 40px 18px; text-align: center; color: var(--text-muted); flex: 1; }

/* ===== Center card ===== */
.launcher-card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 860px; }
.launcher-card::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(120% 70% at 50% -6%, rgba(124,58,237,0.16), transparent 62%),
        linear-gradient(180deg, rgba(124,58,237,0.10), transparent 26%);
    pointer-events: none;
}
.launcher-inner { position: relative; padding: 26px 24px; }

/* main CTA */
.launch-actions { margin-top: auto; padding: 0 24px 6px; }
.launcher-col .main-cta { margin-top: 24px; }
.main-cta {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; margin-top: 20px;
    padding: 20px 24px; border: none; cursor: pointer;
    font-size: 19px; font-weight: 800; letter-spacing: 2px; color: #fff;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #3F00FF, #6A00FF);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 10px 34px rgba(63,0,255,0.5);
    transition: all var(--transition);
    position: relative; overflow: hidden;
}
.main-cta::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
}
.main-cta:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 14px 44px rgba(63,0,255,0.65); }
.main-cta:disabled, .main-cta.disabled-cta { opacity: .6; cursor: not-allowed; transform: none; }
.main-cta.shine::after { animation: shine 1.8s infinite; }
@keyframes shine { 0%{ transform: translateX(-100%);} 60%,100%{ transform: translateX(100%);} }

.launcher-run-status { min-height: 22px; margin: 14px 0 8px; font-size: 14px; color: var(--text-secondary); text-align: center; }
.launcher-progress-wrap { display: none; height: 8px; background: rgba(255,255,255,0.06); border-radius: 20px; overflow: hidden; margin-bottom: 8px; }
.launcher-progress { height: 100%; width: 0%; background: linear-gradient(90deg, #6A00FF, #3F00FF, #06b6d4); background-size: 200% 100%; animation: bar-shimmer 2s infinite; border-radius: 20px; transition: width 0.3s ease; }
@keyframes bar-shimmer { 0%{background-position:0% 0;} 100%{background-position:200% 0;} }
.launcher-log { display: none; text-align: left; margin-top: 12px; padding: 12px 16px; background: rgba(0,0,0,0.3); border-radius: var(--radius-sm); font-size: 12px; color: var(--text-muted); font-family: monospace; max-height: 120px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
/* Модалка «Агент не найден» */
.modal-overlay-agent {
    display: none; position: fixed; inset: 0; z-index: 3000;
    background: rgba(5,6,12,.72); backdrop-filter: blur(6px);
    align-items: center; justify-content: center; padding: 20px;
}
.agent-modal {
    position: relative; width: 100%; max-width: 470px;
    background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%), var(--bg-secondary);
    border: 1px solid rgba(245,158,11,.32);
    border-radius: 18px; padding: 26px 26px 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.6);
    text-align: left; animation: amUp .28s ease;
}
@keyframes amUp { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.agent-modal h4 { margin-bottom: 8px; color: #fbbf24; font-size: 15px; }
.agent-modal > p { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.55; }
.am-close {
    position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
    border-radius: 9px; border: 1px solid var(--border); background: rgba(255,255,255,.04);
    color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all .15s;
}
.am-close:hover { color: #fff; background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.4); }
.agent-modal .am-note { margin-top: 12px; font-size: 11.5px; color: var(--text-muted); line-height: 1.55; }
.agent-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 14px; }
.agent-step { background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.agent-step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.agent-step p { font-size: 11px; color: var(--text-muted); margin: 0; }
.agent-modal .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Popup windows (Гильдия / Настройки) ===== */
.popup-overlay {
    position: fixed; inset: 0; z-index: 2900;
    background: rgba(5,6,12,.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s;
}
.popup-overlay.open { opacity: 1; visibility: visible; }
.popup-window {
    position: relative; width: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 42%), var(--bg-secondary);
    border: 1px solid var(--glass-border-hover);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,.65);
    animation: amUp .26s ease;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.popup-window .am-close {
    position: absolute; top: 14px; right: 14px; z-index: 5;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,.05); color: var(--text-muted);
}
.popup-window .am-close:hover { color: #fff; border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.2); }
.popup-body { flex: 1 1 auto; min-height: 0; }
.guild-popup { max-width: 560px; height: 70vh; }
.client-popup { max-width: 520px; }
.client-popup .popup-body { display: flex; }
.client-popup #clientView { width: 100%; }
.guild-popup #guildView { width: 100%; height: 100%; }

/* ===== Hover popup действий в чате ===== */
.chat-msg-hov { cursor: default; position: relative; border-radius: var(--radius-sm); transition: background .15s; }
.chat-msg-hov:hover { background: rgba(124,58,237,.06); }
.hover-pop {
    position: fixed; z-index: 4000; min-width: 210px; max-width: 260px;
    background: var(--bg-secondary); border: 1px solid var(--glass-border-hover);
    border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.55);
    padding: 8px; animation: amUp .16s ease; display: none;
}
.hover-pop-head { font-size: 12px; font-weight: 800; color: var(--text-secondary); padding: 6px 10px 8px; border-bottom: 1px solid var(--glass-border); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hover-pop-act {
    display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
    padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 12.5px;
    color: var(--text-primary); background: transparent; border: none; transition: background .12s;
}
.hover-pop-act:hover { background: rgba(124,58,237,.14); color: #fff; }
.hover-pop-act.hover-pop-danger:hover { background: rgba(239,68,68,.18); }

/* ===== Черный список ===== */
.blacklist-btn {
    margin-left: 6px; width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--glass-border); background: rgba(255,255,255,.05);
    color: var(--text-secondary); cursor: pointer; font-size: 14px; line-height: 1;
    transition: all var(--transition);
}
.blacklist-btn:hover { color: #fff; border-color: var(--accent); background: rgba(124,58,237,.15); }
.blocklist-popup { max-width: 440px; max-height: 70vh; }
.blocklist-head { font-size: 15px; font-weight: 800; padding: 16px 18px; border-bottom: 1px solid var(--glass-border); }
.blocklist-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.blocklist-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); background: rgba(255,255,255,.03); }
.blocklist-av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.blocklist-name { flex: 1; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blocklist-item .side-btn { margin: 0; padding: 6px 10px; font-size: 11.5px; flex-shrink: 0; }

/* ===== Side panels ===== */
.side-card { padding: 16px; }
.chat-stack { display: flex; flex-direction: column; gap: 16px; }
.side-head {
    font-size: 16px; font-weight: 800;
    padding-bottom: 12px; margin-bottom: 14px;
    border-bottom: 1px solid var(--glass-border);
}
.side-item { margin-bottom: 16px; }
.side-item > label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; }
.side-divider { height: 1px; background: var(--glass-border); margin: 16px 0; }

/* left: RAM + agent + settings */
.ram-quick { display: flex; align-items: center; gap: 12px; width: 100%; }
.ram-slider { flex: 1; -webkit-appearance: none; height: 5px; border-radius: 6px; background: rgba(255,255,255,0.12); outline: none; }
.ram-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg,#3F00FF,#6A00FF); cursor: pointer; box-shadow: 0 0 10px rgba(63,0,255,0.6); }
.ram-slider::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: linear-gradient(135deg,#3F00FF,#6A00FF); cursor: pointer; }
.ram-val { font-size: 14px; font-weight: 800; color: var(--text-primary); min-width: 36px; text-align: right; }

.agent-status {
    display: inline-flex; align-items: center; gap: 9px; width: 100%;
    padding: 9px 12px; font-size: 13px; color: var(--text-secondary);
    background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
}
.agent-status .st-shape {
    width: 12px; height: 12px; border-radius: 50%; background: var(--orange); flex-shrink: 0;
    transition: all var(--transition);
}
.agent-status.st-ready .st-shape { background: var(--green); box-shadow: 0 0 10px rgba(22,163,74,0.7); }
.agent-status.st-updating .st-shape { background: var(--orange); border-radius: 3px; animation: pulse 1.4s infinite; }
.agent-status.st-error .st-shape { background: transparent; border: 2px solid var(--red); }
.agent-status.st-error .st-shape::before { content:'✕'; position:relative; top:-3px; left:-1px; color:var(--red); font-size:10px; font-weight:800; }
.agent-status.st-gaming .st-shape { background: var(--green); box-shadow: 0 0 10px rgba(22,163,74,0.7); }

.autostart-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-secondary); cursor: pointer; }
.autostart-row input { width: 17px; height: 17px; accent-color: #6A00FF; }
.side-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 8px; padding: 10px; font-size: 13px; font-weight: 700;
    background: rgba(255,255,255,0.05); color: var(--text-secondary);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    cursor: pointer; transition: all var(--transition);
}
.side-btn:hover { color:#fff; border-color:var(--glass-border-hover); background: var(--bg-card-hover); }
.side-btn.primary { background: linear-gradient(135deg, #3F00FF, #6A00FF); color:#fff; border:none; }
.side-btn.primary:hover { filter: brightness(1.1); }

/* ===== Agent download block (left) ===== */
.agent-side .ag-step { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; margin: 2px 0; }
.agent-side .ag-step b { color: var(--text-secondary); }

/* ===== Right: notifications ===== */
.notices { display: flex; flex-direction: column; gap: 10px; }
.notice {
    padding: 10px 12px; font-size: 12.5px; color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 10px;
}
.notice .nx { flex: 1; }
.notice .t { font-size: 10.5px; color: var(--text-muted); display: block; margin-top: 2px; }
.notice-ico { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; background: rgba(124,58,237,0.14); }
.notice-ico.green { background: rgba(22,163,74,0.14); }
.notice-ico.red { background: rgba(220,38,38,0.14); }

/* ===== Right: mini chat (Discord-like) ===== */
.chat-card { display: flex; flex-direction: column; height: auto; min-height: 0; }
.chat-card-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--glass-border); }
.chat-card-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(22,163,74,0.8); }
.chat-card-head h4 { font-size: 14.5px; }
.chat-card-body { overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; height: 320px; }
.chat-msg { display: flex; gap: 9px; }
.chat-msg .av {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff;
}
.chat-msg .mb { min-width: 0; }
.chat-msg .mb .un { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.chat-msg .mb .time { font-size: 10px; color: var(--text-muted); float: right; margin-left: 8px; }
.chat-msg .mb .tx { font-size: 12.5px; color: var(--text-secondary); word-break: break-word; }
.chat-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 24px 8px; }
.chat-card-input-wrap { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--glass-border); }
.chat-card-input-wrap .input { flex: 1; }
.chat-send {
    width: 42px; height: 42px; border-radius: var(--radius-sm); flex-shrink: 0;
    border: none; cursor: pointer;
    background: linear-gradient(135deg, #3F00FF, #6A00FF); color: #fff; font-size: 16px;
    transition: all var(--transition);
}
.chat-send:hover { filter: brightness(1.12); }
.chat-direct-send { font-size: 11px; color: var(--text-muted); padding: 0 16px 12px; text-align: center; }

.chat-widget { display: none !important; }

/* ===== Mobile CTA bar ===== */
@media (max-width: 1100px) {
    .launcher-layout { grid-template-columns: 1fr; }
    .launcher-card { order: -1; }
    .chat-card-body { height: 260px; }
    .server-card { grid-template-columns: 1fr 1fr; }
    .server-card .srv-name { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .launcher-inner { padding: 20px 16px; }
    .launcher-main-wrap { gap: 8px; }
    .launcher-rail { width: 100%; gap: 12px; padding: 8px 2px 2px; }
    .rail-btn { width: 42px; height: 42px; font-size: 17px; }
    .rail-btn .ct-ico { font-size: 17px; }
    .rail-exit { width: 42px; height: 42px; }
    .rail-exit .ct-ico { font-size: 17px; }
    .rail-exit .ct-ico svg { width: 18px; height: 18px; }
    .rail-btn .ct-ico svg { width: 17px; height: 17px; }
    .guild-popup { height: 85vh; }
    .player-head { flex-direction: column; text-align: center; }
    .nick-row { justify-content: center; }
    .launcher-cols { grid-template-columns: 1fr; gap: 20px; }
    .launcher-col-id { border-left: 0; padding-left: 0; border-top: 1px solid var(--glass-border); padding-top: 20px; }
    .cube-scene { width: 72px; height: 72px; }
    .cube__face { width: 72px; height: 72px; }
    .cube__face--front{transform:translateZ(36px);} .cube__face--back{transform:rotateY(180deg) translateZ(36px);}
    .cube__face--right{transform:rotateY(90deg) translateZ(36px);} .cube__face--left{transform:rotateY(-90deg) translateZ(36px);}
    .cube__face--top{transform:rotateX(90deg) translateZ(36px);} .cube__face--bottom{transform:rotateX(-90deg) translateZ(36px);}
    .launcher-nick { font-size: 26px; }
    .main-cta { font-size: 19px; border-radius: var(--radius-sm); }
    .build-card { flex-basis: 230px; }
    #carTrack .build-card { flex-basis: calc(50% - 8px); }
    #carTrack .bc-media { flex-basis: 96px; }
    #carTrack .bc-body { padding: 13px 13px; gap: 6px; }
    #carTrack .bc-title { font-size: 15px; }
    #carTrack .bc-desc { -webkit-line-clamp: 2; font-size: 11.5px; }
    #carTrack .card-play { padding: 9px 6px; font-size: 12px; }
    #carTrack .bc-meta { gap: 6px; }
    #carTrack .bc-stab { font-size: 10px; }
    .server-card { gap: 12px; padding: 12px; }
    .server-card .srv-name { font-size: 14px; }
}

/* ===== Slide-out settings panel ===== */
.settings-overlay {
    position: fixed; inset: 0; z-index: 2950;
    background: rgba(0,0,0,0.5); opacity: 0; visibility: hidden;
    transition: opacity var(--transition); backdrop-filter: blur(2px);
}
.settings-overlay.open { opacity: 1; visibility: visible; }
.settings-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 2951;
    width: 400px; max-width: 92vw;
    background: #16192b;
    border-left: 1px solid var(--glass-border);
    box-shadow: -20px 0 60px rgba(0,0,0,0.6);
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
}
.settings-panel.open { transform: translateX(0); }
.settings-panel-head {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid var(--glass-border);
    background: rgba(22,25,43,0.92); backdrop-filter: blur(10px);
}
.settings-panel-head h3 { font-size: 18px; }
.settings-close {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05);
    color: var(--text-secondary); font-size: 18px; cursor: pointer; line-height: 1;
}
.settings-close:hover { color: #fff; border-color: var(--red); }
.settings-body { padding: 20px; }
.settings-field { margin-bottom: 18px; }
.settings-field label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.settings-field .input { width: 100%; }
.settings-sub { color: var(--text-muted); font-size: 12px; margin-bottom: 20px; }
.settings-file { margin-top: 14px; font-size: 11px; color: var(--text-muted); word-break: break-all; }
.settings-actions { display: flex; gap: 10px; margin-top: 20px; }
.settings-actions .btn { flex: 1; justify-content: center; }
.set-ram-slider { display: flex; align-items: center; gap: 12px; }
.set-ram-slider input { flex: 1; -webkit-appearance: none; height: 5px; border-radius: 6px; background: rgba(255,255,255,0.12); outline: none; }
.set-ram-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(135deg,#3F00FF,#6A00FF); cursor: pointer; }
.set-ram-slider input::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: linear-gradient(135deg,#3F00FF,#6A00FF); cursor: pointer; }
.set-ram-slider output { font-weight: 800; color: var(--text-primary); min-width: 40px; text-align: right; }

@media (max-width: 640px) {
    .settings-panel { width: 100%; max-width: none; }
    .nick-input { width: 170px; }
}

/* ===== Two entry scenarios ===== */
.entry-switch {
    border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05);
    color: var(--text-secondary); border-radius: 40px; padding: 6px 14px;
    font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all var(--transition);
}
.entry-switch:hover { color: #fff; border-color: var(--accent); background: rgba(124,58,237,0.15); }

.entry-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.entry-mode {
    display: flex; align-items: center; gap: 12px; text-align: left;
    padding: 14px 16px; cursor: pointer;
    border: 1.5px solid var(--glass-border); border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03); color: var(--text-primary);
    transition: all var(--transition);
}
.entry-mode .em-ico { font-size: 26px; line-height: 1; }
.entry-mode .em-txt { display: flex; flex-direction: column; font-size: 14px; font-weight: 800; }
.entry-mode .em-txt small { font-size: 11px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.entry-mode:hover { border-color: var(--glass-border-hover); transform: translateY(-2px); }
.entry-mode-guest.active { border-color: #06b6d4; background: rgba(6,182,212,0.10); box-shadow: 0 0 0 1px rgba(6,182,212,0.4); }
.entry-mode-auth.active { border-color: var(--accent); background: rgba(124,58,237,0.10); box-shadow: 0 0 0 1px rgba(124,58,237,0.4); }
.entry-mode-auth { border-style: dashed; }

/* ===== Main window + bottom circular rail ===== */
.launcher-main-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 14px; flex: 1 1 auto; min-height: 0; }
.launcher-rail {
    flex: 0 0 auto; width: 100%; order: 2;
    display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 18px;
    padding: 8px 6px 4px;
}
.rail-btn {
    width: 54px; height: 54px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 22px; line-height: 1;
    color: var(--text-secondary);
    border: 1.5px solid var(--glass-border);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
    transition: all var(--transition);
    position: relative;
}
.rail-btn .ct-ico { font-size: 22px; }
.rail-btn:hover { color: #fff; border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(124,58,237,.35); }
.rail-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #9f67ff);
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(124,58,237,.25), 0 10px 30px rgba(124,58,237,.5);
}
.rail-btn.active::after {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    border: 1px dashed rgba(124,58,237,.5); animation: rail-spin 12s linear infinite;
}
@keyframes rail-spin { to { transform: rotate(360deg); } }
.rail-exit {
    width: 54px; height: 54px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 20px; line-height: 1;
    color: var(--text-secondary);
    border: 1.5px solid var(--glass-border);
    background: rgba(239,68,68,.08);
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
    transition: all var(--transition);
}
.rail-exit:hover { color: #fff; border-color: rgba(239,68,68,.6); background: rgba(239,68,68,.18); transform: translateY(-2px); }
.rail-exit .ct-ico { font-size: 20px; }
.rail-exit .ct-ico svg { width: 22px; height: 22px; display: block; }
.rail-btn .ct-ico svg { width: 22px; height: 22px; display: block; }
/* Esc скрывает все открытые попапы */
/* ===== Всё вкладки: лаунчер — главное окно, гильдия/настройки — попапы ===== */
#guildView, #clientView { display: flex; }
#launchView { flex: 1 1 auto; min-width: 0; min-height: 0; width: 100%; display: flex; }
.guild-view { flex-direction: column; min-height: 0; }
.guild-view .chat-card-body { flex: 1 1 auto; min-height: 0; height: auto; overflow-y: auto; }
.launcher-inner { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; }
.launcher-cols { flex: 1 1 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; min-height: 0; }
.launcher-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.launcher-col-builds { justify-content: flex-start; }
.launcher-col-id { justify-content: flex-start; border-left: 1px solid var(--glass-border); padding-left: 28px; }
.client-inner { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; padding: 20px 24px; max-width: 640px; }
.center-pane { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 20px 24px; max-width: 900px; }
.friends-list { flex: 1 1 auto; }

.guest-hint {
    margin-top: 10px; font-size: 12px; color: var(--text-secondary);
    background: rgba(234,88,12,0.08); border: 1px solid rgba(234,88,12,0.25);
    padding: 9px 12px; border-radius: var(--radius-sm); line-height: 1.5;
}
.guest-hint b { color: #fbbf24; }

.auth-profile { display: flex; align-items: center; gap: 12px; }
.auth-avatar {
    width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; color: #fff;
}
.auth-meta { min-width: 0; }
.auth-name { font-size: 16px; font-weight: 800; }
.auth-sub { font-size: 12px; color: var(--green); }
.auth-unlocked {
    margin-top: 12px; font-size: 12px; color: var(--text-secondary); line-height: 1.5;
    background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.25);
    padding: 9px 12px; border-radius: var(--radius-sm);
}

/* ===== Friends panel ===== */
.friends-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 220px; overflow-y: auto; }
.friend-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.03); }
.friend-av {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff;
}
.friend-meta { min-width: 0; flex: 1; }
.friend-name { font-size: 13px; font-weight: 700; }
.friend-status { font-size: 10.5px; color: var(--text-muted); }
.friend-status.online { color: var(--green); }
.friend-act { border: none; background: rgba(124,58,237,0.16); color: #fff; border-radius: 7px; padding: 5px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.friend-act:hover { background: rgba(124,58,237,0.32); }
.friend-section { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); margin: 4px 2px; }
.friend-incoming { border-color: rgba(124,58,237,0.4); background: rgba(124,58,237,0.07); }
.friend-incoming .friend-act { background: rgba(22,163,74,0.18); }
.friend-incoming .friend-act:hover { background: rgba(22,163,74,0.34); }
.friend-add { display: flex; gap: 8px; }
.friend-add .input { flex: 1; }

/* ===== Perks ===== */
.perks-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.perk-card {
    display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
    padding: 12px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03); color: var(--text-primary);
    transition: all var(--transition);
}
.perk-card:hover { border-color: var(--accent); transform: translateY(-2px); background: rgba(124,58,237,0.10); }
.perk-ico { font-size: 22px; }
.perk-t { font-size: 12.5px; font-weight: 800; }
.perk-d { font-size: 10.5px; color: var(--text-muted); line-height: 1.4; }

/* ===== Gating: locked overlay for guests ===== */
.auth-locked {
    display: none; position: absolute; inset: 0; z-index: 5;
    flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
    background: rgba(12,14,24,0.86); backdrop-filter: blur(4px); border-radius: var(--radius); padding: 18px;
}
.auth-locked .al-ico { font-size: 34px; }
.auth-locked .al-txt { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; max-width: 220px; }
.friends-card, .perks-card { position: relative; }

/* ===== Login modal ===== */
.login-modal { max-width: 440px; }
.login-modal h4 { color: #a78bfa; }
.lf-field { margin-bottom: 12px; }
.lf-field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }
.lf-field .input { width: 100%; }
.lf-error { color: var(--red); font-size: 12.5px; min-height: 16px; margin-bottom: 8px; }
.login-modal .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.login-modal .btn-row .btn { flex: 1; justify-content: center; }
.yandex-login-btn {
    width: 100%; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 11px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; font-weight: 800; color: #fff;
    background: #ff0000; border: none; transition: filter var(--transition);
}
.yandex-login-btn:hover { filter: brightness(1.08); }
.yx-ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; background: #fff; color: #ff0000; font-weight: 900; font-size: 13px; }

@media (max-width: 640px) {
    .perks-grid { grid-template-columns: 1fr; }
    .entry-modes { grid-template-columns: 1fr; }
}

/* ============================================================
   ДИЗАЙН-РЕФРЕШ ЛАУНЧЕРА
   ============================================================ */

/* Мягкое свечение + анимированная аврора за карточкой лаунчера */
.launcher-layout { position: relative; isolation: isolate; }
.launcher-layout::before {
    content: ''; position: absolute; z-index: -2; inset: -60px -20px;
    background:
        radial-gradient(720px 380px at 50% -6%, rgba(124,58,237,0.22), transparent 70%),
        radial-gradient(520px 320px at 100% 100%, rgba(6,182,212,0.12), transparent 72%);
    filter: blur(8px); pointer-events: none;
}
.launcher-layout::after {
    content: ''; position: absolute; z-index: -2;
    width: 460px; height: 460px; left: -140px; top: 38%;
    background: radial-gradient(circle, rgba(6,182,212,0.20), transparent 65%);
    filter: blur(50px); pointer-events: none;
    animation: auroraFloat 16s ease-in-out infinite;
}
@keyframes auroraFloat {
    0%, 100% { transform: translate(0, 0); opacity: 0.75; }
    50%      { transform: translate(140px, -50px); opacity: 1; }
}

/* Карточка лаунчера — стекло с объёмом */
.launcher-card {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    background:
        radial-gradient(120% 120% at 50% -12%, rgba(124, 58, 237, 0.16), transparent 55%),
        rgba(15, 15, 24, 0.66);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    box-shadow: 0 30px 80px rgba(6, 4, 18, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.10), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
body.light .launcher-card {
    border-color: rgba(0, 0, 0, 0.08);
    background:
        radial-gradient(120% 120% at 50% -12%, rgba(124, 58, 237, 0.10), transparent 55%),
        rgba(255, 255, 255, 0.72);
    box-shadow: 0 30px 80px rgba(20, 20, 40, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.launcher-card::before {
    background:
        radial-gradient(120% 70% at 50% -6%, rgba(124,58,237,0.18), transparent 62%),
        linear-gradient(180deg, rgba(124,58,237,0.10), transparent 26%);
}

/* Заголовки секций с акцентной линией */
.launcher-card .side-head,
.launcher-card .builds-head h3,
.launcher-card .chat-card-head h4 {
    position: relative;
}
.launcher-card .side-head::after {
    content: ''; display: block; height: 2px; margin-top: 10px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px; opacity: 0.6;
}

/* Сегментированный переключатель вкладок */
.center-tabs {
    gap: 6px; padding: 16px 16px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}
.center-tab {
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    padding: 10px 12px;
    font-size: 13px; font-weight: 800;
    transition: all 0.2s ease;
}
.center-tab .ct-ico { font-size: 16px; }
.center-tab:hover { background: rgba(124,58,237,0.14); color: #fff; transform: translateY(-1px); }
.center-tab.active {
    background: linear-gradient(135deg, #3F00FF, #6A00FF);
    border-color: transparent; color: #fff;
    box-shadow: 0 8px 22px rgba(63,0,255,0.45);
}

/* Карточки выбора сценария — ярче при выборе */
.entry-mode { border-radius: 16px; background: rgba(255,255,255,0.03); }
.entry-mode:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.entry-mode-guest.active {
    border-color: #06b6d4;
    background: linear-gradient(135deg, rgba(6,182,212,0.20), rgba(6,182,212,0.05));
    box-shadow: 0 0 0 1px rgba(6,182,212,0.55), 0 12px 32px rgba(6,182,212,0.20);
}
.entry-mode-auth.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(124,58,237,0.24), rgba(124,58,237,0.06));
    box-shadow: 0 0 0 1px rgba(124,58,237,0.6), 0 12px 32px rgba(124,58,237,0.24);
}

/* Сервер-статус — мягкая плашка */
.server-card {
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Сборки — плавный подъём и свечение */
.build-card {
    border-radius: 18px;
    background: rgba(22,22,32,0.78);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.build-card:hover { box-shadow: 0 22px 50px rgba(124,58,237,0.32); }
.build-card.selected {
    box-shadow: 0 0 0 1.5px var(--accent), 0 18px 46px rgba(124,58,237,0.38);
}
.build-card-img { border-radius: 18px 18px 0 0; }
.card-play { border-radius: 0 0 18px 18px; letter-spacing: 1.5px; }
.car-btn { width: 34px; height: 34px; border-radius: 12px; }

/* Главная кнопка запуска — пульсирующее свечение */
.main-cta {
    border-radius: 16px;
    letter-spacing: 2.5px;
    background: linear-gradient(135deg, #3F00FF, #6A00FF);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 12px 36px rgba(63,0,255,0.5);
    animation: ctaPulse 2.8s ease-in-out infinite;
}
@keyframes ctaPulse {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 12px 36px rgba(63,0,255,0.45), 0 0 0 0 rgba(124,58,237,0); }
    50%      { box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 16px 48px rgba(63,0,255,0.65), 0 0 0 7px rgba(124,58,237,0.12); }
}
.main-cta:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* Вкладки-контейнеры как вложенные панели */
.guild-view, .center-pane {
    border-radius: 18px;
    background:
        radial-gradient(120% 120% at 50% -10%, rgba(124,58,237,0.07), transparent 60%),
        rgba(255,255,255,0.025);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.center-pane { padding: 22px 24px; }

/* Друзья / перки — аккуратные ряды */
.friend-item {
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s ease, transform 0.2s ease;
}
.friend-item:hover { background: rgba(124,58,237,0.10); transform: translateX(2px); }
.perk-card { border-radius: 14px; }
.perk-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(124,58,237,0.28); }

/* Уведомления */
.notice { border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05); }

/* Блокировка гостя */
.auth-locked {
    background: rgba(12,14,24,0.92);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Модалка входа — акцентный заголовок */
.login-modal h4 {
    background: linear-gradient(90deg, #a78bfa, #06b6d4);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-size: 20px;
}
.yandex-login-btn { border-radius: 12px; }

/* Пустые состояния */
.chat-empty, .build-empty { color: var(--text-muted); opacity: 0.8; }

/* ============================================================
   ТЕМА (светлая/тёмная) — интеграция с глобальным body.light
   ============================================================ */
.launcher-layout {
    --lc-panel: rgba(255, 255, 255, 0.04);
    --lc-panel-2: rgba(255, 255, 255, 0.07);
    --lc-card: rgba(22, 22, 32, 0.72);
    --lc-lock: rgba(12, 14, 24, 0.92);
}
body.light .launcher-layout {
    --lc-panel: rgba(0, 0, 0, 0.045);
    --lc-panel-2: rgba(0, 0, 0, 0.07);
    --lc-card: rgba(0, 0, 0, 0.03);
    --lc-lock: rgba(255, 255, 255, 0.85);
}

/* Поверхности, зависящие от темы */
.server-card { background: var(--lc-panel); }
.build-card { background: var(--lc-card); }
.guild-view, .center-pane {
    background: radial-gradient(120% 120% at 50% -10%, rgba(124, 58, 237, 0.07), transparent 60%), var(--lc-panel);
}
.friend-item { background: var(--lc-panel); }
.notice { background: var(--lc-panel); }
.center-tab { background: var(--lc-panel); }
.car-btn { background: var(--lc-panel); }
.entry-mode { background: var(--lc-panel); }
.auth-locked { background: var(--lc-lock); }
.settings-panel-head { background: var(--lc-lock); }
.settings-close { background: var(--lc-panel); }
.settings-close:hover { color: var(--text-primary); }
.set-ram-slider input { background: var(--lc-panel-2); }

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1100px) {
    .launcher-card { min-height: 780px; }
}
@media (max-width: 900px) {
    .launcher-card { min-height: 720px; }
    .launcher-inner { padding: 20px 18px; }
    .center-pane { padding: 18px 16px; }
    /* вкладки — горизонтальный скролл вместо переноса */
    .center-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 14px 14px 10px;
    }
    .center-tabs::-webkit-scrollbar { display: none; }
    .center-tab { flex: 0 0 auto; scroll-snap-align: start; }
}
@media (max-width: 760px) {
    .launcher-card { min-height: auto; border-radius: 18px; }
    .server-card { grid-template-columns: 1fr; gap: 10px; }
    .server-card .srv-name { grid-column: auto; }
    .build-card { flex-basis: 82%; }
    .entry-modes { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .launcher-inner { padding: 16px 12px; }
    .center-pane { padding: 16px 12px; }
    .main-cta { font-size: 16px; padding: 16px; letter-spacing: 1.5px; }
    .side-head { font-size: 16px; }
}

/* Текст, который должен оставаться читаемым в светлой теме */
.launcher-nick-sub { color: var(--text-secondary); }
.center-tab:hover { color: var(--text-primary); }
.car-btn:hover { color: var(--text-primary); }
.side-btn:hover { color: var(--text-primary); }
.am-close:hover { color: var(--text-primary); }
.entry-switch:hover { color: var(--text-primary); }

/* TPS — цветовая шкала состояния сервера */
.srv-stat .num.tps-good { color: var(--green); }
.srv-stat .num.tps-warn { color: var(--orange); }
.srv-stat .num.tps-bad  { color: var(--red); }
.stable-pill.crit { color: var(--red); border-color: rgba(220, 38, 38, 0.35); background: rgba(220, 38, 38, 0.12); }
.stable-pill.crit .dot { background: var(--red); box-shadow: 0 0 8px rgba(220, 38, 38, 0.8); }

/* ============================================================
   СОВРЕМЕННЫЙ ПОЛИР: стекло, микро-анимации, фокус
   ============================================================ */
:root { --lc-ease: cubic-bezier(0.22, 1, 0.36, 1); }

/* Стеклянные поверхности внутри карточки */
.server-card, .build-card, .guild-view, .center-pane,
.friend-item, .notice, .perk-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.center-tab, .car-btn {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Вкладки — плавный современный отклик */
.center-tab {
    transition: background 0.25s var(--lc-ease), color 0.25s var(--lc-ease),
                transform 0.2s var(--lc-ease), box-shadow 0.25s var(--lc-ease);
}
.center-tab:active { transform: scale(0.95); }
.center-tab.active {
    box-shadow: 0 8px 22px rgba(63, 0, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

/* Кнопки — нажатие и мягкий подъём */
.main-cta, .card-play, .side-btn, .car-btn, .perk-card, .build-card, .entry-mode {
    transition: transform 0.2s var(--lc-ease), box-shadow 0.25s var(--lc-ease),
                background 0.25s var(--lc-ease), border-color 0.25s var(--lc-ease), filter 0.2s var(--lc-ease);
}
.main-cta:hover, .card-play:hover, .side-btn:hover, .car-btn:hover, .entry-mode:hover { transform: translateY(-2px); }
.main-cta:active, .card-play:active, .side-btn:active, .car-btn:active { transform: translateY(0) scale(0.98); }

/* Карточки — мягкий подъём и верхний блик */
.build-card, .perk-card {
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.build-card:hover, .perk-card:hover {
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 22px 50px rgba(124, 58, 237, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Доступный и стильный фокус */
.launcher-layout :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 10px;
}

/* Пустые состояния — крупнее и центрированно */
.chat-empty, .build-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
    font-size: 14px; opacity: 0.85;
}
.chat-empty::before, .build-empty::before {
    content: '\2726'; font-size: 30px; opacity: 0.5; line-height: 1;
}

/* Плавное появление вкладки при переключении */
@keyframes viewIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.guild-view, .center-pane, .client-view, #launchView {
    animation: viewIn 0.35s var(--lc-ease) both;
}

/* Уважение к настройкам уменьшения движения */
@media (prefers-reduced-motion: reduce) {
    .launcher-layout::after,
    .main-cta,
    .guild-view, .center-pane, .client-view, #launchView {
        animation: none !important;
    }
    .center-tab, .main-cta, .card-play, .side-btn, .car-btn, .perk-card, .build-card, .entry-mode {
        transition: none !important;
    }
}

/* ===== Дополнительные элементы (по промпту launcher.txt) ===== */
.agent-brand { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); font-weight: 700; margin-bottom: 6px; }
.agent-version { color: var(--accent); font-weight: 800; }
.launcher-nick-sub { display: block; }
.nick-apply-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.nick-apply {
    padding: 9px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border); background: var(--bg-card);
    color: var(--text-primary); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap;
    transition: all 0.2s var(--lc-ease);
}
.nick-apply:hover { border-color: var(--accent); color: #fff; background: linear-gradient(135deg, #3F00FF, #6A00FF); }
.premium-teaser .al-txt, .friends-teaser .al-txt { max-width: 260px; }

/* ===== Друзья / Статистика сессий ===== */
#friendsView, #statsView { display: flex; flex-direction: column; }
.friends-popup { max-width: 540px; max-height: 78vh; }
.stats-popup { max-width: 580px; max-height: 80vh; }
.friends-view, .stats-view { width: 100%; height: 100%; padding: 18px 22px; overflow-y: auto; }
.friend-add { display: flex; gap: 10px; align-items: flex-start; }
.friend-add .input { flex: 1; }
.friend-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin-bottom: 8px;
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
}
.friend-av {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px;
}
.friend-meta { flex: 1; min-width: 0; }
.friend-un { font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.friend-dot.on { background: var(--green); box-shadow: 0 0 8px rgba(22,163,74,0.8); }
.friend-act { display: flex; gap: 6px; flex-shrink: 0; }
.friend-act .side-btn { width: auto; min-width: 0; margin: 0; padding: 7px 10px; font-size: 12px; }
.friend-act .side-btn.primary { padding: 7px 12px; }
.rail-badge {
    position: absolute; top: -2px; right: -2px; z-index: 2;
    min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px;
    background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-secondary); line-height: 1;
}
.stats-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.stats-chip {
    text-align: center; padding: 12px 8px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}
.stats-chip b { display: block; font-size: 19px; line-height: 1.2; color: var(--text-primary); }
.stats-chip span { display: block; margin-top: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.stats-block { margin-top: 18px; }
.stats-title { font-size: 13px; font-weight: 800; margin-bottom: 10px; color: var(--text-secondary); }
.stats-days { display: flex; gap: 6px; align-items: flex-end; height: 96px; }
.st-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.st-day .bar { width: 100%; background: linear-gradient(180deg, #6A00FF, #3F00FF); border-radius: 6px 6px 0 0; min-height: 3px; box-shadow: 0 0 12px rgba(63,0,255,0.35); }
.st-day .lb { font-size: 9px; color: var(--text-muted); text-transform: lowercase; }
.build-row {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 8px 10px; margin-bottom: 6px;
    border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03); font-size: 12.5px;
}
.build-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.build-row span { color: var(--text-secondary); white-space: nowrap; }
.session-row {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 6px 2px; border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 12px; color: var(--text-secondary);
}
.session-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-row span:last-child { white-space: nowrap; }
@media (max-width: 640px) {
    .friend-act .side-btn { padding: 6px 8px; font-size: 11px; }
    .stats-days { height: 80px; }
}
