/* === 1. ГЛОБАЛЬНЫЕ НОВОГОДНИЕ ЭФФЕКТЫ === */

/* Снег на фоне */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    color: #fff;
    font-size: 1em;
    text-shadow: 0 0 5px #000;
    user-select: none;
    z-index: 1000;
    animation-name: fall, shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
}

@keyframes fall { 0% { top: -10%; } 100% { top: 100%; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(20px); } }

/* === НОВАЯ РЕАЛИСТИЧНАЯ ГИРЛЯНДА === */
.light-rope {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    position: fixed;
    z-index: 2000;
    margin: -15px 0 0 0;
    padding: 0;
    pointer-events: none; /* Чтобы можно было кликать сквозь гирлянду */
    width: 100%;
    display: flex;
    justify-content: center;
}

.light-rope li {
    position: relative;
    animation-fill-mode: both;
    animation-iteration-count: infinite;
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 14px;
    height: 30px;
    border-radius: 50%;
    margin: 20px;
    background: #fff;
    box-shadow: 0px 4.66667px 24px 3px rgba(255, 255, 255, 1);
    animation-name: flash-1;
    animation-duration: 2s;
    flex-shrink: 0;
    /* ВАЖНО: Делаем лампочки кликабельными */
    pointer-events: auto; 
    cursor: pointer;
    transition: transform 0.2s;
}

/* Эффект нажатия на лампочку */
.light-rope li:active {
    transform: scale(0.9);
}

/* Цоколь лампочки */
.light-rope li:before {
    content: "";
    position: absolute;
    background: #222;
    width: 12px;
    height: 10px;
    border-radius: 3px;
    top: -5px;
    left: 1px;
}

/* Провод (дуга) */
.light-rope li:after {
    content: "";
    top: -20px;
    left: 10px;
    position: absolute;
    width: 55px;
    height: 20px;
    border-bottom: solid #222 2px;
    border-radius: 50%;
    pointer-events: none;
}

/* Прячем провод у последней лампы */
.light-rope li:last-child:after {
    content: none;
}

/* АДАПТИВНОСТЬ ГИРЛЯНДЫ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 768px) {
    .light-rope {
        margin: -10px 0 0 0;
    }
    .light-rope li {
        width: 10px;
        height: 22px;
        margin: 12px;
        box-shadow: 0px 2px 12px 2px rgba(255, 255, 255, 1);
    }
    .light-rope li:before {
        width: 8px;
        height: 7px;
        top: -3px;
        left: 1px;
    }
    .light-rope li:after {
        top: -15px;
        left: 6px;
        width: 35px;
        height: 15px;
        border-bottom: solid #222 1.5px;
    }
}

/* Цвета по умолчанию (5n cycle) */
.light-rope li:nth-child(5n+1) {
    background: #00ffff;
    box-shadow: 0px 5px 24px 3px rgba(0, 255, 255, 0.5);
    animation-name: flash-1;
    animation-duration: 3s;
}
.light-rope li:nth-child(5n+2) {
    background: #ff00ff;
    box-shadow: 0px 5px 24px 3px rgba(255, 0, 255, 0.5);
    animation-name: flash-2;
    animation-duration: 4s;
}
.light-rope li:nth-child(5n+3) {
    background: #ff3333;
    box-shadow: 0px 5px 24px 3px rgba(255, 50, 50, 0.5);
    animation-name: flash-3;
    animation-duration: 3.5s;
}
.light-rope li:nth-child(5n+4) {
    background: #ffcc00;
    box-shadow: 0px 5px 24px 3px rgba(255, 204, 0, 0.5);
    animation-name: flash-1;
    animation-duration: 2.5s;
}
.light-rope li:nth-child(5n+5) {
    background: #00ff00;
    box-shadow: 0px 5px 24px 3px rgba(0, 255, 0, 0.5);
    animation-name: flash-2;
    animation-duration: 4.5s;
}

/* --- ИНТЕРАКТИВНОСТЬ ГИРЛЯНДЫ (ПЕРЕОПРЕДЕЛЕНИЕ ЦВЕТОВ) --- */
/* Используем !important, чтобы перебить nth-child селекторы выше */

.light-rope.blink-cyan li {
    background: #00ffff !important;
    box-shadow: 0px 5px 24px 3px rgba(0, 255, 255, 0.5) !important;
    animation-name: flash-1 !important;
}

.light-rope.blink-magenta li {
    background: #ff00ff !important;
    box-shadow: 0px 5px 24px 3px rgba(255, 0, 255, 0.5) !important;
    animation-name: flash-2 !important;
}

.light-rope.blink-red li {
    background: #ff3333 !important;
    box-shadow: 0px 5px 24px 3px rgba(255, 50, 50, 0.5) !important;
    animation-name: flash-3 !important;
}

.light-rope.blink-yellow li {
    background: #ffcc00 !important;
    box-shadow: 0px 5px 24px 3px rgba(255, 204, 0, 0.5) !important;
    animation-name: flash-1 !important;
}

.light-rope.blink-green li {
    background: #00ff00 !important;
    box-shadow: 0px 5px 24px 3px rgba(0, 255, 0, 0.5) !important;
    animation-name: flash-2 !important;
}

/* Анимация мерцания */
@keyframes flash-1 { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes flash-2 { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes flash-3 { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
/* === КОНЕЦ ГИРЛЯНДЫ === */

/* Шапка Деда Мороза на логотипе */
.logo { position: relative; cursor: pointer; }
.logo::after {
    content: '🎅';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 24px;
    transform: rotate(15deg);
    z-index: 10;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5));
    transition: transform 0.2s ease;
    transform-origin: bottom left;
}
.logo.santa-laughing::after { animation: hohoho 0.5s ease-in-out; }
@keyframes hohoho {
    0% { transform: rotate(15deg) scale(1); }
    25% { transform: rotate(0deg) scale(1.3); }
    50% { transform: rotate(25deg) scale(1.3); }
    75% { transform: rotate(-10deg) scale(1.1); }
    100% { transform: rotate(15deg) scale(1); }
}

/* === 2. СТИЛИЗАЦИЯ ПЛЕЕРОВ (ГЛАВНАЯ ЧАСТЬ) === */

/* --- Фон Морозное Стекло --- */
#desktop-footer-player, #mobile-player {
    background: linear-gradient(180deg, rgba(20, 30, 48, 0.95), rgba(36, 59, 85, 0.95)) !important;
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(170, 221, 255, 0.5) !important;
    box-shadow: 0 -5px 25px rgba(0, 200, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* --- Кнопка Play (Елочная игрушка) --- */
.desktop-player__play-btn, .mobile-play-pause-btn {
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #cc0000) !important;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5), inset 0 0 10px rgba(0,0,0,0.3) !important;
    position: relative;
    border-radius: 50% !important;
}
.desktop-player__play-btn::after, .mobile-play-pause-btn::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(255,255,255,0.8), rgba(255,255,255,0));
    border-radius: 50%;
    pointer-events: none;
}
.desktop-player__play-btn .icon-play { border-left-color: #00FF66 !important; }
.mobile-play-pause-btn .icon-play { border-left-color: #00FF66 !important; }
.mobile-play-pause-btn .icon-pause::before,
.mobile-play-pause-btn .icon-pause::after {
    background: #00FF66 !important;
}

/* --- Обложка альбома --- */
.desktop-player__art, .mobile-album-art, .fs-album-art {
    border: 2px solid #fff !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
    border-radius: 10px !important;
}

/* --- Ползунок громкости --- */
.desktop-player-controls .volume-slider, 
.fs-controls .volume-slider {
    height: 8px !important;
    border-radius: 4px;
    background: repeating-linear-gradient(45deg, #fff, #fff 5px, #ff0000 5px, #ff0000 10px) !important;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.desktop-player-controls .volume-slider::-webkit-slider-thumb,
.fs-controls .volume-slider::-webkit-slider-thumb {
    background: #ffd700 !important;
    border: 2px solid #fff;
    width: 18px;
    height: 18px;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.8);
    transform: scale(1.2);
}

/* --- Выбор качества --- */
.stream-select {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid #00FF66 !important;
    color: #fff !important;
    border-radius: 20px !important;
}
.stream-select:hover {
    border-color: #ffd700 !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* --- Кнопка "Привет в эфир" --- */
.sms-button, .fs-sms-button {
    background: linear-gradient(180deg, #d42426 0%, #a81c1e 100%) !important;
    border: 1px solid #fff !important;
    color: #fff !important;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(212, 36, 38, 0.4) !important;
}
.sms-button:hover, .fs-sms-button:hover {
    background: linear-gradient(180deg, #f03e3e 0%, #d42426 100%) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-2px);
}
.sms-button svg, .fs-sms-button svg { fill: #fff !important; }

/* --- Полноэкранный плеер --- */
#fullscreen-player {
    background: linear-gradient(to bottom, #0f2027, #203a43, #2c5364) !important;
}

/* Стрелки переключения */
.fs-nav-arrow {
    width: 36px !important;
    height: 36px !important;
    background: rgba(0, 50, 20, 0.85) !important;
    border: 1px solid #ffd700 !important;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.fs-nav-arrow:hover {
    background: rgba(0, 80, 30, 0.95) !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6) !important;
    transform: translateY(-50%) scale(1.1) !important;
}
.fs-nav-arrow::after {
    width: 8px !important;
    height: 8px !important;
    border-color: #fff !important;
}

/* Кнопка Play/Pause (Fullscreen) */
.fs-play-pause-overlay {
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #cc0000) !important;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0,0,0,0.3) !important;
    border-radius: 50% !important;
    width: 70px !important;
    height: 70px !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 20 !important;
    cursor: pointer;
}
.fs-play-pause-overlay::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(255,255,255,0.8), rgba(255,255,255,0));
    border-radius: 50%;
    pointer-events: none;
}
.fs-play-pause-overlay .icon-play {
    border-left: 20px solid #00FF66 !important;
    border-top: 12px solid transparent !important;
    border-bottom: 12px solid transparent !important;
    margin-left: 5px !important;
}
.fs-play-pause-overlay .icon-pause {
    width: 18px !important;
    height: 24px !important;
}
.fs-play-pause-overlay .icon-pause::before,
.fs-play-pause-overlay .icon-pause::after {
    background: #00FF66 !important;
    width: 5px !important;
    border-radius: 2px !important;
}
.fs-play-pause-overlay .icon-loading {
    width: 30px !important;
    height: 30px !important;
    border: 3px solid rgba(255,255,255,0.3) !important;
    border-top-color: #00FF66 !important;
}

/* Бегущая строка FS */
#fullscreen-player .mfp-track-line,
#fullscreen-player #fs-title-viewport {
    width: 100% !important;
    max-width: 90vw !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    display: block !important;
}
#fullscreen-player #fs-track-title {
    display: inline-block;
    vertical-align: middle;
    color: #ffd700 !important;
}
@media (max-width: 768px) {
    #fullscreen-player #fs-track-title {
        font-size: 1.5rem !important;
    }
}

/* Текст трека десктоп */
#desktop-track-title, #mobile-track-title {
    color: #00FF66;
    text-shadow: 0 0 5px rgba(0, 255, 102, 0.3);
}
#desktop-track-artist, #mobile-track-artist {
    color: #aaddff !important;
}

/* Прелоадер */
.preloader-text {
    color: #ffd700;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: textGlow 2s infinite ease-in-out;
}
@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); transform: scale(1); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 30px #ff0000; transform: scale(1.02); }
}