/* ==========================================================================
   1. ОБЩИЕ OLED НАСТРОЙКИ, АНИМАЦИИ И НЕОНОВЫЕ ПЕРЕМЕННЫЕ NEXUS
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #050505; /* Абсолютный бархатно-чёрный OLED фон */
    color: #e5e5e5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.max-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
    position: relative;
    z-index: 1;
}

.flex-1 { flex: 1; }

/* ДИНАМИЧЕСКИЕ СВЕТЯЩИЕСЯ АКЦЕНТЫ РАЗДЕЛОВ */
.text-kinema { color: #eab308 !important; }
.text-gaming { color: #ef4444 !important; }
.text-music { color: #22d3ee !important; }

.bg-kinema { background-color: #eab308 !important; }
.bg-gaming { background-color: #ef4444 !important; }
.bg-music { background-color: #22d3ee !important; }

.border-kinema { border-color: #eab308 !important; }
.border-gaming { border-color: #ef4444 !important; }
.border-music { border-color: #22d3ee !important; }

.text-black { color: #000000 !important; }

/* ==========================================================================
   ИДЕЯ 8: ЕДИНЫЙ АНИМИРОВАННЫЙ ФОН "СЕВЕРНОЕ СИЯНИЕ"
   Один фиксированный слой, живёт над body, под контентом, не перезапускается
   при переходах между Hub/Kinema/Gaming/Music.
   ========================================================================== */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #050505;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    /* убрали will-change — он тут скорее вредит */
}

.aurora-yellow {
    width: 40vw;
    height: 40vw;
    background: #eab308;
    top: -10%;
    left: -10%;
    animation: auroraFloatA 40s ease-in-out infinite alternate;
}

.aurora-red {
    width: 38vw;
    height: 38vw;
    background: #ef4444;
    bottom: -15%;
    right: -10%;
    animation: auroraFloatB 50s ease-in-out infinite alternate;
}

.aurora-cyan {
    width: 35vw;
    height: 35vw;
    background: #22d3ee;
    top: 30%;
    left: 40%;
    animation: auroraFloatC 60s ease-in-out infinite alternate;
}

@keyframes auroraFloatA {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(15vw, 10vh) scale(1.15); }
    100% { transform: translate(5vw, 25vh) scale(0.95); }
}

@keyframes auroraFloatB {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-18vw, -8vh) scale(1.1); }
    100% { transform: translate(-6vw, -22vh) scale(0.9); }
}

@keyframes auroraFloatC {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-12vw, 12vh) scale(1.2); }
    100% { transform: translate(10vw, -10vh) scale(0.95); }
}

/* ==========================================================================
   2. КНОПКИ ЭВАКУАЦИИ БАЗЫ ДАННЫХ (ВЕРХНЯЯ ПАНЕЛЬ ХАБА)
   ========================================================================== */
.backup-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.btn-backup {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    color: #a1a1aa;
    transition: all 0.2s ease;
    display: inline-block;
    user-select: none;
}

.btn-backup:hover {
    color: #fff;
    border-color: #52525b;
    background: #141414;
}

.btn-migrate {
    border-color: #22d3ee;
    color: #22d3ee;
}
.btn-migrate:hover {
    background: #0a2530;
    border-color: #22d3ee;
    color: #67e8f9;
}
.btn-migrate:disabled {
    opacity: 0.5;
    cursor: wait;
    color: #71717a;
    border-color: #27272a;
}
/* ==========================================================================
   3. ГЛАВНЫЙ ЭКРАН УПРАВЛЕНИЯ (NEXUS HUB) И НЕОНОВЫЕ ПЛИТКИ
   ========================================================================== */
.hub-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.hub-title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 48px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15), 0 0 40px rgba(161, 161, 170, 0.1);
    user-select: none;
}

.hub-tiles {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 420px;
}

.tile-btn {
    background-color: #0c0c0e;
    border: 2px solid #1f1f23;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                border-color 0.3s ease, 
                box-shadow 0.3s ease;
}

.tile-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.08em;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* ЗАЖИГАНИЕ НЕОНА КНОПОК ПРИ НАВЕДЕНИИ КУРСОРA */
.tile-kinema .tile-text { color: #856404; }
.tile-kinema:hover { transform: scale(1.08); border-color: #eab308; box-shadow: 0 0 25px rgba(234, 179, 8, 0.35); }
.tile-kinema:hover .tile-text { color: #eab308; text-shadow: 0 0 10px rgba(234, 179, 8, 0.5); }

.tile-gaming .tile-text { color: #721c24; }
.tile-gaming:hover { transform: scale(1.08); border-color: #ef4444; box-shadow: 0 0 25px rgba(239, 68, 68, 0.35); }
.tile-gaming:hover .tile-text { color: #ef4444; text-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }

.tile-music .tile-text { color: #0f4c5c; }
.tile-music:hover { transform: scale(1.08); border-color: #22d3ee; box-shadow: 0 0 25px rgba(34, 211, 238, 0.35); }
.tile-music:hover .tile-text { color: #22d3ee; text-shadow: 0 0 10px rgba(34, 211, 238, 0.5); }
/* ==========================================================================
   4. ВНУТРЕННИЕ ШАПКИ РАЗДЕЛОВ, НАВИГАЦИЯ И ПОИСКОВЫЕ ЭЛЕМЕНТЫ
   ========================================================================== */
.section-view {
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto 30px;
    border-bottom: 1px solid #1f1f23;
    padding: 20px 20px 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-back {
    background: #141414;
    border: 1px solid #27272a;
    border-radius: 6px;
    padding: 6px 12px;
    color: #a1a1aa;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover, .btn-back.active {
    color: #fff;
    border-color: #52525b;
}

.section-logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.section-nav {
    display: flex;
    gap: 20px;
}

.section-nav button {
    background: none;
    border: none;
    color: #52525b;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.section-nav button.active {
    color: #fff !important;
    border-bottom: 2px solid #fff;
    padding-bottom: 4px;
}

.search-box {
    max-width: 850px;
    margin: 0 auto 40px;
    display: flex;
    gap: 12px;
}

.search-box input {
    flex: 1;
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    border-radius: 8px;
    padding: 14px 20px;
    color: white;
    font-size: 15px;
    outline: none;
}

.search-box input:focus { border-color: #3f3f46; }

.search-box button {
    border: none;
    border-radius: 8px;
    padding: 0 24px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.search-box .btn-link {
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    padding: 0 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
}

.search-box .btn-manual {
    background: #1c1c1e;
    border: 1px solid #27272a;
    color: #fff;
    padding: 0 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
}
/* ==========================================================================
   5. СЕТКИ МЕДИА-КАРТОЧЕК, ОБЛОЖКИ И БАЗОВЫЕ ИНДИКАТОРЫ РЕЙТИНГА
   ========================================================================== */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    width: 100%;
}

.media-card {
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    border-radius: 12px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.media-card:hover {
    border-color: #3f3f46;
    transform: translateY(-4px);
}

.poster-container {
    width: 100%;
    height: 230px;
    border-radius: 8px;
    overflow: hidden;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #000;
    text-transform: uppercase;
}

.base-rating-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(5,5,5,0.85);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    z-index: 2;
    border: 1px solid #1f1f23;
}

.media-card .title {
    font-size: 14px;
    font-weight: 700;
    margin-top: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ИДЕЯ 2: нормальный отступ между типом и исполнителем/студией/платформой */
.media-card .sub-line {
    font-size: 11px;
    color: #71717a;
    font-weight: 600;
    margin-top: 6px;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.media-card .sub-line .sub-type { color: #a1a1aa; }
.media-card .sub-line .sub-sep { color: #3f3f46; }
.media-card .sub-line .sub-author { color: #a1a1aa; }

.media-card .info-line {
    font-size: 11px;
    color: #52525b;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

.card-badges {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    font-weight: 700;
    border-top: 1px solid #1f1f23;
    padding-top: 6px;
}
/* ==========================================================================
   6. ДАШБОРДЫ СТАТИСТИКИ, БОКОВЫЕ ПАНЕЛИ И ПУЛЬСИРУЮЩИЕ СТАТУСЫ
   ========================================================================== */
.dashboard-bar {
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.stat-flex { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-item { font-size: 13px; font-weight: 700; color: #a1a1aa; }
.stat-item span { color: #fff; font-weight: 800; margin-left: 4px; }
.filter-controls { display: flex; gap: 12px; align-items: center; }

.filter-controls input, .filter-controls select {
    background: #050505; border: 1px solid #1f1f23; border-radius: 6px;
    padding: 8px 12px; color: #fff; font-size: 13px; outline: none;
}
.filter-controls select { background: #0c0c0e; cursor: pointer; }

/* ТРЕХБЛОЧНАЯ OLED СТРУКТУРА МАКЕТА */
.mylist-layout { display: flex; gap: 24px; align-items: flex-start; width: 100%; }
.status-sidebar { width: 180px; display: flex; flex-direction: column; gap: 6px; background: #0c0c0e; border: 1px solid #1f1f23; border-radius: 12px; padding: 10px; flex-shrink: 0; }

.btn-status {
    background: none; border: none; padding: 10px 12px; text-align: left; color: #71717a;
    font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 6px; display: flex; align-items: center; gap: 10px; transition: all 0.2s ease; width: 100%;
}
.btn-status:hover { background: #141414; color: #fff; }
.btn-status.active { background: #1c1c1e; color: #fff; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-all { background: #a1a1aa; }
.dot-watching { background: #22c55e; animation: pulseGlow 2s infinite; }
.dot-planned { background: #eab308; }
.dot-completed { background: #a855f7; }
.dot-fav { background: #ef4444; }

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.6; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(1); opacity: 0.6; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* СТИЛИ ТВОЕГО НОВОГО ИЗОЛИРОВАННОГО ПРАВОГО БОКОВОГО ОЛИМПА */
.right-olimp-sidebar {
    width: 240px;
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    border-radius: 12px;
    padding: 16px;
    flex-shrink: 0;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.01);
}

.olimp-sidebar-title {
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 0.08em;
    color: #fff;
    text-transform: uppercase;
}

.olimp-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.olimp-sidebar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #050505;
    border: 1px solid #141416;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.olimp-sidebar-row:hover {
    border-color: #3f3f46;
}

.olimp-row-num {
    font-size: 14px;
    font-weight: 900;
    color: #eab308;
    min-width: 16px;
    text-align: center;
}

.olimp-row-poster {
    width: 36px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    background: #141414;
    border: 1px solid #1f1f23;
    flex-shrink: 0;
}

.olimp-row-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.olimp-row-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.olimp-row-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.olimp-row-meta {
    font-size: 10px;
    color: #52525b;
    font-weight: 600;
}

.olimp-row-score {
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

/* ==========================================================================
   7. УНИВЕРСАЛЬНЫЕ OLED МОДАЛЬНЫЕ ОКНА И ДНЕВНИК С ЭМОДЗИ-ПОПАПОМ
   ИДЕЯ 7: фон модалки подкрашивается в основной цвет постера.
   ИДЕЯ 1: адаптивная раскладка постера.
   ========================================================================== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; display: none; }

/* ИДЕЯ 7: переменная --modal-tint задаётся из JS при открытии модалки */
#global-media-modal .modal-content {
    background: radial-gradient(circle at top left, var(--modal-tint, rgba(12,12,14,0.0)) 0%, #050505 55%);
    background-color: #050505;
    border: 1px solid #1f1f23;
    border-radius: 16px;
    max-width: 750px;
    width: 100%;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    transition: max-width 0.25s ease;
}

/* ИДЕЯ 1: модалка слегка растягивается, если постер широкий */
#global-media-modal .modal-content.modal-wide { max-width: 950px; }

.form-modal-width { max-width: 550px; }
.close-btn { position: absolute; top: 20px; right: 20px; background: none; border: none; color: #71717a; font-size: 28px; cursor: pointer; transition: color 0.2s ease; z-index: 5; }
.close-btn:hover { color: #fff; }

.modal-flex { display: flex; gap: 32px; align-items: flex-start; }

/* ИДЕЯ 1: базовая рамка постера теперь без жёстких размеров и без overflow:hidden.
   Размеры задаются классами .poster-tall / .poster-wide / .poster-ultra, которые
   вешает JS при открытии модалки, исходя из реальных пропорций картинки. */
.modal-poster-block {
    border-radius: 12px;
    overflow: hidden;
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    flex-shrink: 0;
    display: inline-block;
    max-width: 260px;
    line-height: 0;
    font-size: 0;
}

.modal-poster-block img {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
}

.modal-poster-block .poster-placeholder {
    width: 200px;
    height: 290px;
    font-size: 13px;
    line-height: 1.4;
}

.modal-poster-block.poster-tall { max-width: 240px; }
.modal-poster-block.poster-wide { max-width: 320px; }

.modal-flex.modal-stacked {
    flex-direction: column;
    gap: 20px;
}
.modal-flex.modal-stacked .modal-poster-block {
    display: block;
    width: 100%;
    max-width: 100%;
}
.modal-flex.modal-stacked .modal-poster-block img {
    max-height: 45vh;
    margin: 0 auto;
}
.modal-flex.modal-stacked .modal-poster-block .poster-placeholder {
    width: 100%;
    height: 240px;
}

.modal-info-side { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.modal-info-side h2 { font-size: 26px; font-weight: 900; letter-spacing: 0.02em; }

/* ИДЕЯ 2: строка под названием в модалке — тип + исполнитель/студия/платформа */
.modal-subline {
    font-size: 12px;
    font-weight: 700;
    color: #a1a1aa;
    letter-spacing: 0.05em;
    margin: 6px 0 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.modal-subline .sub-type { color: #d4d4d8; text-transform: uppercase; }
.modal-subline .sub-sep { color: #3f3f46; }
.modal-subline .sub-author { color: #a1a1aa; }

#m-meta { font-size: 12px; color: #52525b; font-weight: 700; text-transform: uppercase; margin: 6px 0 16px; letter-spacing: 0.05em; }
.desc-text { color: #a1a1aa; font-size: 13px; line-height: 1.6; margin-bottom: 20px; max-height: 100px; overflow-y: auto; padding-right: 6px; }

/* ШКАЛА ЗВЕЗД И ЭМОДЗИ-ДНЕВНИК
   ИДЕЯ 6: контейнер звёзд строго ограничен по ширине — ползунок не выходит
   за пределы звёзд, число справа совпадает с визуалом. */
.stars-row { width: 100%; margin-bottom: 8px; }

.stars-touch-container {
    font-size: 28px;
    color: #1f1f23;
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
    user-select: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
    max-width: 100%;
}
.stars-bg-touch { display: inline-block; white-space: nowrap; }
.stars-fg-glow {
    display: inline-block;
    color: #eab308;
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}

.notes-panel { background: #0c0c0e; border: 1px solid #1f1f23; border-radius: 10px; padding: 14px; margin-bottom: 20px; position: relative; }
.notes-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.notes-header label { font-size: 11px; font-weight: 700; color: #71717a; text-transform: uppercase; }
.emoji-trigger-btn { background: #1c1c1e; border: 1px solid #27272a; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 14px; }
.emoji-picker-popup { position: absolute; top: 40px; right: 14px; background: #141414; border: 1px solid #27272a; border-radius: 8px; padding: 8px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; z-index: 10; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.emoji-option { font-size: 18px; cursor: pointer; padding: 4px; border-radius: 4px; text-align: center; }
.emoji-option:hover { background: #27272a; }
.notes-panel textarea { width: 100%; background: #050505; border: 1px solid #1f1f23; border-radius: 6px; padding: 10px; color: #fff; font-size: 13px; line-height: 1.5; outline: none; resize: none; height: 60px; }

.modal-actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.btn-action { background: #0c0c0e; border: 1px solid #1f1f23; color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 12px; cursor: pointer; transition: all 0.2s ease; }
.btn-action:hover { background: #141414; border-color: #3f3f46; }
.btn-fav-active { border-color: #ef4444 !important; color: #ef4444 !important; background: rgba(239, 68, 68, 0.05) !important; }
.btn-olimp-active { border-color: #eab308 !important; color: #eab308 !important; background: rgba(234, 179, 8, 0.05) !important; }
.btn-edit-color:hover { border-color: #3b82f6; color: #3b82f6; }
.btn-delete-color:hover { background: #2d1316; border-color: #ef4444; color: #ef4444; }
/* ==========================================================================
   8. АККОРДЕОНЫ, СОУЛС-БОССЫ, ВЫЕЗЖАЮЩИЕ ПАНЕЛИ МУЗЫКИ И ТИР-ЛИСТЫ
   ========================================================================== */
.nested-accordion-box { margin-top: 24px; border-top: 1px solid #1f1f23; padding-top: 20px; }
.accordion-header { background: #0c0c0e; border: 1px solid #1f1f23; padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; user-select: none; }
.accordion-header:hover { border-color: #27272a; }
.accordion-header > div:first-child { flex: 1; }

/* ИДЕЯ 5: справа в строке OVA/спешла — средний балл серий этого блока (на итог не влияет) */
.accordion-avg-badge {
    font-size: 12px;
    font-weight: 800;
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 6px;
    padding: 3px 8px;
    margin-right: 12px;
    white-space: nowrap;
}
.accordion-arrow { color: #71717a; }

.accordion-content { display: none; padding: 10px; border: 1px solid #1f1f23; border-top: none; border-radius: 0 0 8px 8px; background: #070708; margin-bottom: 12px; }
.nested-unit-row { display: flex; align-items: center; justify-content: space-between; background: #0c0c0e; padding: 10px 14px; border-radius: 6px; border: 1px solid #1f1f23; margin-bottom: 6px; }
.slider-input-item { flex: 1; margin: 0 16px; accent-color: #eab308; cursor: pointer; }
.unit-val-display { font-weight: 700; min-width: 45px; text-align: right; font-size: 13px; }

.score-row-display { background: #0c0c0e; border: 1px solid #1f1f23; border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.music-rzt-panel { display: flex; gap: 20px; background: #050505; border: 1px solid #1f1f23; border-radius: 6px; padding: 14px; margin-top: 6px; flex-wrap: wrap; }
.music-base-side { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid #1f1f23; padding-right: 20px; }
.music-vibe-side { width: 220px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.music-crit-slider-line { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.music-crit-slider-line div { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: #71717a; }
.music-crit-slider-line input { width: 100%; accent-color: #22d3ee; margin-top: 2px; cursor: pointer; }

/* ЭНЦИКЛОПЕДИЯ АРТИСТОВ — используется как образец и для студий (ИДЕЯ 4) */
.artist-card { background: #0c0c0e; border: 1px solid #1f1f23; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: all 0.2s ease; cursor: pointer; }
.artist-card:hover { border-color: #22d3ee; transform: translateY(-4px); }
.artist-badge-type { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 8px; background: #141414; border-radius: 6px; width: fit-content; color: #a1a1aa; }
.artist-scores { margin-top: auto; border-top: 1px solid #1f1f23; padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.group-members-box { margin-top: 14px; background: #0c0c0e; border: 1px solid #1f1f23; border-radius: 10px; padding: 12px; }
.member-row-line { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; padding: 6px 0; border-bottom: 1px solid #141414; }
.member-row-line:last-child { border-bottom: none; }
.member-dot-icon { width: 6px; height: 6px; background: #22d3ee; border-radius: 50%; box-shadow: 0 0 8px #22d3ee; }

/* ИДЕЯ 4: карточка студии (Kinema — жёлтая рамка, Gaming — красная) */
.studio-card {
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.studio-card:hover { transform: translateY(-4px); }
.studio-card.studio-kinema:hover { border-color: #eab308; }
.studio-card.studio-gaming:hover { border-color: #ef4444; }

.studio-card .studio-logo {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    background: #050505;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #000;
    text-transform: uppercase;
    font-size: 16px;
    text-align: center;
    padding: 8px;
}
.studio-card .studio-logo img { width: 100%; height: 100%; object-fit: contain; background: #050505; }
.studio-card .studio-name { font-size: 15px; font-weight: 800; color: #fff; }
.studio-card .studio-meta { font-size: 11px; color: #71717a; display: flex; flex-direction: column; gap: 3px; }
.studio-card .studio-meta .studio-stat { display: flex; justify-content: space-between; }
.studio-card .studio-meta .studio-stat b { color: #a1a1aa; font-weight: 700; }

/* ЗАЛ СЛАВЫ, ФРАНШИЗЫ И TIER LIST */
.hall-fame-box { background: #0c0c0e; border: 1px solid #22d3ee; border-radius: 12px; padding: 16px; margin-bottom: 24px; }
.hall-fame-box h4 { font-size: 11px; color: #22d3ee; text-transform: uppercase; margin-bottom: 12px; font-weight: 800; letter-spacing: 0.05em; }
.hall-tracks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.hall-track-card { background: #050505; border: 1px solid #1f1f23; padding: 10px 14px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; border-left: 3px solid #22d3ee; }

.franchise-box-wrapper { margin-top: 16px; background: #0c0c0e; border: 1px solid #1f1f23; border-radius: 10px; padding: 14px; }
.franchise-title { font-size: 11px; font-weight: 700; color: #71717a; text-transform: uppercase; margin-bottom: 10px; }
.franchise-horizontal-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.franchise-mini-card { width: 70px; text-align: center; cursor: pointer; flex-shrink: 0; }
.franchise-mini-poster { width: 70px; height: 95px; border-radius: 4px; overflow: hidden; background: #050505; border: 1px solid #1f1f23; }
.franchise-mini-poster img { width: 100%; height: 100%; object-fit: cover; }
.franchise-mini-title { font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }

.tier-rows-wrapper { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.tier-row-item { display: flex; background: #0c0c0e; border: 1px solid #1f1f23; min-height: 90px; border-radius: 8px; overflow: hidden; }
.tier-label-zone { width: 110px; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #000; font-size: 18px; text-align: center; padding: 10px; cursor: pointer; word-break: break-word; }
.tier-items-drop-zone { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; align-items: center; transition: background 0.2s ease; }
.tier-items-drop-zone.drag-over { background: rgba(255,255,255,0.03); }
.tier-item-token { width: 55px; height: 75px; border-radius: 6px; overflow: hidden; cursor: grab; background: #141414; border: 1px solid #27272a; }
.tier-item-token img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tier-item-token-text { font-size: 7px; font-weight: 800; color: #fff; text-transform: uppercase; text-align: center; padding: 4px; height: 100%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.tier-delete-btn {
    width: 32px;
    background: transparent;
    border: none;
    border-left: 1px solid #1f1f23;
    color: #52525b;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.tier-delete-btn:hover {
    background: #2d1316;
    color: #ef4444;
}
.tier-pool-box { background: #0c0c0e; padding: 16px; border-radius: 12px; border: 1px solid #1f1f23; }
.tier-pool-box h4 { font-size: 11px; color: #52525b; text-transform: uppercase; margin-bottom: 12px; font-weight: 800; letter-spacing: 0.05em; }
.tier-pool-zone { display: flex; flex-wrap: wrap; gap: 10px; min-height: 60px; }

.form-scroll-area { max-height: 60vh; overflow-y: auto; padding-right: 8px; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 11px; color: #71717a; margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.form-group input, .form-group textarea, .form-group select { width: 100%; background: #0c0c0e; border: 1px solid #1f1f23; border-radius: 6px; padding: 10px 14px; color: white; font-size: 14px; outline: none; }
.form-row-flex { display: flex; gap: 10px; }
/* ==========================================================================
   ПЛАВАЮЩИЕ СКРОЛЛБАРЫ (везде: страница, модалки, формы, панели)
   ========================================================================== */

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #3f3f46 transparent;
}

/* Chrome / Edge / Safari / Opera */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: transparent;
    border: none;
}

::-webkit-scrollbar-thumb {
    background-color: #3f3f46;
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
    transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #52525b;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:active {
    background-color: #71717a;
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Уголки между горизонтальным и вертикальным скроллами */
::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}
/* ==========================================================================
   ИСТОЧНИКИ ПОИСКА (кнопки-переключатели на Discover)
   ========================================================================== */
.source-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: -20px auto 24px;
    max-width: 850px;
}

.source-btn {
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    border-radius: 8px;
    padding: 8px 16px;
    color: #71717a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.source-btn:hover {
    border-color: #3f3f46;
    color: #a1a1aa;
}

.source-btn.active {
    background: #1c1c1e;
    border-color: #52525b;
    color: #fff;
}

/* Цвет активной кнопки зависит от раздела */
#kinema-source-buttons .source-btn.active {
    border-color: #eab308;
    color: #eab308;
    background: rgba(234, 179, 8, 0.08);
}
#gaming-source-buttons .source-btn.active {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}
#music-source-buttons .source-btn.active {
    border-color: #22d3ee;
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.08);
}

/* ==========================================================================
   АТРИБУЦИЯ ИСТОЧНИКА (мелкая строчка под результатами)
   ========================================================================== */
.source-attribution {
    font-size: 11px;
    color: #52525b;
    text-align: right;
    margin-top: 16px;
    font-weight: 600;
    padding-right: 4px;
}
.source-attribution a {
    color: #71717a;
    text-decoration: none;
    border-bottom: 1px dashed #3f3f46;
    transition: color 0.2s ease;
}
.source-attribution a:hover {
    color: #a1a1aa;
    border-color: #71717a;
}

/* ==========================================================================
   КАРТОЧКИ РЕЗУЛЬТАТОВ ПОИСКА (с кнопкой "Добавить")
   ========================================================================== */
.search-result-card {
    background: #0c0c0e;
    border: 1px solid #1f1f23;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.2s ease;
}
.search-result-card:hover {
    border-color: #3f3f46;
    transform: translateY(-4px);
}

.search-result-poster {
    width: 100%;
    height: 230px;
    border-radius: 8px;
    overflow: hidden;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.search-result-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-result-poster .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #000;
    text-transform: uppercase;
}

.search-result-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(5,5,5,0.85);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    z-index: 2;
    border: 1px solid #1f1f23;
    color: #facc15;
}

.search-result-title {
    font-size: 14px;
    font-weight: 700;
    margin-top: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}
.search-result-sub {
    font-size: 11px;
    color: #71717a;
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 15px;
}
.search-result-sub .sub-sep { color: #3f3f46; }

.search-result-add {
    margin-top: 10px;
    padding: 8px 12px;
    background: #1c1c1e;
    border: 1px solid #27272a;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}
.search-result-add:hover {
    background: #27272a;
    border-color: #52525b;
}
.search-result-add.added {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
    cursor: default;
}

/* Индикатор загрузки поиска */
.search-loading {
    text-align: center;
    padding: 40px 20px;
    color: #71717a;
    font-size: 14px;
    font-weight: 600;
}
.search-loading::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 8px;
    border-radius: 50%;
    background: #71717a;
    animation: searchPulse 1.2s infinite;
}
@keyframes searchPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.search-empty {
    text-align: center;
    padding: 40px 20px;
    color: #52525b;
    font-size: 13px;
    font-weight: 600;
}