/* =========================================================
   SUPP SQUAD — ДИЗАЙН-СИСТЕМА (GLASSMORPHISM & CLEAN)
   ========================================================= */

:root {
    --accent-color: #6db26f;
    --accent-glow: rgba(109, 178, 111, 0.35);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.16);
    --glass-blur: blur(18px);
    --site-bg: url('../img/background.png');
}

/* Сезонные акценты тем */
[data-theme="halloween"] {
    --accent-color: #ff793f;
    --accent-glow: rgba(255, 121, 63, 0.45);
}
[data-theme="winter"] {
    --accent-color: #74b9ff;
    --accent-glow: rgba(116, 185, 255, 0.45);
}
[data-theme="newyear"], [data-theme="newyearv2"] {
    --accent-color: #ffd700;
    --accent-glow: rgba(255, 215, 0, 0.45);
}
[data-theme="fall"] {
    --accent-color: #e67e22;
    --accent-glow: rgba(230, 126, 34, 0.45);
}
[data-theme="spring"] {
    --accent-color: #a8e6cf;
    --accent-glow: rgba(168, 230, 207, 0.45);
}
[data-theme="summer"] {
    --accent-color: #2ed573;
    --accent-glow: rgba(46, 213, 115, 0.45);
}

/* Разрешаем скролл */
html, body {
    width: 100%;
    min-height: 100vh;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body {
    position: relative;
    background: var(--site-bg, url('../img/background.png')) center center / cover no-repeat fixed !important;
}

/* =========================================================
   AURORA & AMBIENT GLOW SYSTEM (HIGH-END DEPTH & LIGHTING)
   ========================================================= */
body::before {
    content: '';
    position: fixed;
    top: -15%;
    left: 15%;
    width: 650px;
    height: 550px;
    background: radial-gradient(circle, var(--accent-glow, rgba(109, 178, 111, 0.32)) 0%, transparent 68%);
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.75;
    animation: auroraOrb1 20s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -15%;
    right: 10%;
    width: 700px;
    height: 600px;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.20) 0%, rgba(251, 191, 36, 0.12) 40%, transparent 70%);
    filter: blur(130px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
    animation: auroraOrb2 25s ease-in-out infinite alternate;
}

@keyframes auroraOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 40px) scale(1.15); }
    100% { transform: translate(-30px, -20px) scale(0.92); }
}

@keyframes auroraOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, -30px) scale(1.1); }
    100% { transform: translate(40px, 30px) scale(0.95); }
}

/* Премиальная градиентная типографика */
h1, .hero-title, .section-title, .portal-title {
    background: linear-gradient(180deg, #FFFFFF 20%, rgba(255, 255, 255, 0.72) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    letter-spacing: -0.02em !important;
}

/* Премиальная стеклянная окантовка и освещение карточек */
.portal-card, .roulette-card, .gallery-item, .quote-card, .rule-card {
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(18, 19, 26, 0.58) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.portal-card:hover, .quote-card:hover, .rule-card:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 25px var(--accent-glow, rgba(109, 178, 111, 0.3)) !important;
}

/* ОБЩИЙ НАВБАР И ЛОГОТИП */
.nav-left img {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
}

.hero {
    position: relative;
    min-height: 100vh !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-wave-wrapper, .bottom-wave-line {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 110px !important;
}

.site-footer {
    position: relative;
    width: 100%;
    height: 110px;
    margin-top: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-wave-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    clip-path: url(#wave-clip);
    z-index: 1;
}

.footer-wave-line {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.footer-text, .footer {
    position: relative;
    z-index: 3;
    padding-top: 36px;
    font-size: 15px;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* КОНТЕЙНЕР ПОРТАЛА ПОСЛЕ ХЕРО */
.portal-content {
    position: relative;
    z-index: 5;
    width: min(1360px, 94%);
    margin: 50px auto 140px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.portal-section {
    position: relative;
    padding: 36px 30px;
    border-radius: 28px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.3);
}

.section-head {
    text-align: center;
    margin-bottom: 36px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.section-sub {
    font-size: 17px;
    font-weight: 400;
    opacity: 0.85;
}

/* ================= 1. РУЛЕТКА МЕМОВ (КАК В ГАЛЕРЕЕ) ================= */
.roulette-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.roulette-card-wrapper {
    position: relative;
    width: 320px;
    height: 380px;
}

/* Карточка в точности как gallery-item */
.roulette-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
}

.roulette-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.35);
}

.roulette-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--bg-img);
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.65);
    transform: scale(1.15);
    z-index: 1;
    pointer-events: none;
}

.roulette-card img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px 14px 60px 14px;
    z-index: 2;
    display: block;
}

/* Бейджик редкости */
.rarity-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 12;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.roulette-card[data-rarity="rare"] .rarity-tag { color: #6db26f; border-color: #6db26f; }
.roulette-card[data-rarity="epic"] .rarity-tag { color: #c084fc; border-color: #c084fc; }
.roulette-card[data-rarity="legendary"] .rarity-tag { 
    color: #fbbf24; 
    border-color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

/* ОВЕРЛЕЙ ОПИСАНИЯ */
.gallery-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.90) 0%, rgba(0, 0, 0, 0.4) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.2s;
}

.gallery-overlay p {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    white-space: pre-line;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* КНОПКА КРУТИТЬ */
.roll-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 250px;
    height: 56px;
    border-radius: 20px;
    background: var(--accent-color, #6db26f);
    border: none;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 30px var(--accent-glow, rgba(109, 178, 111, 0.25));
    transition: transform 0.2s ease, box-shadow 0.2s;
}

.roll-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(109, 178, 111, 0.35);
}

/* ================= 2. ДЕТЕКТИВНАЯ ДОСКА (ПРОБКОВАЯ ДОСКА) ================= */
.board-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.board-toolbar-left,
.board-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.board-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: #6db26f;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(109, 178, 111, 0.3);
    transition: transform 0.15s ease, background 0.15s, box-shadow 0.15s;
}

.board-btn:hover {
    transform: translateY(-2px);
    background: #7ec480;
    box-shadow: 0 6px 20px rgba(109, 178, 111, 0.45);
}

.board-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.07);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.board-btn-ghost:hover {
    background: rgba(231, 76, 60, 0.22);
    color: #ff9e9e;
    border-color: rgba(231, 76, 60, 0.5);
}

.board-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    margin-right: 6px;
}

.clue-counter-badge {
    background: rgba(109, 178, 111, 0.2);
    color: #8be08d;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(109, 178, 111, 0.35);
}

.detective-board {
    position: relative;
    width: 100%;
    min-height: 700px;
    border-radius: 14px;
    background: url('../img/corkboard.jpg') center / 100% 100% no-repeat;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.75),
        0 8px 24px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    padding: 35px;
    user-select: none;
}

/* ПОЛНОЭКРАННЫЙ РЕЖИМ ЧЕРЕЗ NATIVE FULLSCREEN API (НЕ ЛОМАЕТ ВЕРСТКУ) */
#detectiveBoard:fullscreen,
#detectiveBoard:-webkit-full-screen,
#detectiveBoard.is-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
    aspect-ratio: unset !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 35px !important;
    background: url('../img/corkboard.jpg') center / 100% 100% no-repeat !important;
    margin: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

/* Кнопки управления в полноэкранном режиме (HUD) */
.board-fs-hud {
    display: none;
    position: absolute;
    top: 20px;
    left: 24px;
    right: 24px;
    z-index: 500;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.board-fs-btn {
    pointer-events: auto;
    padding: 10px 18px;
    background: rgba(18, 18, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s, background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.board-fs-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: #6db26f;
}

.board-fs-btn#fsAddClueBtn {
    background: #6db26f;
    border-color: rgba(255, 255, 255, 0.25);
}

.board-fs-btn#fsAddClueBtn:hover {
    background: #7ec480;
}

.board-fs-btn.board-fs-exit:hover {
    background: rgba(231, 76, 60, 0.9);
    border-color: transparent;
}

#detectiveBoard:fullscreen .board-fs-hud,
#detectiveBoard:-webkit-full-screen .board-fs-hud,
#detectiveBoard.is-fullscreen .board-fs-hud {
    display: flex;
}

/* Пустое состояние доски (СТИЛЬНОЕ ДЕЛО #001 НА ПРОБКЕ) */
.board-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.25s ease;
}

.board-empty-state.hidden {
    display: none;
}

.starter-case-file {
    position: relative;
    background: #fff8e1;
    color: #2c2518;
    width: 290px;
    padding: 26px 22px 22px 22px;
    border-radius: 4px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 3px 10px rgba(0,0,0,0.25);
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    pointer-events: auto;
    cursor: pointer;
    transform: rotate(-1.5deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.starter-case-file:hover {
    transform: rotate(0deg) scale(1.04);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.7);
}

.starter-case-file .nail-pin {
    top: -8px;
}

.case-stamp {
    display: inline-block;
    padding: 2px 10px;
    border: 2px solid #b71c1c;
    color: #b71c1c;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 10px;
    transform: rotate(-2deg);
}

.case-title {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.case-desc {
    font-size: 13px;
    line-height: 1.45;
    color: #4a3f2c;
    margin-bottom: 16px;
}

.case-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: #6db26f;
    color: white;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(109, 178, 111, 0.35);
    transition: background 0.15s, transform 0.15s;
}

.starter-case-file:hover .case-action {
    background: #7ec480;
    transform: translateY(-1px);
}

.strings-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.evidence-thread {
    stroke: #ff3838;
    stroke-width: 2.8;
    fill: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 5px rgba(255, 56, 56, 0.65));
    stroke-dasharray: 8, 3;
    pointer-events: none;
    transition: stroke 0.2s ease;
}

/* ЭЛЕМЕНТЫ УЛИК НА ДОСКЕ */
.clue-item {
    position: absolute;
    z-index: 5;
    padding: 12px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: grab;
    user-select: none;
}

.clue-item:active {
    cursor: grabbing;
}

.clue-item:hover {
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
    z-index: 25;
}

.clue-item.is-dragging {
    transition: none !important;
    cursor: grabbing !important;
    transform: scale(1.04) rotate(0deg) !important;
    box-shadow: 0 26px 65px rgba(0, 0, 0, 0.9) !important;
    z-index: 150 !important;
}

.nail-pin {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff5252, #c62828 70%, #680000 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 30;
    pointer-events: none;
}

/* ЕДИНАЯ КАПСУЛА УПРАВЛЕНИЯ УЛИКОЙ (Штамп + Удалить вместе) */
.clue-control-pill {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(18, 18, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    gap: 2px;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 40;
}

.clue-item:hover .clue-control-pill {
    opacity: 1;
    transform: scale(1);
}

.clue-pill-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.12s;
}

.clue-pill-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.15);
}

.clue-pill-btn.delete-clue-btn {
    font-size: 15px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.85);
}

.clue-pill-btn.delete-clue-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.clue-pill-btn.stamp-clue-btn:hover {
    background: #e67e22;
}

/* Действия в полосе связей */
.linking-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-cancel-btn.link-cut-btn {
    background: rgba(255, 75, 75, 0.2);
    border-color: rgba(255, 75, 75, 0.4);
    color: #ff6b81;
}

.link-cancel-btn.link-cut-btn:hover {
    background: #e74c3c;
    color: #fff;
}

/* Визуальный штамп на улике (под углом, гранж-стиль) */
.clue-stamp {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 2px solid currentColor;
    border-radius: 3px;
    transform: rotate(-7deg);
    pointer-events: none;
    z-index: 22;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    user-select: none;
    background: rgba(18, 18, 24, 0.88);
}

/* На стикере штамп размещен в самом низу на грани, чтобы ТЕКСТ ВСЕГДА ЧИТАЛСЯ И НЕ ПЕРЕКРЫВАЛСЯ */
.clue-item.sticky-note .clue-stamp {
    bottom: -8px;
    right: 8px;
    font-size: 9.5px;
    padding: 2px 7px;
    letter-spacing: 1px;
    transform: rotate(-4deg);
    background: rgba(20, 20, 26, 0.94);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    z-index: 25;
}

.clue-item.polaroid .clue-stamp {
    bottom: 6px;
    right: 6px;
    background: rgba(255, 255, 255, 0.92);
}

.clue-stamp.stamp-suspect {
    color: #ff3344;
    border-color: #ff3344;
}

.clue-stamp.stamp-base {
    color: #2ed573;
    border-color: #2ed573;
}

.clue-stamp.stamp-closed {
    color: #c0392b;
    border-color: #c0392b;
}

.clue-stamp.stamp-no_alibi {
    color: #ff793f;
    border-color: #ff793f;
}

.clue-stamp.stamp-secret {
    color: #f1c40f;
    border-color: #f1c40f;
}

/* БЫСТРОЕ МЕНЮ ВЫБОРА ШТАМПА НА КАРТОЧКЕ */
.stamp-popover {
    position: absolute;
    top: -4px;
    left: 28px;
    background: rgba(16, 16, 24, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85);
    border-radius: 14px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 500;
    min-width: 175px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: popIn 0.15s ease-out;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.92) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.stamp-popover-item {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.stamp-popover-item:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: translateX(3px);
}

.stamp-popover-item.opt-clear { color: rgba(255, 255, 255, 0.55); border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 8px; margin-bottom: 2px; }
.stamp-popover-item.opt-clear:hover { color: #ff5252; }
.stamp-popover-item.stamp-suspect { color: #ff4d4d; }
.stamp-popover-item.stamp-base { color: #2ed573; }
.stamp-popover-item.stamp-closed { color: #ff6b6b; }
.stamp-popover-item.stamp-no_alibi { color: #ffa502; }
.stamp-popover-item.stamp-secret { color: #ffd32a; }

/* Полароид с мемом (БЕЗ ОБРЕЗКИ И СЖАТИЯ КАРТИНКИ) */
.clue-item.polaroid {
    background: #ffffff;
    color: #1a1a1a;
    width: 220px;
    text-align: center;
    padding: 10px 10px 14px 10px;
    border-radius: 4px;
}

.clue-item.polaroid img {
    width: 100%;
    max-height: 260px;
    height: auto;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    pointer-events: none;
    display: block;
}

.clue-item.polaroid .caption {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: #222;
    word-break: break-word;
}

/* Записка стикер (ТОЛЬКО ТЕКСТ ЦИТАТЫ БЕЗ ЗАГОЛОВКА) */
.clue-item.sticky-note {
    background: #fff9c4;
    color: #2a2416;
    width: 190px;
    min-height: 110px;
    padding: 22px 14px 14px 14px;
    border-radius: 2px 2px 14px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.clue-item.sticky-note .note-body {
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    word-break: break-word;
    color: #2b2212;
}

/* МОДАЛЬНЫЕ ОКНА ДЛЯ ДОСКИ */
.detective-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.detective-modal.active {
    display: flex;
}

.detective-modal-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #191b22;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
    max-height: 85vh;
    overflow-y: auto;
    color: #fff;
}

.detective-modal-box h3 {
    margin: 0 0 6px 0;
    font-size: 21px;
    font-weight: 700;
}

.detective-modal-box p.modal-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 16px 0;
}

/* ВКЛАДКИ В ЕДИНОЙ МОДАЛКЕ */
.modal-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    padding: 5px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-tab-btn.active {
    background: #6db26f;
    color: #fff;
    box-shadow: 0 4px 12px rgba(109, 178, 111, 0.35);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #6db26f;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.color-opt {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s, border-color 0.15s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.color-opt.active {
    border-color: #fff;
    transform: scale(1.15);
}

/* RGB КОЛОРПИКЕР */
.rgb-picker-wrapper {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rgb-input-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rgb-swatch-box {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.rgb-swatch-box:hover {
    transform: scale(1.08);
    border-color: #6db26f;
    box-shadow: 0 0 12px rgba(109, 178, 111, 0.4);
}

.rgb-swatch-box input[type="color"] {
    position: absolute;
    inset: -10px;
    width: 200%;
    height: 200%;
    cursor: pointer;
    opacity: 0;
    border: none;
    padding: 0;
}

.rgb-swatch-circle {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: block;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
}

.rgb-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rgb-code {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: #8be08d;
    letter-spacing: 0.5px;
}

.rgb-tip {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.unlocked-memes-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.meme-pick-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.15s, border-color 0.15s;
    text-align: center;
    padding: 4px;
}

.meme-pick-item img {
    width: 100%;
    height: 75px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
}

.meme-pick-item span {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.8);
}

.meme-pick-item:hover {
    transform: scale(1.05);
    border-color: rgba(109, 178, 111, 0.5);
}

.meme-pick-item.selected {
    border-color: #6db26f;
    box-shadow: 0 0 12px rgba(109, 178, 111, 0.6);
}

/* ================= 3. МАСКОТ СТЬЮИ НА НАВБАРЕ ================= */
.stewie-navbar {
    position: relative;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    margin-right: 6px;
    flex-shrink: 0;
    z-index: 120;
    transition: transform 0.2s ease;
}

.stewie-navbar:hover {
    transform: scale(1.03);
}

.stewie-navbar img {
    width: 44px;
    height: auto;
    max-height: 56px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
    transform-origin: center center;
    display: block;
    transition: transform 0.15s ease-out, filter 0.25s ease;
}

.stewie-navbar.bounce img {
    animation: stewie-tap 0.25s ease-out;
}

@keyframes stewie-tap {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* Эмоции Стьюи — статичные, без прыжков и дерганий */
.stewie-navbar.emotion-angry img {
    animation: none !important;
}

.stewie-navbar.emotion-bruised img {
    animation: none !important;
}

.stewie-navbar.emotion-shocked img {
    animation: none !important;
}

.stewie-navbar.emotion-happy img {
    animation: none !important;
}

/* Облачко с репликой аккуратно под Стьюи (не вылезает за пределы экрана) */
.stewie-navbar .stewie-bubble {
    position: absolute;
    top: calc(100% + 8px);
    right: -10px;
    transform: translateY(-4px);
    display: inline-block !important;
    width: max-content !important;
    max-width: 240px !important;
    min-width: 120px !important;
    box-sizing: border-box !important;
    background: rgba(16, 18, 26, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-align: center !important;
    padding: 8px 14px !important;
    border-radius: 14px !important;
    white-space: normal !important;
    word-break: break-word !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55) !important;
    z-index: 1000 !important;
}

.stewie-navbar .stewie-bubble::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 24px;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent rgba(16, 18, 26, 0.96) transparent;
}

.stewie-navbar .stewie-bubble.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

@media(max-width: 900px) {
    .stewie-navbar {
        margin-top: 0;
        margin-right: 2px;
    }
    .stewie-navbar img {
        width: 40px;
    }
    .stewie-navbar .stewie-bubble {
        max-width: 190px !important;
        font-size: 12px !important;
        padding: 7px 12px !important;
        right: -20px;
    }
}

/* ================= 4. ПРОСМОТРЩИК (VIEWER ИЗ ГАЛЕРЕИ) ================= */
.viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9999;
    user-select: none;
}

.viewer.active {
    opacity: 1;
    pointer-events: auto;
}

.viewer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
}

#viewerMediaContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 75vh;
}

.viewer img {
    max-width: 92vw;
    max-height: 75vh;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    cursor: grab;
    transition: transform 0.1s ease-out;
}

.viewer img.dragging {
    cursor: grabbing;
    transition: none !important;
}

.viewer-caption {
    font-size: 16px;
    font-weight: 500;
    color: white;
    text-align: center;
    white-space: pre-line;
}

/* ================= 5. РЕЖИМ СВЯЗЫВАНИЯ УЛИК И НИТЕЙ ================= */
.board-linking-banner {
    display: none;
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 28, 0.94);
    border: 1px solid rgba(255, 75, 75, 0.5);
    box-shadow: 0 10px 30px rgba(255, 50, 50, 0.25);
    padding: 10px 20px;
    border-radius: 30px;
    color: #fff;
    font-size: 13px;
    z-index: 120;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: pulseBanner 2s infinite ease-in-out;
}

@keyframes pulseBanner {
    0%, 100% { border-color: rgba(255, 75, 75, 0.4); }
    50% { border-color: rgba(255, 75, 75, 0.9); box-shadow: 0 10px 35px rgba(255, 50, 50, 0.4); }
}

.board-linking-banner.active {
    display: flex;
}

.link-cancel-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.link-cancel-btn:hover {
    background: rgba(231, 76, 60, 0.8);
}

.detective-board.linking-mode {
    cursor: crosshair;
}

.detective-board.linking-mode .clue-item {
    cursor: pointer !important;
    outline: 2px dashed rgba(255, 255, 255, 0.4);
    outline-offset: 4px;
}

.detective-board.linking-mode .clue-item:hover {
    outline-color: #ff4757;
}

.clue-item.link-selected {
    outline: 3px solid #ff4757 !important;
    outline-offset: 4px;
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.8) !important;
    transform: scale(1.08) !important;
    z-index: 100 !important;
}

.clue-item.link-selected .nail-pin {
    background: radial-gradient(circle at 35% 35%, #fff, #ff4757 70%, #900 100%) !important;
    box-shadow: 0 0 16px #ff4757 !important;
    transform: translateX(-50%) scale(1.4) !important;
}

.board-btn-ghost.active {
    background: rgba(255, 71, 87, 0.25) !important;
    border-color: #ff4757 !important;
    color: #ff6b81 !important;
}

/* ================= 6. ЧИПСЫ ВЫБОРА ШТАМПА В МОДАЛКЕ ================= */
.stamp-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.stamp-chip {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stamp-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.stamp-chip.active {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.stamp-chip.chip-suspect.active { border-color: #ff3344; color: #ff3344; background: rgba(255, 51, 68, 0.2); }
.stamp-chip.chip-base.active { border-color: #2ed573; color: #2ed573; background: rgba(46, 213, 115, 0.2); }
.stamp-chip.chip-closed.active { border-color: #c0392b; color: #c0392b; background: rgba(192, 57, 43, 0.2); }
.stamp-chip.chip-no_alibi.active { border-color: #ff793f; color: #ff793f; background: rgba(255, 121, 63, 0.2); }
.stamp-chip.chip-secret.active { border-color: #f1c40f; color: #f1c40f; background: rgba(241, 196, 15, 0.2); }

/* ================= 6.1 КИНЕМАТОГРАФИЧНЫЙ ИНСПЕКТОР УЛИКИ ================= */
.clue-inspector-modal {
    z-index: 10005 !important;
}

.clue-inspector-box {
    max-width: 580px !important;
    width: 92% !important;
    background: rgba(18, 22, 32, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85), 0 0 50px rgba(255, 71, 87, 0.2) !important;
    border-radius: 24px !important;
    padding: 30px !important;
}

.inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    margin-bottom: 20px;
}

.inspector-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ff4757;
    text-transform: uppercase;
}

.inspector-id {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
    font-family: monospace;
}

.inspector-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 520px;
    overflow-y: auto;
    position: relative;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px;
}

.inspector-photo-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.inspector-photo-wrap img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.inspector-photo-wrap .inspector-caption {
    font-size: 15px;
    font-weight: 600;
    color: #f1f2f6;
    text-align: center;
}

.inspector-note-wrap {
    width: 100%;
    min-height: 180px;
    border-radius: 14px;
    padding: 26px 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    position: relative;
}

.inspector-meta {
    margin-top: 18px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.inspector-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-danger-action {
    color: #ff4757 !important;
    border-color: rgba(255, 71, 87, 0.4) !important;
}

.btn-danger-action:hover {
    background: rgba(255, 71, 87, 0.18) !important;
    border-color: #ff4757 !important;
}

/* ПРЯЧЕМ ЭЛЕМЕНТЫ УПРАВЛЕНИЯ ПРИ СНИМКЕ ЭКСПОРТА */
#detectiveBoard.is-exporting .delete-clue-btn,
#detectiveBoard.is-exporting .stamp-clue-btn,
#detectiveBoard.is-exporting .board-fs-hud,
#detectiveBoard.is-exporting .board-linking-banner,
#detectiveBoard.is-exporting .detective-modal,
#detectiveBoard.is-exporting .viewer {
    display: none !important;
}

/* ================= 7. ЗОЛОТОЙ ФОНД ЦИТАТ СКВАДА ================= */
.quotes-section {
    margin-top: 30px;
}

.quotes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quotes-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 480px;
}

.quotes-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    opacity: 0.6;
    pointer-events: none;
}

.quotes-search-box input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.quotes-search-box input:focus {
    border-color: #6db26f;
    background: rgba(0, 0, 0, 0.55);
}

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.quote-card {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 22px 24px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quote-card:hover {
    transform: translateY(-4px);
    border-color: rgba(109, 178, 111, 0.5);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(109, 178, 111, 0.15);
}

.quote-card .quote-mark {
    position: absolute;
    top: 10px;
    right: 18px;
    font-size: 46px;
    line-height: 1;
    font-family: Georgia, serif;
    color: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.quote-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #f1f2f6;
    word-break: break-word;
    position: relative;
    z-index: 2;
}

.quote-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
}

.quote-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quote-author {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quote-author::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6db26f;
    box-shadow: 0 0 8px rgba(109, 178, 111, 0.6);
}

.quote-context {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}

.quote-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-pin-btn {
    background: rgba(109, 178, 111, 0.18);
    border: 1px solid rgba(109, 178, 111, 0.4);
    color: #8be08d;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.quote-pin-btn:hover {
    background: #6db26f;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(109, 178, 111, 0.4);
}

.quote-copy-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quote-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.06);
}

.quote-delete-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s;
}

.quote-delete-btn:hover {
    color: #e74c3c;
}

/* ================= 8. ВСПЛЫВАЮЩИЕ УВЕДОМЛЕНИЯ (ПОЛНОСТЬЮ ОТКЛЮЧЕНЫ) ================= */
.supp-toast,
.auth-toast,
#adminToast,
#suppToast {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* ================= 9. ЖИВОЙ ВИДЖЕТ DISCORD И ПЛАВАЮЩЕЕ ОКНО ================= */
.nav-right-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.discord-online-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.discord-online-pill:hover {
    background: rgba(109, 178, 111, 0.15);
    border-color: #6db26f;
    transform: translateY(-1px);
}

.online-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 10px #2ecc71;
    display: inline-block;
    animation: pulse-online 2s infinite ease-in-out;
}

@keyframes pulse-online {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.discord-popover {
    position: fixed;
    top: 110px;
    right: 28px;
    width: 320px;
    max-height: 480px;
    background: rgba(18, 18, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(109, 178, 111, 0.15);
    border-radius: 22px;
    padding: 18px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-15px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.discord-popover.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.discord-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.popover-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.popover-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}

.popover-close-btn:hover {
    color: #fff;
}

.discord-popover-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 12px;
}

.discord-members-list {
    flex: 1;
    overflow-y: auto;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.discord-members-list::-webkit-scrollbar {
    width: 4px;
}
.discord-members-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.discord-member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.member-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.member-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.member-game {
    font-size: 11px;
    color: #8be08d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-popover-join-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px;
    border-radius: 14px;
    background: #6db26f;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.discord-popover-join-btn:hover {
    background: #5ea160;
}

/* ================= 10. ПЛАВАЮЩИЙ АУДИО-ПЛЕЕР СКВАДА ================= */
.squad-audio-dock {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    background: rgba(18, 18, 24, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(109, 178, 111, 0.12);
    border-radius: 40px;
    padding: 8px 18px 8px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.25s ease;
}

.squad-audio-dock:hover {
    border-color: rgba(109, 178, 111, 0.4);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(109, 178, 111, 0.25);
}

.audio-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #6db26f;
    border: none;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(109, 178, 111, 0.4);
    transition: transform 0.15s ease, background 0.15s;
}

.audio-play-btn:hover {
    transform: scale(1.08);
    background: #7ec780;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.audio-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
}

.audio-wave span {
    width: 3px;
    height: 4px;
    background: #8be08d;
    border-radius: 2px;
    transition: height 0.15s ease;
}

.squad-audio-dock.playing .audio-wave span:nth-child(1) { animation: wave 1s infinite ease-in-out; }
.squad-audio-dock.playing .audio-wave span:nth-child(2) { animation: wave 1s infinite ease-in-out 0.2s; }
.squad-audio-dock.playing .audio-wave span:nth-child(3) { animation: wave 1s infinite ease-in-out 0.4s; }
.squad-audio-dock.playing .audio-wave span:nth-child(4) { animation: wave 1s infinite ease-in-out 0.1s; }

@keyframes wave {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

.audio-controls input[type="range"] {
    width: 65px;
    accent-color: #6db26f;
    cursor: pointer;
}

/* ================= 11. МОБИЛЬНАЯ АДАПТАЦИЯ (TOUCH & RESPONSIVE) ================= */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 40px;
    padding: 10px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
    .navbar {
        height: 70px;
        top: 14px;
        left: 14px;
        right: 14px;
        padding: 0 16px;
    }

    .nav-center {
        position: fixed;
        top: 92px;
        left: 14px;
        right: 14px;
        background: rgba(18, 18, 24, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 20px;
        padding: 22px;
        flex-direction: column;
        gap: 18px;
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.25s ease;
        z-index: 999;
    }

    .nav-center.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .discord-btn {
        min-width: auto;
        padding: 0 14px;
        height: 40px;
    }

    .discord-btn-text {
        display: none;
    }

    .discord-popover {
        top: 90px;
        left: 14px;
        right: 14px;
        width: auto;
    }

    .squad-audio-dock {
        bottom: 16px;
        left: 14px;
        padding: 6px 14px 6px 8px;
    }

    .audio-title {
        font-size: 11px;
    }

    .audio-controls input[type="range"] {
        width: 48px;
    }

    .board-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .board-toolbar-left,
    .board-toolbar-right {
        justify-content: center;
    }

    .detective-board {
        min-height: 480px;
        height: 520px;
    }

    .clue-photo-card {
        width: 140px;
    }

    .clue-note-card {
        width: 130px;
        min-height: 120px;
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    /* Навбар на смартфонах */
    .navbar {
        height: 62px;
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 0 12px;
    }
    .nav-left span {
        font-size: 15px;
    }
    .nav-left img {
        width: 32px;
        height: 32px;
    }
    .stewie-navbar img {
        width: 36px;
    }
    .stewie-navbar .stewie-bubble {
        max-width: 170px !important;
        font-size: 11px !important;
        padding: 6px 10px !important;
    }

    /* Главный экран (Hero) */
    .hero {
        padding: 90px 14px 40px;
        min-height: auto !important;
    }
    .hero-title {
        font-size: clamp(28px, 8.5vw, 42px) !important;
        line-height: 1.15 !important;
    }
    .hero-subtitle {
        font-size: 14px;
        line-height: 1.4;
    }
    .hero-badges {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .hero-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    .mvp-buddy-card {
        padding: 6px 14px 6px 10px;
        max-width: 92vw;
    }
    .mvp-buddy-card .mvp-nick {
        font-size: 13px;
    }
    .mvp-buddy-card .mvp-desc {
        font-size: 10px;
    }

    /* Секции портала */
    .portal-content {
        width: 96%;
        margin: 30px auto 90px;
        gap: 50px;
    }
    .portal-section {
        padding: 22px 14px;
        border-radius: 20px;
    }
    .section-title {
        font-size: 26px !important;
    }
    .section-sub {
        font-size: 13px;
    }

    /* Доска расследований */
    .detective-board {
        min-height: 420px;
        height: 440px;
        border-radius: 18px;
        padding: 12px;
    }
    .starter-case-file {
        width: 240px;
        padding: 18px 14px;
    }
    .starter-case-file .case-title {
        font-size: 13px;
    }
    .starter-case-file .case-desc {
        font-size: 11.5px;
    }
    .board-toolbar-right {
        flex-wrap: wrap;
        gap: 6px;
    }
    .board-btn-ghost {
        font-size: 11px;
        padding: 5px 9px;
    }
    .thread-color-palette {
        padding: 4px 8px;
    }

    /* Цитатник и Правила */
    .quotes-grid, .rules-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
    .quote-card {
        padding: 18px 16px;
        border-radius: 18px;
    }
    .quote-text {
        font-size: 15px;
    }

    /* Модалки */
    .detective-modal-box {
        width: 94vw !important;
        max-width: 94vw !important;
        max-height: 88vh !important;
        padding: 22px 16px !important;
        border-radius: 22px !important;
    }
    .admin-tabs {
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .admin-tab-btn {
        font-size: 11.5px;
        padding: 6px 10px;
        white-space: nowrap;
    }
}

/* ================= 12. СЕКРЕТНЫЙ РЕЖИМ DISCO ================= */
body.disco-mode {
    animation: disco-bg 3s infinite alternate ease-in-out !important;
}

body.disco-mode .clue-item {
    animation: disco-glow 1.5s infinite alternate ease-in-out !important;
}

@keyframes disco-bg {
    0% { filter: hue-rotate(0deg) saturate(1.2); }
    50% { filter: hue-rotate(180deg) saturate(1.8); }
    100% { filter: hue-rotate(360deg) saturate(1.4); }
}

@keyframes disco-glow {
    0% { box-shadow: 0 0 15px #ff7675; }
    50% { box-shadow: 0 0 25px #00cec9; }
    100% { box-shadow: 0 0 20px #fd79a8; }
}

/* ================= 13. АВТОРИЗАЦИЯ DISCORD И АДМИН-ПАНЕЛЬ ================= */
.navbar-auth-area {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.unified-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.auth-online-count {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.auth-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    margin: 0 2px;
}

.login-discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 12px;
    background: #6db26f;
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(109, 178, 111, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.login-discord-btn:hover {
    background: #5ea160;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(109, 178, 111, 0.5);
}

.login-discord-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.user-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 6px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s ease;
    user-select: none;
}

.user-profile-badge:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.owner-glow {
    box-shadow: 0 0 10px #ffd700, 0 0 20px rgba(255, 215, 0, 0.5);
    border: 2px solid #ffd700;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.user-role-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-owner {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.role-member {
    color: #8be08d;
}

.user-dropdown-arrow {
    font-size: 10px;
    opacity: 0.6;
}

/* Выпадающее меню профиля */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 230px;
    background: rgba(18, 18, 24, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.user-dropdown-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.dropdown-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.dropdown-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    transition: all 0.15s ease;
}

.dropdown-btn.admin-btn {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.dropdown-btn.admin-btn:hover {
    background: #ffd700;
    color: #000;
}

.dropdown-btn.logout-btn {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
}

.dropdown-btn.logout-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #ff7675;
}

/* Модалка панели Создателя */
.admin-modal-box {
    max-width: 640px !important;
    max-height: 90vh;
    overflow-y: auto;
    border-color: rgba(255, 215, 0, 0.35) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 215, 0, 0.2) !important;
}

.admin-modal-box::-webkit-scrollbar {
    width: 6px;
}
.admin-modal-box::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

/* Вкладки в админке */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
    overflow-x: auto;
}

.admin-tab-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-tab-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.admin-tab-btn.active {
    background: rgba(255, 215, 0, 0.18);
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.admin-tab-pane {
    display: none;
    animation: admin-fade-in 0.2s ease;
}

.admin-tab-pane.active {
    display: block;
}

@keyframes admin-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Сетка выбора тем */
.theme-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin: 12px 0 18px;
}

.theme-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    padding: 6px;
    user-select: none;
}

.theme-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.theme-card.active {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.45);
}

.theme-card-thumb {
    width: 100%;
    height: 65px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    margin-bottom: 6px;
}

.theme-card-title {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    color: #fff;
}

.theme-card-season {
    font-size: 10px;
    opacity: 0.75;
    color: rgba(255, 255, 255, 0.8);
}

.theme-card.active::after {
    content: '✓ АКТИВНО';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffd700;
    color: #111;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* ================= ГЛОБАЛЬНЫЙ БАННЕР ОБЪЯВЛЕНИЙ ================= */
.server-announcement-banner {
    position: relative;
    z-index: 90;
    max-width: min(1360px, calc(100% - 48px));
    margin: 114px auto -90px;
    padding: 12px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: banner-slide-down 0.35s ease;
}

@keyframes banner-slide-down {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.server-announcement-banner.banner-event {
    background: rgba(46, 213, 115, 0.18);
    border-color: rgba(46, 213, 115, 0.45);
}
.server-announcement-banner.banner-alert {
    background: rgba(255, 121, 63, 0.20);
    border-color: rgba(255, 121, 63, 0.45);
}
.server-announcement-banner.banner-owner {
    background: rgba(255, 215, 0, 0.20);
    border-color: rgba(255, 215, 0, 0.5);
}

.announcement-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
.announcement-badge-icon {
    font-size: 20px;
    flex-shrink: 0;
}
.announcement-dismiss-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: 0.15s ease;
    flex-shrink: 0;
}
.announcement-dismiss-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.admin-badge-icon {
    font-size: 32px;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 20px;
    font-weight: 800;
    color: #ffd700;
}

.stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.admin-actions-section h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.admin-link-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-link-box code {
    color: #8be08d;
    font-size: 12px;
    word-break: break-all;
}

/* ================= 12. ГЛОБАЛЬНЫЙ BLUR-ЗАМОК ВХОДА (ПОЛНОСТЬЮ ОТКЛЮЧЕН) ================= */
.site-lock-overlay,
.site-lock-card {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
    background: rgba(20, 24, 34, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(109, 178, 111, 0.25);
    border-radius: 32px;
    max-width: 440px;
    width: 100%;
    padding: 38px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: lockCardFloat 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes lockCardFloat {
    from { transform: scale(0.9) translateY(24px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.site-lock-icon {
    font-size: 44px;
    width: 84px;
    height: 84px;
    border-radius: 26px;
    background: rgba(109, 178, 111, 0.15);
    border: 1px solid rgba(109, 178, 111, 0.4);
    box-shadow: 0 0 25px rgba(109, 178, 111, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lockPulse 2.5s infinite ease-in-out;
}

.site-lock-icon.icon-warning {
    background: rgba(255, 71, 87, 0.16);
    border-color: rgba(255, 71, 87, 0.45);
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.3);
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(109, 178, 111, 0.25); }
    50% { transform: scale(1.06); box-shadow: 0 0 35px rgba(109, 178, 111, 0.45); }
}

.site-lock-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0;
}

.site-lock-sub {
    font-size: 13px;
    font-weight: 600;
    color: #8be08d;
    margin-top: -8px;
}

.site-lock-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin: 4px 0 8px;
}

.site-lock-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

.site-lock-user-pill img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.site-lock-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.site-lock-login-btn {
    width: 100%;
    height: 52px;
    border-radius: 18px;
    background: #6db26f;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(109, 178, 111, 0.35);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    border: none;
}

.site-lock-login-btn:hover {
    background: #5ea160;
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(109, 178, 111, 0.45);
}

.site-lock-login-btn img {
    width: 22px;
    height: 22px;
}

.site-lock-join-btn {
    background: #5865F2;
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.35);
}
.site-lock-join-btn:hover {
    background: #4752c4;
    box-shadow: 0 14px 38px rgba(88, 101, 242, 0.45);
}

.site-lock-recheck-btn {
    width: 100%;
    height: 46px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.site-lock-recheck-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.site-lock-switch-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
    margin-top: 4px;
}

.site-lock-switch-btn:hover {
    color: #ff7675;
}

/* ================= 14. ГАЛЕРЕЯ: БАЛАНС КРУТОК И МАЯЧОК ================= */
.spins-economy-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.spins-badge-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
}

.spins-count-highlight {
    color: #ffd700;
    font-weight: 800;
    font-size: 15px;
}

.spins-hint-beacon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.2s ease;
    user-select: none;
}

.spins-hint-beacon a {
    color: #8be08d;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.spins-hint-beacon a:hover {
    color: #fff;
}

.spins-hint-beacon.highlight-pulse {
    animation: hintShake 0.4s ease;
    color: #ffd700;
}

@keyframes hintShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.roll-btn.disabled-spins {
    opacity: 0.55;
    background: #4a5568 !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* ================= 1. ЗВУКОВОЙ ТУМБЛЕР В НАВБАРЕ ================= */
.nav-sound-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-sound-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.nav-sound-btn.sound-on {
    border-color: #8be08d;
    box-shadow: 0 0 10px rgba(109, 178, 111, 0.4);
}

.nav-sound-btn .sound-label {
    display: none;
}

/* ================= 2. ЭМОЦИОНАЛЬНЫЙ СТЬЮИ И УГЛОВОЙ ВИДЖЕТ ================= */
.stewie-angry-shake {
    animation: stewieAngryShake 0.65s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes stewieAngryShake {
    0%, 100% { transform: scale(1) rotate(0deg); }
    15% { transform: scale(1.12) rotate(-8deg); filter: drop-shadow(0 0 10px rgba(255, 75, 75, 0.8)); }
    30% { transform: scale(1.12) rotate(8deg); filter: drop-shadow(0 0 12px rgba(255, 75, 75, 0.9)); }
    45% { transform: scale(1.08) rotate(-6deg); }
    60% { transform: scale(1.08) rotate(6deg); }
    75% { transform: scale(1.04) rotate(-3deg); }
}
}

/* ================= 3. ЦВЕТОВЫЕ ТЕМЫ НИТЕЙ ДЛЯ ДОСКИ ================= */
.thread-color-palette {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.45);
    padding: 3px 8px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.thread-color-chip {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.thread-color-chip:hover {
    transform: scale(1.2);
}

.thread-color-chip.active {
    border-color: #fff;
    transform: scale(1.25);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.chip-red { background: #ff3838; }
.chip-green { background: #2ed573; }
.chip-blue { background: #1e90ff; }
.chip-gold { background: #ffd32a; }

.evidence-thread.thread-red {
    stroke: #ff3838;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 6px rgba(255, 56, 56, 0.75));
}

.evidence-thread.thread-green {
    stroke: #2ed573;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 6px rgba(46, 213, 115, 0.75));
}

.evidence-thread.thread-blue {
    stroke: #1e90ff;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 6px rgba(30, 144, 255, 0.75));
}

.evidence-thread.thread-gold {
    stroke: #ffd32a;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 7px rgba(255, 211, 42, 0.85));
}

/* ================= 4. БОНУС СПИНОВ И ЗОЛОТОЙ ДРОП ================= */
.daily-bonus-btn.can-claim {
    background: linear-gradient(135deg, #ffd700, #ff9f43) !important;
    color: #1a1a1a !important;
    font-weight: 800 !important;
    border-color: #ffd700 !important;
    animation: goldPulse 1.8s infinite;
}

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 22px rgba(255, 215, 0, 0.85); transform: scale(1.04); }
}

.secret-screen-flash {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(255, 107, 129, 0.3) 50%, transparent 80%);
    pointer-events: none;
    z-index: 2500;
    animation: secretFlashAnim 0.75s ease-out forwards;
}

@keyframes secretFlashAnim {
    0% { opacity: 0; transform: scale(0.85); }
    30% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0; transform: scale(1.1); }
}

#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2200;
}

/* ================= 5. РЕЖИССЁР СТЬЮИ И КАЗИНО В АДМИНКЕ ================= */
.stewie-moods-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 12px 0 16px;
}

@media(max-width: 600px) {
    .stewie-moods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stewie-mood-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.stewie-mood-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.stewie-mood-card.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.12);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.stewie-mood-thumb {
    width: 44px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto 4px;
    display: block;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.stewie-mood-name {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.stewie-mood-card.active::after {
    content: '★ ВЫБРАН';
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ffd700;
    color: #111;
    font-size: 7px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 4px;
}

/* Фразы Стьюи список */
.stewie-phrase-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin: 3px;
    color: #f1f2f6;
}

.stewie-phrase-del {
    cursor: pointer;
    opacity: 0.6;
    font-weight: bold;
}
.stewie-phrase-del:hover {
    opacity: 1;
    color: #ff6b81;
}

/* Казино тумблеры и промокоды */
.admin-card-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

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

.admin-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.admin-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.admin-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .3s;
    border-radius: 26px;
}
.admin-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .admin-toggle-slider {
    background: linear-gradient(135deg, #ffd700, #ff9f43);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}
input:checked + .admin-toggle-slider:before {
    transform: translateX(22px);
    background-color: #111;
}

/* ================= 6. БРАТОК ДНЯ (ЗАЛ СЛАВЫ) ================= */
.mvp-buddy-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(25, 22, 12, 0.85);
    border: 1px solid rgba(255, 215, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 8px 18px 8px 12px;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 215, 0, 0.25);
    margin: 12px auto 0;
    animation: goldPulse 3s infinite ease-in-out;
    cursor: default;
    user-select: none;
}

.mvp-buddy-card .mvp-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ffd700, #ff9f43);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    flex-shrink: 0;
    overflow: hidden;
}

.mvp-buddy-card .mvp-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.mvp-buddy-card .mvp-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.mvp-buddy-card .mvp-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #ffd700;
    text-transform: uppercase;
}

.mvp-buddy-card .mvp-nick {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.mvp-buddy-card .mvp-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ================= 15. КНОПКА «НАВЕРХ» ================= */
.back-to-top-btn {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(18, 22, 30, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(109, 178, 111, 0.45);
    color: #8be08d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.9);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(109, 178, 111, 0.25);
    user-select: none;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
    background: #6db26f;
    color: #fff;
    border-color: #8be08d;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 12px 30px rgba(109, 178, 111, 0.45);
}

/* ================= 16. БИТВА МЕМОВ (MEME ROYALE / HOT OR NOT) ================= */
.gallery-modes-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto 26px;
    max-width: 680px;
    background: rgba(18, 22, 30, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px;
    border-radius: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.mode-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 10px 18px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    white-space: nowrap;
}

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

.mode-tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(109, 178, 111, 0.3), rgba(46, 213, 115, 0.2));
    border-color: rgba(109, 178, 111, 0.6);
    box-shadow: 0 4px 18px rgba(109, 178, 111, 0.25);
}

.mode-tab-badge {
    background: linear-gradient(135deg, #ffd700, #ff9f43);
    color: #111;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: goldPulse 2s infinite ease-in-out;
}

/* ПАНЕЛЬ БИТВЫ МЕМОВ */
.meme-battle-panel {
    max-width: 960px;
    margin: 0 auto 34px;
    background: rgba(18, 22, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 26px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    animation: fadeInModal 0.3s ease;
}

.battle-header-card {
    text-align: center;
    margin-bottom: 24px;
}

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

.battle-title-row h2 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.battle-streak-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #ffd700;
}

.battle-streak-count {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.battle-desc-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 12px;
    text-align: left;
}

.battle-progress-bar-wrap {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.battle-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6db26f, #2ed573, #ffd700);
    border-radius: 6px;
    transition: width 0.35s ease;
    box-shadow: 0 0 12px rgba(46, 213, 115, 0.5);
}

/* АРЕНА ДУЭЛИ */
.battle-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 18px;
}

.battle-card {
    flex: 1;
    max-width: 400px;
    background: rgba(28, 34, 46, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    user-select: none;
    position: relative;
}

.battle-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(109, 178, 111, 0.8);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(109, 178, 111, 0.35);
}

.battle-card-media-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0f1218;
    overflow: hidden;
}

.battle-card-media-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.battle-card:hover .battle-card-media-wrap img {
    transform: scale(1.05);
}

.battle-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battle-card:hover .battle-card-overlay {
    opacity: 1;
}

.battle-click-prompt {
    font-size: 13px;
    font-weight: 700;
    background: rgba(109, 178, 111, 0.9);
    color: #fff;
    padding: 6px 14px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.battle-card-footer {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(20, 24, 34, 0.95);
}

.battle-card-num {
    font-size: 11px;
    font-weight: 800;
    color: #6db26f;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.battle-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.battle-card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.battle-elo {
    font-weight: 800;
    color: #ffd700;
}

.battle-winrate {
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
}

.battle-vote-btn {
    width: 100%;
    margin-top: 4px;
    background: linear-gradient(135deg, rgba(109, 178, 111, 0.35), rgba(46, 213, 115, 0.25));
    border: 1px solid rgba(109, 178, 111, 0.6);
    color: #fff;
    padding: 10px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.battle-vote-btn:hover {
    background: #6db26f;
    box-shadow: 0 4px 15px rgba(109, 178, 111, 0.4);
    transform: translateY(-2px);
}

/* ЦЕНТРАЛЬНЫЙ РАЗДЕЛИТЕЛЬ VS */
.battle-center-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    user-select: none;
}

.battle-vs-badge {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.65), 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.4);
    animation: goldPulse 2.4s infinite ease-in-out;
}

.battle-skip-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.battle-skip-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.battle-keyboard-hints {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

/* АНИМАЦИИ УДАРА / РЕЗУЛЬТАТА */
.battle-card.winner-punch {
    border-color: #2ed573 !important;
    box-shadow: 0 0 35px rgba(46, 213, 115, 0.8), 0 0 15px #2ed573 !important;
    transform: scale(1.04) !important;
}

.battle-card.loser-fade {
    opacity: 0.3 !important;
    transform: scale(0.96) !important;
    filter: grayscale(60%) !important;
}

/* ПЛАШКА РЕАКЦИИ СТЬЮИ */
.battle-reaction-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 18px;
    border-radius: 20px;
    margin-top: 10px;
    animation: fadeInModal 0.25s ease;
}

.battle-stewie-av {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.battle-stewie-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.battle-stewie-bubble {
    font-size: 13px;
    font-weight: 600;
    color: #ffd700;
    font-style: italic;
}

/* ПАНЕЛЬ ТОП-РЕЙТИНГА МЕМОВ */
.meme-top-panel {
    max-width: 960px;
    margin: 0 auto 34px;
    background: rgba(18, 22, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 26px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    animation: fadeInModal 0.3s ease;
}

.top-tabs-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.top-tab-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.top-tab-btn.active {
    background: rgba(109, 178, 111, 0.25);
    border-color: #6db26f;
    color: #fff;
    box-shadow: 0 4px 15px rgba(109, 178, 111, 0.25);
}

.top-tab-btn.btn-worst.active {
    background: rgba(255, 71, 87, 0.25);
    border-color: #ff4757;
    color: #ff6b81;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.25);
}

.top-desc-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 18px;
}

.top-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-meme-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(25, 30, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.top-meme-row:hover {
    background: rgba(35, 42, 58, 0.9);
    border-color: rgba(109, 178, 111, 0.5);
    transform: translateX(4px);
}

.top-rank-badge {
    font-size: 16px;
    font-weight: 900;
    width: 34px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.top-rank-1 { color: #ffd700; font-size: 20px; }
.top-rank-2 { color: #dfe4ea; font-size: 18px; }
.top-rank-3 { color: #cd7f32; font-size: 18px; }

.top-meme-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f1218;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.top-meme-details {
    flex: 1;
    min-width: 0;
}

.top-meme-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-meme-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.top-meme-stats {
    text-align: right;
    flex-shrink: 0;
}

.top-meme-elo-score {
    font-size: 16px;
    font-weight: 900;
    color: #ffd700;
}

.top-meme-winrate-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}

@media(max-width: 768px) {
    .battle-arena {
        flex-direction: column;
        gap: 14px;
    }
    .battle-card {
        max-width: 100%;
        width: 100%;
    }
    .battle-center-divider {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
    .battle-vs-badge {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }
}




