@import url('https://fonts.googleapis.com/css2?family=Jura:wght@400;600;700&display=swap');

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at 20% 30%, #667EEA 0%, rgba(102, 126, 234, 0.6) 15%, transparent 40%),
    radial-gradient(ellipse at 80% 70%, #764BA2 0%, rgba(118, 75, 162, 0.6) 15%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, #000000 0%, #0A0A0A 50%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1s ease-in-out 2s forwards;
}

#splash-screen img {
    width: 250px;
    height: 250px;
    object-fit: contain;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Jura", sans-serif;
    user-select: none;
}

body {
    overflow: hidden;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: #000000;
}

.sidebar {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px 10px;
    border-radius: 20px;
}

.btn {
    background-color: transparent;
    color: #FFFFFF;
    font-size: 40px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn:hover {
    transform: scale(1.2);
}

.btn i {
    vertical-align: middle;
}

.volume-icon i, .timeline-icon i {
    font-size: 28px;
    vertical-align: middle;
    color: #FFFFFF;
}

.animation-select select {
    background-color: rgba(0, 0, 0, 0.5);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 5px;
    cursor: pointer;
    font-size: 18px;
}

.animation-select select option {
    background-color: #000000;
    color: #FFFFFF;
}

.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
}

.track-info {
    color: #FFFFFF;
    font-size: 18px;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    height: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.track-info.visible {
    opacity: 1;
    height: auto;
}

#timeline {
    width: 100%;
    accent-color: #FFFFFF;
    cursor: pointer;
}

.time-display {
    color: #FFFFFF;
    font-size: 18px;
    text-align: center;
    height: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.time-display.visible {
    opacity: 1;
    height: auto;
}

.sidebar, .footer {
    opacity: 1;
    transition: all 0.6s ease;
}

.sidebar:not(.visible) {
    opacity: 0;
    transform: translate(-150%, -50%);
}

.footer:not(.visible) {
    opacity: 0;
    transform: translate(-50%, 150%);
}

.sidebar.visible {
    transform: translateY(-50%);
}

.footer.visible {
    transform: translateX(-50%);
}

.volume-control, .timeline-control {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.volume-control {
    justify-content: start;
}

#volume {
    width: 200px;
    accent-color: #FFFFFF;
    cursor: pointer;
}

#moon-container {
    position: fixed;
    top: 60px;
    right: 100px;
    width: 200px;
    height: 200px;
    z-index: 10;
    animation: moonDrift 1s infinite alternate ease-in-out, moonWobble 3s infinite ease-in-out;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}

#moon-container.visible {
    opacity: 1;
    visibility: visible;
}

#moon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 230, 0.7));
    animation: moonGlow 5s infinite alternate ease-in-out;
}

@keyframes moonDrift {
    0% {
        transform: translate(-10px, -10px) rotate(-5deg);
    }
    100% {
        transform: translate(10px, 5px) rotate(5deg);
    }
}

@keyframes moonWobble {
    0% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
    100% {
        transform: rotate(-2deg);
    }
}

@keyframes moonGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 230, 0.7))
        drop-shadow(0 0 20px rgba(255, 255, 230, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9))
        drop-shadow(0 0 40px rgba(255, 255, 230, 0.7));
    }
}

.playlist-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    max-width: 350px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 0;
    overflow: hidden;
    opacity: 1;
    transition: all 0.6s ease;
    z-index: 11;
}

.playlist-header {
    flex-shrink: 0;
}

.playlist-content {
    flex-grow: 1;
    overflow-y: scroll; /* Додаємо прокрутку тільки для контенту */
    padding-right: 10px;
}

.playlist-sidebar:not(.visible) {
    opacity: 0;
    transform: translateX(100%);
}

.playlist-sidebar.visible {
    transform: translateX(0);
}

#playlist-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #FFFFFF;
    flex-grow: 1;
}

#playlist-list li {
    cursor: pointer;
    margin: 10px auto;
    padding: 30px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
}

#playlist-list li:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

#playlist-list li.current {
    background: radial-gradient(ellipse at -50% -15%,
                                rgba(170, 150, 255, 100),
                                rgba(170, 150, 255, 100),
                                rgba(70, 130, 255, 70) 50%,
                                rgba(0, 0, 0, 0.8),
                                rgba(0, 0, 0, 0.1));
}

#playlist-list li i.bi-x-circle:hover {
    color: #FF2E2E;
}

.btn.autoplay-toggle i, .btn.repeat-toggle i, #clear-playlist i {
    font-size: 28px;
}

.playlist-sidebar .btn {
    flex: 1;
}

.playlist-sidebar .buttons-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    margin-top: 30px;
}

#playlist-search {
    width: 100%;
    padding: 10px 30px 10px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 18px;
}

#playlist-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-container i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.no-results {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 20px;
    font-size: 18px;
    display: none;
}

.no-results.visible {
    display: block;
}

.footer.hidden {
    display: none;
}

.queue-header {
    color: #FFD700;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    margin-bottom: 10px;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.queue-item {
    background-color: rgba(255, 215, 0, 0.15) !important;
    border-left: 3px solid #FFD700 !important;
}

.queue-item:hover {
    background-color: rgba(255, 215, 0, 0.25) !important;
}

.queue-circle {
    display: inline-block;
    background-color: #FFD700;
    color: #000000;
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    text-align: center;
    margin-right: 10px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.queue-separator {
    height: 2px;
    background: linear-gradient(to right, transparent, #FFD700, transparent);
    margin: 15px 0;
}

.queue-badge {
    display: inline-block;
    background-color: #FFD700;
    color: #000000;
    font-size: 14px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 50%;
    margin-left: 10px;
    min-width: 24px;
    text-align: center;
}

.queue-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: rgba(0, 0, 0, 0.9);
    color: #FFD700;
    padding: 15px 30px;
    border-radius: 10px;
    border: 2px solid #FFD700;
    font-size: 18px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.queue-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}