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

body, html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background-color: #e8e8e8;
    font-family: 'Comfortaa', cursive;
    color: #b8b8b8; 
    color-scheme: light; 
}

.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; 
    height: 100dvh; 
    background-color: #e8e8e8;
    background-image: url('https://pub-569f3de0bbca46babc35287e7194de3b.r2.dev/THORN%20SINGH%208%20copy.jpg'); 
    background-size: 100vw auto; 
    background-position: center center; 
    background-repeat: no-repeat;
    z-index: 1;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
}

.player-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh; 
    min-height: 100dvh; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.player-card {
    background: rgba(255, 255, 255, 0.05); 
    border: none; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border-radius: 32px 12px 40px 16px;
    padding: 1.5rem;
    width: 100%;
    max-width: 680px; 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08); 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
    position: relative; 
}

.artwork-container {
    width: 100%;
    max-height: 55vh; 
    aspect-ratio: 1 / 1;
    border-radius: 20px 8px 24px 12px;
    border: none;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

#cover-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
    transition: opacity 0.3s ease;
}

.track-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
}

#artist-name {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    color: #b8b8b8; 
    font-weight: 700;
}

#track-name {
    font-size: 1.6rem; 
    letter-spacing: -0.02em;
    font-weight: 700;
    color: #b8b8b8; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    width: 100%;
    display: block;
    height: 2.2rem;
    line-height: 2.2rem; 
}

.progress-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#seek-bar {
    -webkit-appearance: none; 
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right, #e6e6e6 0%, rgba(255, 255, 255, 0.6) 0%); 
}

#seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e6e6e6; 
    cursor: pointer;
}

#seek-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e6e6e6; 
    cursor: pointer;
    border: none;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: #b8b8b8; 
}

.controls-transport {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

button {
    background: rgba(255, 255, 255, 0.15);
    color: #b8b8b8; 
    border: none; 
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 16px 8px 18px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

button:hover {
    background: #e6e6e6; 
    color: #ffffff;
}

.play-primary {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.3); 
    flex-grow: 1;
}

.controls-links {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

a {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    color: #b8b8b8; 
    border: none; 
    padding: 0.75rem 0.5rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px 16px 10px 14px;
    transition: all 0.2s ease;
}

a:hover {
    background: #e6e6e6; 
    color: #ffffff;
}

/* --- HANGING BUTTONS --- */
#about-btn, #contact-btn {
    position: absolute;
    bottom: -16px; 
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 1.5rem;
    font-size: 0.8rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 40; 
    text-decoration: none;
    font-family: inherit;
    font-weight: 700;
    transition: opacity 0.3s ease, background 0.2s ease, visibility 0.3s;
    display: inline-block;
    cursor: pointer;
}

#about-btn {
    background: #ffe5ec; 
    color: #111111;
    border: none;
}
#about-btn:hover {
    background: #ffd1dc;
    color: #000;
}

/* Updated Contact Button (Solid non-transparent background) */
#contact-btn {
    background: #f0f0f0; 
    color: #888888;
    border: none;
}
#contact-btn:hover {
    background: #e6e6e6; 
    color: #555555;
}

#about-btn.hidden, #contact-btn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- ABOUT MODAL TILE --- */
#about-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffe5ec;
    border-radius: inherit; 
    z-index: 30;
    display: flex;
    flex-direction: column;
    /* Padding removed here so the X button stays pinned */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    color: #111111;
    text-align: left;
    overflow: hidden; /* Prevents the whole modal from scrolling */
}

#about-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Inner content block that handles the scrolling */
.about-content {
    height: 100%;
    overflow-y: auto;
    padding: 3.5rem 2rem 2rem 2rem;
}

/* Custom Pink Scrollbar */
.about-content::-webkit-scrollbar {
    width: 6px; 
}
.about-content::-webkit-scrollbar-track {
    background: #ffe5ec; /* Blends with modal */
}
.about-content::-webkit-scrollbar-thumb {
    background: #ffc2d1; /* Soft pink contrast */
    border-radius: 10px;
}
.about-content::-webkit-scrollbar-thumb:hover {
    background: #ff9ebb; /* Slightly darker pink on hover */
}

#close-about {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    color: #111111;
    border: none;
    font-size: 1.8rem;
    font-weight: 400;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
    z-index: 50; /* Forces the X button to stay above the scrolling text */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#close-about:hover {
    background: transparent;
    color: #555;
    transform: scale(1.1);
}

.about-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-content p {
    font-size: 1.15rem;
    line-height: 1.5;
    font-weight: 600;
}

/* --- ABOUT MODAL SPECIFIC STYLES --- */
.about-image {
    width: 100%;
    max-width: 100%; 
    height: auto;
    border-radius: 0; /* Updated to square/non-rounded corners */
    margin: 1.5rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: block;
    object-fit: cover;
}

.about-content a {
    background: transparent;
    color: #111111;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    text-transform: none;
    text-decoration: underline;
    border-radius: 0;
    display: inline;
}

.about-content a:hover {
    background: transparent;
    color: #555555;
    text-decoration: none;
}

/* Responsive Mobile Scaling */
@media (max-width: 540px) {
    .player-wrapper {
        padding: 1rem;
    }
    
    .player-card {
        padding: 1.15rem;
        gap: 0.8rem; 
        border-radius: 24px 10px 28px 12px;
    }
    
    .artwork-container {
        max-height: 40dvh; 
        border-radius: 16px 6px 20px 8px;
    }

    .controls-transport button {
        padding: 0.6rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .play-primary {
        padding: 0.7rem 0.6rem;
    }

    .controls-links a {
        padding: 0.65rem 0.5rem;
        font-size: 0.75rem;
    }

    #about-btn, #contact-btn {
        bottom: -14px;
        padding: 0.35rem 1.25rem;
        font-size: 0.75rem;
    }

    .about-content {
        padding: 3.5rem 1.5rem 1.5rem 1.5rem;
    }

    .about-content h2 {
        font-size: 1.3rem;
    }
    .about-content p {
        font-size: 1.05rem;
    }
}