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

/* Space Background */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: white;
    min-height: 100vh;
    padding: 10px;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

/* Stars container */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Galaxy background */
.galaxy {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200vmax;
    height: 200vmax;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 70%
    );
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rotate-galaxy 120s linear infinite;
    z-index: -3;
}

/* Star styles */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

.star-small {
    width: 1px;
    height: 1px;
    animation-duration: 2s;
}

.star-medium {
    width: 2px;
    height: 2px;
    animation-duration: 3s;
}

.star-large {
    width: 3px;
    height: 3px;
    animation-duration: 4s;
}



@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Shooting stars */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: shooting 8s linear infinite;
    opacity: 0;
}

@keyframes shooting {
    0% {
        opacity: 0;
        transform: translateX(-100px) translateY(100px);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(100vw) translateY(-100px);
    }
}




html {
    font-size: clamp(14px, 2.5vw, 16px);
}

/* Container base styles */
.container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0); /* Very transparent */
    backdrop-filter: blur(0px); /* No blur */
    border: none;
    border-radius: 20px;
    padding: clamp(20px, 5vw, 40px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    min-height: calc(100vh - 40px);
}

/* Control button styling */
.control-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.control-btn.active {
    background: #174730;
    color: white;
}

.control-btn.repeat-all {
    background: #174730;
}

.control-btn.repeat-one {
    background: #227081;
}

.play-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5em;
    background: rgba(23, 71, 48, 0.8);
}

.play-btn:hover {
    background: rgba(23, 71, 48, 1);
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

/* Progress bar styling */
.progress-container {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #161751, #227081);
    width: 0%;
    transition: width 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9em;
    color: #ccc;
}

/* Volume container styling */
.volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.volume-slider {
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #174730;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #174730;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Enhanced Install Prompt Styles */
.install-prompt {
    background: linear-gradient(135deg, #174730 0%, #174730 100%);
    border: none;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.install-prompt h3 {
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 600;
}

.install-prompt p {
    margin-bottom: 15px;
    font-size: 0.9em;
    opacity: 0.9;
}

.install-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.install-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.install-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.install-btn:active {
    transform: translateY(0);
}

.dismiss-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Song item styling */
.song-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.song-item.active {
    background: rgba(29, 185, 84, 0.3);
    border: 1px solid #174730;
}

.song-info {
    flex: 1;
    text-align: left;
}

.song-info h4 {
    font-size: 0.9em;
    margin-bottom: 2px;
}

.song-info p {
    font-size: 0.8em;
    color: #ccc;
}

/* Loading and hidden utility classes */
.loading {
    text-align: center;
    padding: 20px;
    color: #ccc;
}

.hidden {
    display: none !important;
}

/* Format Toggle Buttons */
.format-toggle {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.format-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-weight: 600;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.format-btn.active {
    background: #174730;
    border-color: #1DB954;
    color: white;
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.3);
}

/* Playlist Scroll adjustments */
.playlist {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
    scrollbar-width: thin;
    scrollbar-color: #174730 rgba(255,255,255,0.1);
}

/* Install status indicator */
.install-status {
    position: fixed;
    top: 20px;
    right: -300px; /* Initial position off-screen */
    background: rgba(29, 185, 84, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.install-status.show {
    right: 20px; /* Slide in */
    transform: translateX(0); /* Ensure it uses the right property if it was used before, maintaining consistency. */
}


/* Responsive adjustments */

/* Styles for screens smaller than 480px */
@media (max-width: 480px) {
    .container {
        width: 95vw;
        border-radius: 15px;
        padding: 20px;
        min-height: calc(100vh - 20px);
    }

    .controls {
        gap: 15px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }

    .play-btn {
        width: 55px;
        height: 55px;
        font-size: 1.4em;
    }
}

/* Styles for screens 768px and wider */
@media (min-width: 768px) {
    .container {
        width: 90vw;
        max-width: 1200px;
    }

    .player {
        display: block; /* Reset to normal flow, not grid */
    }

    .current-song {
        margin-bottom: 30px;
    }

    .progress-container {
        margin: 30px 0;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .controls {
        gap: 40px;
        margin: 30px 0;
    }

    .control-btn {
        width: 55px;
        height: 55px;
        font-size: 1.3em;
    }

    .play-btn {
        width: 70px;
        height: 70px;
        font-size: 1.7em;
    }

    .volume-container {
        max-width: 600px;
        margin: 30px auto;
    }

    .playlist {
        margin-top: 30px;
    }
}

/* Styles for screens 1024px and wider */
@media (min-width: 1024px) {
    .container {
        width: 85vw; /* Further adjust container width */
    }

    .song-title {
        font-size: 2em;
    }

    .song-artist {
        font-size: 1.2em;
    }

    .progress-container {
        max-width: 900px;
    }

    .controls {
        gap: 50px;
        margin: 40px 0;
    }

    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.4em;
    }

    .play-btn {
        width: 80px;
        height: 80px;
        font-size: 2em;
    }

    .volume-container {
        max-width: 700px;
        margin: 40px auto;
    }
}



/* GALAXY & STAR ENHANCEMENTS */

/* Star enhancements */
.star {
    animation: twinkle 4s infinite;
}

.star-small { 
    width: 1px; 
    height: 1px; 
    animation-duration: 3s; 
}
.star-medium { 
    width: 2px; 
    height: 2px; 
    animation-duration: 4s; 
}
.star-large { 
    width: 3px; 
    height: 3px; 
    animation-duration: 5s; 
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.2; 
        transform: scale(1); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.8); 
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
}

/* Shooting star enhancements */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: shooting 3s linear forwards;
    opacity: 0;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.7);
}

@keyframes shooting {
    0% {
        opacity: 0;
        transform: translateX(-100px) rotate(var(--angle, 0deg));
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
        transform: translateX(100vw) translateY(-100px) rotate(var(--angle, 0deg));
    }
}

/* Keep existing player styles below */
/* Universal Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
