/* Reset and base styles */

:root {
    --main-color: #7182E2;
    --txt-color: #181A1B;
    --white-color: #ffffff;
    --opasity-bg: rgba(112, 129, 225, 0.2);

    /* Window Controls Overlay variables */
    --titlebar-area-x: env(titlebar-area-x, 0);
    --titlebar-area-y: env(titlebar-area-y, 0);
    --titlebar-area-width: env(titlebar-area-width, 100%);
    --titlebar-area-height: env(titlebar-area-height, 40px)
}

@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;
    -webkit-tap-highlight-color: transparent
}

/* 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;
    flex: 0 0 25%;
    max-width: 30%;
    height: auto;
    align-self: flex-end;
    object-fit: contain;
    object-position: center bottom;
    z-index: 10;
    padding: 20px;
    box-sizing: border-box
}

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

/* === плей/пауза === */
.control-btn.play-pause {
    all: unset;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    color: #374957;
    padding-bottom: 0.4rem;
    box-sizing: content-box
}

.pp-container {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 0
}

.pp-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    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
}

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

.play-pause[aria-pressed="true"] .pp-play {
    opacity: 0;
    transform: scale(0)
}

.play-pause[aria-pressed="true"] .pp-pause {
    opacity: 1;
    transform: scale(1)
}

.play-pause:active .pp-icon {
    transform: scale(0.9) !important
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}

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

.control-btn.play-pause {
    transition: transform 0.35s ease-out
}

.content-wrapper {
    display: flex;
    flex-direction: row;
    flex: 1;
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    height: auto;
    min-height: calc(100dvh - var(--header-height) - var(--footer-height));
    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;
    filter: url(#noiseFilter)
}

.visualizer-svg circle {
    transition: r 0.3s ease-out, opacity 0.3s ease-out, stroke-width 0.3s ease-out
}

.viz-circle {
    transform-origin: center;
    transition: transform 0.1s ease-out;
    animation: float 6s ease-in-out infinite alternate;
    filter: blur(10px);
    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);
    }
}

.header {
    display: flex;
    position: fixed;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--opasity-bg);
    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;
}

/* Window Controls Overlay support - применяется только в PWA режиме */
body.window-controls-overlay-active .header {
    padding-top: max(20px, var(--titlebar-area-height, 20px));
    padding-left: max(20px, var(--titlebar-area-x, 20px));
    padding-right: max(20px, calc(100vw - var(--titlebar-area-x, 0) - var(--titlebar-area-width, 100vw)));
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    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-weight: 300;
    color: var(--main-color);
    border: 1px solid var(--opasity-bg);
    border-radius: 14px;
    padding: 9px 15px;
    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);
    min-width: 143px;
    box-sizing: border-box;
    z-index: 1000;
}

.header-button .button-text {
    display: inline-block;
    white-space: nowrap;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    /* Центрируем текст внутри фиксированной кнопки */
    text-align: center;
    width: 100%;
}

.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;
}

.header-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -15px;
    width: 30px;
    height: 30px;
    background: var(--opasity-bg);
    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;
}

@media (hover: hover) and (pointer: fine) {
    .header-button:hover::before {
        transform: translateY(-50%) scale(10);
    }

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

@media (hover: none) and (pointer: coarse) {
    .header-button:active::before {
        transform: translateY(-50%) scale(10);
    }

    .header-button:active {
        color: var(--main-color);
        border-color: var(--main-color);
        background-color: var(--main-color);
        color: var(--white-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: 70dvh;
    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;
    padding-bottom: calc(50vh - 35dvh);
}

.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 var(--opasity-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .current-station:hover {
        background: rgba(112, 129, 225, 0.15);
        border-color: var(--opasity-bg)
    }
}

@media (hover: none) and (pointer: coarse) {
    .current-station:active {
        background: rgba(112, 129, 225, 0.15);
        border-color: var(--opasity-bg)
    }
}

.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);
}

.edit-station-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px;
    margin-left: 8px;
    transition: background-color 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-station-btn img {
    filter: invert(25%) sepia(100%) saturate(5000%) hue-rotate(230deg) brightness(1.1);
    width: 16px;
    height: 16px;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.delete-station-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px;
    margin-left: 8px;
    transition: background-color 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-station-btn img {
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: brightness(0) saturate(100%) invert(49%) sepia(94%) saturate(746%) hue-rotate(325deg) brightness(89%) contrast(87%);
}

@media (hover: hover) and (pointer: fine) {
    .edit-station-btn:hover {
        background: rgba(113, 130, 226, 0.2);
    }

    .delete-station-btn:hover {
        background: rgba(226, 113, 115, 0.2);
    }
}

@media (hover: none) and (pointer: coarse) {
    .edit-station-btn:active {
        background: rgba(113, 130, 226, 0.2);
    }

    .delete-station-btn:active {
        background: rgba(226, 113, 115, 0.2);
    }
}

.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 var(--opasity-bg);
    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: opacity 0.3s ease 0.5s, transform 0.3s ease 0.5s, visibility 0s linear 0.8s;
    pointer-events: none;
}

.stations-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease 0s, transform 0.2s ease 0s, visibility 0s linear 0s;
}

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

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



@media (hover: hover) and (pointer: fine) {
    .stations-list::-webkit-scrollbar-thumb:hover {
        background: var(--main-color);
    }
}

@media (hover: none) and (pointer: coarse) {
    .stations-list::-webkit-scrollbar-thumb:active {
        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-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 var(--opasity-bg);
    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 var(--opasity-bg);
}

.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);
}

@media (hover: hover) and (pointer: fine) {
    .modal-btn.cancel:hover {
        color: #ffffff;
        background: var(--main-color)
    }

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

    .modal-btn.delete:hover {
        background: #E27171;
        color: #ffffff
    }
}

@media (hover: none) and (pointer: coarse) {
    .modal-btn.cancel:active {
        color: #ffffff;
        background: var(--main-color)
    }

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

    .modal-btn.delete:active {
        background: #E27171;
        color: #ffffff
    }
}

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

.modal-btn.delete {
    background: #e271713f;
    color: #E27171
}

/* Toast уведомления */
.toast-notification {
    position: fixed;
    bottom: calc(120px + 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 var(--opasity-bg);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    max-width: 300px;
    word-wrap: break-word;
}

/* На очень маленьких экранах, где footer relative */
@media (max-width: 600px) {
    .toast-notification {
        bottom: 20px;
    }
}

.toast-notification.show {
    right: 20px;
    opacity: 1;
}

.toast-notification.hide {
    right: -300px;
    opacity: 0;
}

.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid rgba(13, 14, 14, 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;
}

@media (hover: hover) and (pointer: fine) {
    .add-station-btn:hover {
        background: var(--opasity-bg)
    }
}

@media (hover: none) and (pointer: coarse) {
    .add-station-btn:active {
        background: var(--opasity-bg)
    }
}

.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();
}

@media (hover: hover) and (pointer: fine) {
    .station-item:hover {
        background-color: var(--opasity-bg)
    }
}

@media (hover: none) and (pointer: coarse) {
    .station-item:active {
        background-color: var(--opasity-bg)
    }
}

.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;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* align-items: flex-start; */
}

.station-details-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2px;
}

.station-item .station-name {
    font-weight: 500;
    color: var(--txt-color);
    /* Удаляем margin-bottom, так как он теперь в .station-details-top-row */
}

.station-item .edit-station-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.station-item:hover .edit-station-btn img,
.station-item:hover .delete-station-btn img {
    opacity: 1;
}

.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 var(--opasity-bg);
    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;
}

@media (hover: hover) and (pointer: fine) {
    .dropdown-item:hover {
        background-color: rgba(112, 129, 225, 0.1)
    }
}

@media (hover: none) and (pointer: coarse) {
    .dropdown-item:active {
        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: var(--opasity-bg);
}


.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 var(--opasity-bg);
    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;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer.hide {
    transform: translateY(100%);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    width: 100%;
    margin-top: 18px;
    transition: none;
}

.player-controls {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

#miniAlbumPlaceholder {
    position: absolute;
    margin-left: 80px;
    top: 50%;
    transform: translateY(-50%);
    height: 60px;

    width: calc(100% - 80px - var(--control-buttons-width) - 200px);
    max-width: 700px;

    display: flex;
    align-items: center;

    opacity: 0;
    pointer-events: none;
    clip-path: inset(0 100% 0 0);
    transition:
        opacity 0.35s ease,
        clip-path 0.45s ease-out;
}


.footer.show-mini-album #miniAlbumPlaceholder {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    /* раскрываем */
}

/* Стили для мини-альбома в футере, который будет внутри 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;
}


/* Только для мобильных */
@media (max-width: 640px) {

    .footer.show-mini-album .control-btn.play-pause {
        transform: translateX(80px);
    }

    #miniAlbumPlaceholder {
        margin-left: 45px;
        max-width: 200px;

    }

}

.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);
    flex: 1;
    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
}

@media (hover: hover) and (pointer: fine) {
    .control-btn:hover {
        transform: scale(1.1)
    }
}

@media (hover: none) and (pointer: coarse) {
    .control-btn:active {
        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;
    display: flex;
    align-items: center
}

.volume-btn {
    position: relative;
    width: 42px;
    height: 38px
}

.volume-btn .vol-icon {
    position: absolute;
    inset: 0;
    width: 42px;
    height: 38px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none
}

.volume-btn .vol-2 {
    opacity: 1
}



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

    .control-btn[aria-label="Download"] {
        display: none;
    }
}

.progress-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    width: 100%;
    height: 10px;
    background-color: var(--opasity-bg)
}

.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;
    height: 0.4rem;
    background-color: var(--opasity-bg);
    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;
}


.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;
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0;
    height: 0;
    opacity: 1;
    overflow: hidden;
}

.seek-bar:hover::before {
    background-color: var(--main-color);
}

.seek-bar:hover::after,
.seek-bar.dragging::after {
    opacity: 1;
    background-color: var(--main-color);
    transform: translate(50%, -50%) scale(1.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


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

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

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

    .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);
    }
}

@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;
    }

    .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) {

    .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;
    }
}

@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;
    position: relative;
    z-index: 1001;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

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

@media (hover: none) and (pointer: coarse) {
    .burger-menu:active {
        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: 100px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 100px);
    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;
}

/* Адаптация stations-dropdown для бургер-меню */
.burger-overlay .stations-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    border: none;
    box-shadow: none;
    margin-top: 0;
    background: transparent;
    max-height: none;
    padding: 0;
    z-index: 999999999;
}

.burger-overlay .dropdown-header {
    padding: 20px;
    border-bottom: 1px solid var(--opasity-bg);
    margin-bottom: 20px;
}

.burger-overlay .add-station-btn {
    background: var(--white-color);
    color: var(--main-color);
    border: 1px solid var(--main-color);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    margin-left: 10px;
}

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

@media (hover: none) and (pointer: coarse) {
    .burger-overlay .add-station-btn:active {
        background: var(--main-color);
        color: white;
        border-color: var(--main-color);
    }
}

.burger-overlay .stations-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.burger-overlay .station-item {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(112, 129, 225, 0.1);
    transition: background-color 0.2s ease;
}

.burger-overlay .station-item:hover {
    background: rgba(255, 255, 255, 0.9);
}

.burger-overlay .station-item.active {
    background:  var(--opasity-bg);
}

@media (hover: none) and (pointer: coarse) {
    .burger-overlay .station-item:active {
        background: var(--opasity-bg);
    }
}

.burger-overlay .station-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.burger-overlay .station-details {
    margin-left: 16px;
    flex: 1;
}

.burger-overlay .station-details-top-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.burger-overlay .station-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--txt-color);
    flex: 1;
}

.burger-overlay .edit-station-btn,
.burger-overlay .delete-station-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    margin-left: 8px;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.burger-overlay .edit-station-btn:hover,
.burger-overlay .delete-station-btn:hover {
    background: rgba(112, 129, 225, 0.1);
}

.burger-overlay .edit-station-btn img {
    opacity: 0.8;
    width: 23px;
    height: 23px;
}

.burger-overlay .delete-station-btn img {
    opacity: 0.8;
    width: 23px;
    height: 23px;
}

.burger-overlay .station-genre {
    font-size: 14px;
    color: #181a1bb2;
    margin-bottom: 4px;
}

.burger-overlay .station-listeners {
    font-size: 12px;
    color: var(--main-color);
    font-weight: 500;
}

.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 var(--opasity-bg);
}

.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)
}

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

@media (hover: none) and (pointer: coarse) {
    .burger-nav-link:active {
        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;
    }
}

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

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

    .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
}

@media (hover: hover) and (pointer: fine) {
    .chat-messages::-webkit-scrollbar-thumb:hover {
        background: var(--main-color)
    }
}

@media (hover: none) and (pointer: coarse) {
    .chat-messages::-webkit-scrollbar-thumb:active {
        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 var(--opasity-bg);
    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: var(--main-color);
    transform: translateY(-50%)
}

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

@keyframes typingBlink {

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

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

.install-app-btn {
    display: inline-block;
    font-family: 'Geologica', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--white-color);
    background-color: var(--main-color);
    border: 1px solid var(--main-color);
    border-radius: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box
}

@media (hover: hover) and (pointer: fine) {
    .install-app-btn:hover {
        background-color: transparent;
        color: var(--main-color);
        box-shadow: 0 4px 12px var(--opasity-bg)
    }
}

.install-app-btn:active {
    opacity: 0.9
}