/* Reset and base styles */

:root {
    --main-color: #7182E2;
    --txt-color: #181A1B;
    --white-color: #ffffff;
}

@font-face {
    font-family: 'Geologica';
    src: url('/assets/fonts/geologica/Geologica-Light.woff2') format('woff2'),
        url('/assets/fonts/geologica/Geologica-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geologica';
    src: url('/assets/fonts/geologica/Geologica-Regular.woff2') format('woff2'),
        url('/assets/fonts/geologica/Geologica-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geologica';
    src: url('/assets/fonts/geologica/Geologica-Medium.woff2') format('woff2'),
        url('/assets/fonts/geologica/Geologica-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--txt-color);
    background: none;
    overflow: hidden;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom text selection color */
::selection {
    background-color: rgba(112, 129, 225, 0.2);
    color: var(--txt-color);
}

::-moz-selection {
    background-color: rgba(112, 129, 225, 0.2);
    /* #7081e1 with 20% opacity */
    color: var(--txt-color);
}

/* Layout components */
.main-container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    width: 100%;
    overflow: hidden;
}


.character-illustration {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex: 0 0 25%;
    width: 40%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    z-index: 10;
    padding: 20px;
    box-sizing: border-box;
    margin-top: auto;
}

.character-illustration.centered {
    right: 30%;
}

/* Кнопка Play/Pause — плавная смена иконок через scale */
.pp-container {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 0;
    padding-bottom: 3.3rem;
}

.pp-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    user-select: none;
}

/* Активная иконка (по умолчанию — Play) */
.pp-container .pp-play {
    opacity: 1;
    transform: scale(1);
}

/* Когда плеер в состоянии "играет" — показываем Pause, скрываем Play */
.play-pause.playing .pp-play {
    opacity: 0;
    transform: scale(0);
}

.play-pause.playing .pp-pause {
    opacity: 1;
    transform: scale(1);
}

/* Дополнительно: лёгкий эффект при клике */
.play-pause:active .pp-icon {
    transform: scale(0.9) !important;
}

.play-pause {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
}

.content-wrapper {
    display: flex;
    flex-direction: row;
    flex: 1;
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 80vh;
    padding: 0;
    gap: 0
}

.content-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    position: relative
}

.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: auto;
    height: 70vh;
    padding: 20px;
    background: transparent;
    position: relative
}

.main-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 10%;
    height: 10%;
    background-image: url('../assets/images/fx.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.visualizer-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Modified .viz-circle (add CSS blur as fallback) */
.viz-circle {
    transform-origin: center;
    transition: transform 0.1s ease-out;
    animation: float 6s ease-in-out infinite alternate;
    filter: blur(10px);
    /* Fallback для браузеров без SVG-фильтров */
    opacity: 0.3;
}

#circle1 {
    animation-delay: 0s;
    animation-duration: 7s;
}

#circle2 {
    animation-delay: 2s;
    animation-duration: 8s;
}

#circle3 {
    animation-delay: 4s;
    animation-duration: 6s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5px, -5px) scale(1.05);
        /* Уменьшены translate и scale */
    }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: auto;
    border-bottom: 1px solid #7182e272;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1840px;
    box-sizing: border-box;
}

.header-content>* {
    box-sizing: border-box;
}

.logo {
    width: 120px;
    height: auto;
    justify-self: start;
}

.genre-title {
    font-size: clamp(18px, 3vw, 24px);
    font-family: Geologica;
    font-weight: 300;
    text-align: center;
    color: #181a1bb2;
    justify-self: center;
}

.header-button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-size: 16px;
    font-family: Geologica;
    font-weight: 300;
    color: var(--main-color);
    border: 1px solid #7081e17f;
    border-radius: 14px;
    padding: 8px 20px;
    background: transparent;
    cursor: pointer;
    transition:
        color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.3s ease-out,
        padding 0.3s ease-out;
    z-index: 1;
}

.header-button .button-text {
    display: inline-block;
    white-space: nowrap;
    /* Предотвращаем перенос текста */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    /* Ускорена анимация */
}

.header-button .button-text.exit {
    transform: translateX(100%);
    opacity: 0;
}

.header-button .button-text.enter {
    transform: translateX(-100%);
    opacity: 0;
}

.header-button .button-text.active {
    transform: translateX(0);
    opacity: 1;
}

/* Эффект волны при hover */
.header-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    width: 30px;
    height: 30px;
    background: #7081e139;
    border-radius: 50%;
    transform: translateY(-50%) scale(0);
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: -1;
}

.header-button:hover::before {
    transform: translateY(-50%) scale(10);
}

.header-button:hover {
    color: var(--main-color);
    border-color: var(--main-color);
}

/* Плавное нажатие — фон заливает, текст белеет */
.header-button:active {
    background-color: var(--main-color) !important;
    color: var(--white-color) !important;
    border-color: var(--main-color) !important;
}

/* Sidebar */
.sidebar {
    flex-direction: column;
    width: 33.333%;
    flex: 0 0 33.333%;
    height: 70vh;
    padding: 1rem;
    overflow: hidden;
    position: relative;
    gap: 20px;
    box-sizing: border-box;
    align-items: flex-start;
    display: flex;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.sidebar.hide {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.sidebar-queues .queue-section {
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.sidebar>* {
    width: 100%;
    max-width: 450px;
    margin-right: auto;
}

/* Обновите медиа-запросы */
@media (min-width: 640px) {
    .sidebar {
        display: flex;
        width: 33.333%;
        flex: 0 0 33.333%;
        box-sizing: border-box;
    }

    .sidebar>* {
        width: 100%;
        max-width: 450px;
        margin-right: auto;
    }
}

@media (min-width: 1024px) {
    .sidebar {
        display: flex;
        width: 33.333%;
        flex: 0 0 33.333%;
        /*height: calc(100% - 1rem - 120px - 1rem);*/
        box-sizing: border-box;
    }

    .sidebar>* {
        width: 100%;
        max-width: 450px;
        margin-right: auto;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .sidebar {
        display: flex;
        width: 33.333%;
        flex: 0 0 33.333%;
        box-sizing: border-box;
    }

    .sidebar>* {
        width: 100%;
        max-width: 450px;
        margin-right: auto;
    }

}

.queue-input {
    font-size: 16px;
    font-family: Geologica;
    font-weight: 300;
    color: var(--main-color);
    border: 1px solid var(--main-color);
    border-radius: 14px;
    padding: 18px;
    background: transparent;
    width: 100%;
}

.queue-input::placeholder {
    color: #7081e17f;
}

/* Селектор радиостанций */
.radio-selector {
    position: relative;
    margin-bottom: 20px;
}

.current-station {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(112, 129, 225, 0.1);
    border: 1px solid rgba(112, 129, 225, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.current-station:hover {
    background: rgba(112, 129, 225, 0.15);
    border-color: rgba(112, 129, 225, 0.3);
}

.station-info {
    flex: 1;
}

.station-name {
    font-weight: 500;
    color: var(--txt-color);
    margin-bottom: 4px;
}

.station-status {
    font-size: 12px;
    color: var(--main-color);
}

.station-toggle {
    background: none;
    border: none;
    color: var(--main-color);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}


.arrow-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    filter: invert(43%) sepia(86%) saturate(1351%) hue-rotate(201deg) brightness(95%) contrast(92%);
}

.station-toggle.active .arrow-icon {
    transform: rotate(180deg);
}

/* Выпадающий список станций */
.stations-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white-color);
    border: 1px solid rgba(112, 129, 225, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(124, 116, 218, 0.15);
    z-index: 1000;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.stations-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.stations-list::-webkit-scrollbar {
    width: 6px;
}

.stations-list::-webkit-scrollbar-thumb {
    background: #7081e17f;
    border-radius: 3px;
}

.stations-list::-webkit-scrollbar-thumb:hover {
    background: var(--main-color);
}

@keyframes station-scroll-in-out {
    entry 0% {
        opacity: 0;
        transform: translateY(100%);
    }

    entry 100% {
        opacity: 1;
        transform: translateY(0);
    }

    exit 0% {
        opacity: 1;
        transform: translateY(0);
    }

    exit 100% {
        opacity: 0;
        transform: translateY(-100%);
    }
}

/* Модальное окно добавления радиостанции */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(64, 68, 98, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white-color);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--txt-color);
    margin: 0;
}

.modal-body {
    margin-bottom: 24px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--txt-color);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(112, 129, 225, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: var(--txt-color);
    background: var(--white-color);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(112, 129, 225, 0.1);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.modal-btn.cancel {
    background: rgba(112, 129, 225, 0.1);
    color: var(--main-color);
}

.modal-btn.cancel:hover {
    background: rgba(112, 129, 225, 0.1);
}

.modal-btn.add {
    background: var(--main-color);
    color: var(--white-color);
}

.modal-btn.add:hover {
    background: var(--main-color);
}

/* Toast уведомления */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: -300px;
    /* Начинаем за пределами экрана справа */
    background: var(--main-color);
    color: var(--white-color);
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 99999;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(112, 129, 225, 0.3);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    max-width: 300px;
    word-wrap: break-word;
}

.toast-notification.show {
    right: 20px;
    /* Появляемся на экране */
    opacity: 1;
}

.toast-notification.hide {
    right: -300px;
    /* Уплываем за экран вправо */
    opacity: 0;
}

.dropdown-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-header h4 {
    margin: 0;
    font-weight: 500;
    color: var(--txt-color);
}

.add-station-btn {
    background-color: var(--white-color);
    color: var(--main-color);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.add-station-btn:hover {
    background: rgba(112, 129, 225, 0.2);
}

.stations-list {
    padding: 8px 0;
    max-height: 300px;
    overflow-y: auto;
}

.station-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-left: 3px solid transparent;
    animation: linear station-scroll-in-out;
    animation-timeline: view();
}

.station-item:hover {
    background-color: #7081e133;
}

.station-item.active {
    background-color: rgba(112, 129, 225, 0.1);
    border-left-color: var(--main-color);
}

.station-icon {
    width: 50px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.station-details {
    flex: 1;
}

.station-item .station-name {
    font-weight: 500;
    color: var(--txt-color);
    margin-bottom: 2px;
}

.station-item .station-genre {
    font-size: 12px;
    color: #181a1bb2;
    margin-bottom: 2px;
}

.station-item .station-listeners {
    font-size: 12px;
    color: var(--main-color);
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white-color);
    border: 1px solid rgba(112, 129, 225, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.search-dropdown.active {
    display: block;
}

.dropdown-section {
    padding: 12px 16px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-section:last-child {
    border-bottom: none;
}

.dropdown-section h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: #181a1bb2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 2px;
}

.dropdown-item:hover {
    background-color: rgba(112, 129, 225, 0.1);
}

.dropdown-item-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: var(--white-color);
}

.dropdown-item-text {
    flex: 1;
}

.dropdown-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--txt-color);
    margin-bottom: 2px;
}

.dropdown-item-subtitle {
    font-size: 12px;
    color: #181a1bb2;
}

.dropdown-item-action {
    font-size: 12px;
    color: var(--main-color);
    font-weight: 500;
}

.sidebar-queues {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-queues:hover {
    scrollbar-width: thin;
}

.sidebar-queues::-webkit-scrollbar {
    display: none;
}

.sidebar-queues:hover::-webkit-scrollbar {
    display: block;
    width: 6px;
}

.sidebar-queues:hover::-webkit-scrollbar-thumb {
    background: #7081e17f;
    border-radius: 3px;
}

.sidebar-queues:hover::-webkit-scrollbar-thumb:hover {
    background: var(--main-color);
}

.queue-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title {
    font-size: 20px;
    font-family: Geologica;
    font-weight: 300;
    color: #181a1bb2;
    margin-top: 20px;
}

.playlist {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.track-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 15px;
    transition: background-color 0.3s ease;
}

.sidebar-queues .track-item {
    animation: linear track-scroll-in-out;
    animation-timeline: view();
}


@keyframes track-scroll-in-out {
    entry 0% {
        opacity: 0;
        transform: translateY(100%);
    }

    entry 100% {
        opacity: 1;
        transform: translateY(0);
    }

    exit 0% {
        opacity: 1;
        transform: translateY(0);
    }

    exit 100% {
        opacity: 0;
        transform: translateY(-100%);
    }
}

.track-item:hover {
    background-color: #7081e133;
}


.track-item.visible {
    animation: trackAppear 0.5s ease forwards;
    transform-origin: center bottom;
    padding-right: 0;

}

.track-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    align-self: center;
}

.track-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.track-title,
.track-artist {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.track-title {
    font-size: 16px;
    font-family: Geologica;
    font-weight: 500;
    color: var(--txt-color);
}

.track-artist {
    font-size: 14px;
    font-family: Geologica;
    font-weight: 400;
    color: #181a1bb2;
}

/* Анимация при наведении на весь track-item */
.track-item:hover .track-title.overflowing,
.track-item:hover .track-artist.overflowing {
    animation: scroll-text-loop var(--scroll-duration, 5s) linear infinite;
}

/* Плавная циклическая анимация */
@keyframes scroll-text-loop {

    0%,
    20% {
        transform: translateX(0);
    }

    80%,
    100% {
        transform: translateX(var(--scroll-distance, 0px));
    }
}

/* Гарантируем что текст будет виден при наведении */
.track-item:hover .track-title,
.track-item:hover .track-artist {
    overflow: visible;
}

/* Сама анимация */
@keyframes scroll-text {
    0% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(0);
    }

    /* пауза перед началом */
    90% {
        transform: translateX(var(--scroll-distance));
    }

    100% {
        transform: translateX(var(--scroll-distance));
    }
}


@keyframes scroll-text {

    0%,
    10% {
        transform: translateX(0);
    }

    90%,
    100% {
        transform: translateX(var(--scroll-distance, 0px));
    }
}

/* Album section */
.album-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, visibility 0.5s ease-out;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.album-section.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    visibility: hidden;
}

.album-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: clamp(240px, 50vmin, 420px);
    height: 100%;
}

.album-artwork {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 20px;
    object-fit: cover;
}

.album-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.album-title {
    font-size: 20px;
    font-family: Geologica;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--txt-color);
}

.album-artist {
    font-size: 16px;
    font-family: Geologica;
    font-weight: 400;
    color: #181a1bb2;
}

/* Footer */
.footer {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid #7081e17f;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: absolute;
    bottom: 0;
    z-index: 1000;
    overflow: hidden;
    /* Ограничиваем область эффекта капли */
}

.footer-content {
    display: flex;
    flex-direction: column;
    /* Восстановлено на column */
    gap: 6px;
    align-items: center;
    width: 100%;
    margin-top: 18px;
    transition: none;
    /* Убираем лишние переходы */
}

.player-controls {
    display: flex;
    flex-direction: row;
    /* Изменено на row */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    /* Добавлен padding */
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: margin-left 0.3s ease-out;
    /* Переходы для смещения */
}

#miniAlbumPlaceholder {
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.3s ease-out, opacity 0.3s ease-out;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.footer.show-mini-album #miniAlbumPlaceholder {
    width: 250px;
    opacity: 1;
}

/* Стили для мини-альбома в футере, который будет внутри placeholder */
.mini-album-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding-left: clamp(8px, 2vw, 24px);
}


.mini-album-artwork {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.mini-album-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex-grow: 1;
}

.mini-album-title {
    font-size: 18px;
    font-family: Geologica;
    font-weight: 500;
    color: var(--txt-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-album-artist {
    font-size: 16px;
    font-family: Geologica;
    font-weight: 400;
    color: #181a1bb2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.time-display {
    font-family: Geologica;
    font-size: 24px;
    font-weight: 300;
    color: var(--txt-color);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    /* Чтобы не уменьшался */
    transition: margin-left 0.3s ease-out;
    /* Для плавного смещения */
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 8vw, 100px);
    /* Адаптивный gap от 20px до 100px */
    flex: 1;
    width: fit-content;
    max-width: 100%;
    transition: margin-left 0.3s ease-out, gap 0.3s ease-out;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.control-btn:hover {
    transform: scale(1.1);
}

.control-btn img {
    width: auto;
    height: auto;
}

.control-btn.hidden-download {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    position: absolute;
    left: -9999px;
}

.volume-control.hidden-volume {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}


.volume-control {
    position: relative;
    /* Добавлено для позиционирования seek-bar */
    display: flex;
    align-items: center;
}

@media (max-width: 640px) {
    .volume-control {
        display: none;
    }
}

.progress-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    width: 100%;
    height: 10px;
    background-color: #7081e133;
}

.progress-bar {
    background-color: var(--main-color);
    width: 22%;
    height: 10px;
    border-radius: 0px 5px 5px 0px;
    transition: width 1s ease-out;
}

.seek-bar {
    position: absolute;
    left: 100%;
    /* Позиционируем справа от кнопки */
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    /* Отступ между ползунком и кнопкой */
    width: 0;
    /* Начальная ширина 0 */
    height: 0.4rem;
    background-color: #7081e133;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
    /* Всегда занимает место для позиционирования */
    z-index: 10;
    /* Поверх других элементов */
}

/* Фоновая полоска громкости */
.seek-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--volume-level, 50%);
    /* Динамическая ширина на основе уровня громкости */
    background-color: var(--main-color);
    border-radius: 10px;
    transition: all 0.2s ease;
}

/* Ручка ползунка */
.seek-bar::after {
    content: '';
    position: absolute;
    right: calc(100% - var(--volume-position, 50%));
    /* Позиция соответствует уровню громкости */
    top: 50%;
    transform: translate(50%, -50%);
    width: 12px;
    height: 12px;
    background-color: var(--main-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    /* Изначально скрыта */
}

/* CSS hover эффекты теперь обрабатываются через JavaScript */

/* Эффект капли в футере */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(112, 129, 225, 0.4) 0%, rgba(112, 129, 225, 0.2) 50%, rgba(112, 129, 225, 0) 100%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    /* На заднем фоне footer */
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0;
    height: 0;
    opacity: 1;
    overflow: hidden;
    /* Ограничиваем область эффекта */
}

/* Hover эффекты для ползунка */
.seek-bar:hover::before {
    background-color: var(--main-color);
}

.seek-bar:hover::after,
.seek-bar.dragging::after {
    opacity: 1;
    /* Показываем ручку при hover и перетаскивании */
    background-color: #5a6fd9;
    transform: translate(50%, -50%) scale(1.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


input:focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--main-color) inset;
}

@media (min-width: 640px) {
    .genre-title {
        display: block;
        font-size: 24px;
    }

    .header-button {
        font-size: 18px;
        padding: 10px 24px;
    }

    .content-wrapper {
        height: 80vh;
    }

    .sidebar {
        display: flex;
        width: 25%;
        flex: 0 0 25%;
    }

    .main-content {
        flex: 1;
        width: auto;
        padding-top: 0px;
    }

    .sidebar-queues::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .sidebar-queues:hover {
        scrollbar-width: thin;
    }

    .sidebar-queues:hover::-webkit-scrollbar {
        display: block;
        width: 6px;
    }

    .sidebar-queues:hover::-webkit-scrollbar-thumb {
        background: #7081e17f;
        border-radius: 3px;
    }

    .sidebar-queues:hover::-webkit-scrollbar-thumb:hover {
        background: var(--main-color);
    }

    .sidebar-queues:hover {
        scrollbar-color: #7081e17f transparent;
    }

    .album-artwork {
        max-width: 500px;
    }

    .album-title {
        font-size: 32px;
    }

    .album-artist {
        font-size: 20px;
    }

    .track-image {
        width: 70px;
        height: 70px;
    }

    .track-title {
        font-size: 20px;
    }

    .track-artist {
        font-size: 16px;
    }

    .time-display {
        font-size: 20px;
    }

    .control-buttons {
        gap: clamp(15px, 6vw, 60px);
        /* Меньший gap для маленьких экранов */
    }
}

@media (min-width: 768px) {
    .logo {
        width: 150px;
    }

    .album-artwork {
        max-width: 650px;
    }

    .album-title {
        font-size: 24px;
    }

    .time-display {
        font-size: 24px;
    }
}

@media (min-width: 1024px) {
    .logo {
        width: 150px;
    }

    .genre-title {
        font-size: 24px;
    }

    .header-button {
        font-size: 16px;
        padding: 10px 30px;
    }

    .content-wrapper {
        height: 80vh;
    }

    .sidebar {
        display: flex;
        width: 25%;
        flex: 0 0 25%;
        box-sizing: border-box;
    }

    .main-content {
        flex: 1;
        width: auto;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-top: 20px;
    }

    .album-artwork {
        max-width: 500px;
    }

    .album-title {
        font-size: 24px;
    }

    .album-artist {
        font-size: 24px;
    }

    .character-illustration {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .content-wrapper {
        height: 80vh;
    }

    .sidebar {
        display: flex;
        width: 50%;
        flex: 0 0 50%;
    }

    .main-content {
        flex: 1;
        width: auto;
    }
}

/* Маленькие экраны - скрываем sidebar */
@media (max-width: 767px) {

    .sidebar {
        display: flex;
        transform: translateX(-100%);
        opacity: 0;
        position: absolute;
        height: 100%;
        width: 100%;
    }

    .main-content {
        width: 100%;
        flex: 0 0 100%;
    }

    .seek-bar {
        width: 50px;
        /* Фиксированная ширина для маленьких экранов */
        opacity: 1;
        /* Всегда видим на мобильных */
        pointer-events: auto;
        /* Всегда активен на мобильных */
    }
}

@media (max-width: 767px) {

    .footer-content {
        margin-top: 5px;
        gap: 4px;
    }

    .player-controls {
        padding: 0 10px;
        margin-bottom: 8px;
    }

    .time-display {
        font-size: clamp(14px, calc(16px + 0.5vw), 18px);
        min-width: 40px;
    }

    .control-buttons {
        gap: clamp(20px, calc(30px + 2vw), 60px);
        flex: 1;
        justify-content: space-evenly;
        max-width: min(300px, 80vw);
        margin: 0;
        padding-right: 10px;
    }


    .pp-icon {
        position: absolute;
        top: 0;
        left: 0;
        width: 42px;
        height: 50px;
        opacity: 0;
        transform: scale(0.6);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .volume-control {
        gap: clamp(8px, calc(10px + 0.5vw), 12px);
    }

    .seek-bar {
        width: clamp(50px, calc(60px + 2vw), 70px);
        margin-top: 0;
    }

    .progress-container {
        height: 6px;
    }

    .progress-bar {
        height: 6px;
    }
}

/* Для экранов меньше 600px сделать position relative для header и footer */
@media (max-width: 600px) {
    .header {
        position: relative;
    }

    .footer {
        position: relative;
    }
}

/* Бургер меню */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid #7081e17f;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
}

.burger-menu:hover {
    border-color: var(--main-color);
    background: rgba(112, 129, 225, 0.1);
}

.burger-line {
    width: 24px;
    height: 2px;
    background: var(--main-color);
    transition: all 0.3s ease;
    margin: 2px 0;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

.burger-overlay {
    position: fixed;
    top: 100%;
    /* Начинаем от нижней границы header */
    left: 0;
    width: 100vw;
    height: calc(100vh - 100px);
    /* Высота экрана минус высота header */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
}

.burger-overlay.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.burger-nav {
    height: 100%;
    padding: 30px 20px;
}

.burger-nav-content {
    max-width: 400px;
    margin: 0 auto;
}

.burger-nav-section {
    margin-bottom: 40px;
}

.burger-nav-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--txt-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(112, 129, 225, 0.2);
}

.burger-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.burger-nav-link {
    font-size: 16px;
    font-weight: 400;
    color: var(--main-color);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(112, 129, 225, 0.1);
}

.burger-nav-link:hover {
    background: rgba(112, 129, 225, 0.1);
    border-color: rgba(112, 129, 225, 0.3);
    transform: translateX(5px);
}

.burger-nav-link.active {
    background: var(--main-color);
    color: white;
    border-color: var(--main-color);
}

/* Скрываем заголовок на экранах меньше 570px */
@media (max-width: 570px) {
    .genre-title {
        display: none;
    }
}

/* Медиа-запрос для бургер меню при экранах меньше 700px */
@media (max-width: 700px) {
    .burger-menu {
        display: flex;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .logo {
        width: 70px;
    }

    .control-buttons {
        gap: 1rem;
        max-width: min(250px, 85vw);
    }

    .time-display {
        font-size: clamp(13px, calc(14px + 0.3vw), 15px);
        min-width: 35px;
    }
}

.chat-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: transparent;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    align-items: center;
    box-sizing: border-box;
}

.chat-section.visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    width: 100%;
    max-width: 600px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 10px;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #7081e17f transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
    height: 100%;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #7081e17f;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--main-color);
}


.chat-message {
    max-width: 75%;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.3s forwards;
    margin-bottom: 1rem;
}

.message-content {
    padding: 0.8rem 1.2rem;
    border-radius: 1.25rem;
    box-shadow: 0 2px 8px rgba(129, 138, 220, 0.08);
    font-size: 0.95rem;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.message-time {
    font-size: 0.7rem;
    margin-top: 0.4rem;
    opacity: 0.6;
}

.incoming {
    align-self: flex-start;
}

.outgoing {
    align-self: flex-end;
}

.incoming .message-content {
    background-color: #AAB4ED;
    color: var(--white-color);
    border-bottom-left-radius: 0.2rem;
}

.outgoing .message-content {
    background-color: var(--main-color);
    color: var(--white-color);
    border-bottom-right-radius: 0.2rem;
}

.outgoing .message-time {
    text-align: right;
}

.loader {
    --color-one: var(--main-color);
    --color-two: #AAB4ED;
    --color-three: #7081e180;
    --color-four: #AAB4ED80;
    --color-five: #7081e140;
    --time-animation: 2s;
    --size: 0.4;
    position: absolute;
    bottom: 100%;
    left: 20px;
    border-radius: 50%;
    transform: scale(var(--size)) translateY(10px);
    box-shadow:
        0 0 25px 0 var(--color-three),
        0 20px 50px 0 var(--color-four);
    animation: colorize calc(var(--time-animation) * 3) ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10;
}

.loader.visible {
    opacity: 1;
    transform: scale(var(--size)) translateY(0);
}

.loader::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border-top: solid 1px var(--color-one);
    border-bottom: solid 1px var(--color-two);
    background: linear-gradient(180deg, var(--color-five), var(--color-four));
    box-shadow:
        inset 0 10px 10px 0 var(--color-three),
        inset 0 -10px 10px 0 var(--color-four);
}

.loader .box {
    width: 100px;
    height: 100px;
    background: linear-gradient(180deg,
            var(--color-one) 30%,
            var(--color-two) 70%);
    mask: url(#clipping);
    -webkit-mask: url(#clipping);
}

.loader svg {
    position: absolute;
}

.loader svg #clipping {
    filter: contrast(15);
    animation: roundness calc(var(--time-animation) / 2) linear infinite;
}

.loader svg #clipping polygon {
    filter: blur(7px);
}

.loader svg #clipping polygon:nth-child(1) {
    transform-origin: 75% 25%;
    transform: rotate(90deg);
}

.loader svg #clipping polygon:nth-child(2) {
    transform-origin: 50% 50%;
    animation: rotation var(--time-animation) linear infinite reverse;
}

.loader svg #clipping polygon:nth-child(3) {
    transform-origin: 50% 60%;
    animation: rotation var(--time-animation) linear infinite;
    animation-delay: calc(var(--time-animation) / -3);
}

.loader svg #clipping polygon:nth-child(4) {
    transform-origin: 40% 40%;
    animation: rotation var(--time-animation) linear infinite reverse;
}

.loader svg #clipping polygon:nth-child(5) {
    transform-origin: 40% 40%;
    animation: rotation var(--time-animation) linear infinite reverse;
    animation-delay: calc(var(--time-animation) / -2);
}

.loader svg #clipping polygon:nth-child(6) {
    transform-origin: 60% 40%;
    animation: rotation var(--time-animation) linear infinite;
}

.loader svg #clipping polygon:nth-child(7) {
    transform-origin: 60% 40%;
    animation: rotation var(--time-animation) linear infinite;
    animation-delay: calc(var(--time-animation) / -1.5);
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes roundness {
    0% {
        filter: contrast(15);
    }

    20% {
        filter: contrast(3);
    }

    40% {
        filter: contrast(3);
    }

    60% {
        filter: contrast(15);
    }

    100% {
        filter: contrast(15);
    }
}

@keyframes colorize {
    0% {
        filter: hue-rotate(0deg);
    }

    20% {
        filter: hue-rotate(-30deg);
    }

    40% {
        filter: hue-rotate(-60deg);
    }

    60% {
        filter: hue-rotate(-90deg);
    }

    80% {
        filter: hue-rotate(-45deg);
    }

    100% {
        filter: hue-rotate(0deg);
    }
}


.chat-message.sent {
    align-self: flex-end;
    background-color: var(--main-color);
    color: var(--white-color);
    --p: 0%;
}

.message-timestamp {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    align-self: flex-end;
    margin-top: 4px;
}

.chat-message.received .message-timestamp {
    color: rgba(0, 0, 0, 0.5);
}

.chat-input-area {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 10px;
    position: relative;
    align-items: center;
    padding-top: 10px
}

.chat-input {
    flex-grow: 1;
    padding: 12px 65px 12px 20px;
    border-radius: 600px;
    border: 1px solid #7081e17f;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--txt-color);
    font-family: Geologica;
    font-size: 16px;
    resize: none;
    overflow-y: auto;
    height: 40px;
    max-height: 80px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chat-input::-webkit-scrollbar {
    display: none;
}

.chat-input::placeholder {
    color: #181a1ab2;
}

.chat-input:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 1px var(--main-color) inset;
}

.chat-send-btn {
    position: absolute;
    right: 13px;
    top: 55%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--main-color);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("../assets/images/arrow.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
    padding: 0;
}

.chat-send-btn:hover {
    background-color: #5a6ed1;
    transform: translateY(-50%)
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingBlink {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}