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

/* Icon swap toggling (Spotify/Bandcamp, shuffle/date) uses this class rather
   than the hidden attribute — some browsers don't reliably reflect el.hidden
   to the actual attribute on inline <svg> elements. */
.icon-swapped-out {
    display: none;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid #b8b8b8;
    outline-offset: 2px;
}

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;
    position: relative; /* Added so z-index takes effect */
    z-index: 5; /* Pulls artwork safely above the giant whirl */
}

#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%;
    position: relative; /* Added so z-index takes effect */
    z-index: 5; /* Pulls the artist name and song title above the giant whirl */
}

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

#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;
    cursor: pointer;
}

#share-btn {
    position: absolute;
    top: 0;
    right: 0.1rem;
    width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    color: #b8b8b8;
    opacity: 0.5;
    cursor: pointer;
}

#share-btn svg {
    width: 100%;
    height: 100%;
}

.track-details:hover #share-btn {
    opacity: 1;
    color: #b8b8b8;
}

#share-status {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #b8b8b8;
    height: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.2s ease;
}

#share-status.visible {
    opacity: 1;
    max-height: 1.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, #ebebeb 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: #ebebeb; 
    cursor: pointer;
}

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

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

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

button {
    appearance: none;
    -webkit-appearance: none;
    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;
    line-height: normal;
    cursor: pointer;
    border-radius: 16px 8px 18px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease; /* Standard fast fade for desktop */
}

/* Same font-metric-leading issue as #discography-link/#order-mode-btn — the
   ⏮/⏭ glyphs sit ~1px high relying on line-height alone. */
#prev-btn,
#next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- DESKTOP HOVER EFFECTS --- */
/* Only triggers if the device has a real mouse cursor */
@media (hover: hover) {
    button:hover {
        background: #ebebeb; 
        color: #ffffff;
    }
}

/* --- MOBILE TOUCH EFFECTS --- */
/* Only triggers on touchscreens */
@media (hover: none) {
    button {
        /* When finger lifts, wait 1s, then fade back over 0.5s */
        transition: all 0.5s ease 1s; 
    }
    button:active {
        background: #ebebeb; 
        color: #ffffff;
        transition: none; /* Instantly apply color on tap */
    }
    
    #next-btn:active {
        background: #ebebeb; 
        color: #000000;
        transition: none;
    }
}

/* --- CUSTOM WHIRL WRAPPER --- */
.forward-button-wrapper {
    position: relative; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* The custom graphic background */
.strike-arrow {
    display: none;
    position: absolute;
    width: 60px; 
    
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    
    pointer-events: none; 
    z-index: 1; 
}

/* --- PULL SURROUNDING BUTTONS TO THE FRONT --- */
.controls-transport button,
.controls-links a {
    position: relative;
    z-index: 5;
}

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

/* --- Buy link (always Bandcamp) --- */
#buy-link-btn {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    background: rgba(255, 255, 255, 0.15);
    color: #b8b8b8;
    border: none;
    padding: 0.75rem 1rem;
    font-family: inherit;
    cursor: pointer;
    border-radius: 16px 8px 18px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

#buy-link-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}

@media (hover: hover) {
    #buy-link-btn:hover {
        background: #ebebeb;
        color: #ffffff;
    }
}

@media (hover: none) {
    #buy-link-btn {
        transition: all 0.5s ease 1s;
    }
    #buy-link-btn:active {
        background: #ebebeb;
        color: #ffffff;
        transition: none;
    }
}

/* --- Song order control (governs Next / auto-advance) --- */
.order-mode-wrapper {
    position: relative;
    display: inline-flex;
}

/* Same fix as #discography-link: appearance:none drops the native button's
   built-in content centering, and the fallback (line-height/padding
   symmetry) sits a couple px high with this font — flex-center explicitly. */
#order-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

#order-mode-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}

.order-mode-menu {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: max-content;
    gap: 0.15rem;
    padding: 0.35rem;
    background: rgba(232, 232, 232, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px 8px 16px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.order-mode-menu[hidden] {
    display: none;
}

.order-mode-menu button {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 10px 6px 12px 6px;
    padding: 0.5rem 0.65rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    color: #8a8a8a;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.order-mode-menu button:hover {
    background: #f4f4f4;
    color: #4a4a4a;
}

.order-mode-menu button[aria-current="true"] {
    background: #d4d4d4;
    color: #3f3f3f;
}

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

/* Flex-centers its text rather than relying on padding/line-height symmetry,
   which the site's custom font renders with slightly uneven leading — that
   was enough to make the label sit visibly high next to the platform icons
   (which are already flex-centered) on some phones. */
#discography-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.platform-links {
    display: flex;
    flex: 1;
    gap: 0.5rem;
}

.platform-link {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
}

.platform-link svg {
    width: 1.1rem;
    height: 1.1rem;
}

.platform-link.is-unavailable {
    opacity: 0.35;
    filter: grayscale(1);
    cursor: not-allowed;
    pointer-events: none;
}

@media (hover: none) {
    .platform-link.is-unavailable {
        transition: none;
    }
}

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

/* Desktop Hover */
@media (hover: hover) {
    a:hover {
        background: #ebebeb;
        color: #ffffff;
    }
}

/* Mobile Touch */
@media (hover: none) {
    a {
        transition: all 0.5s ease 1s; /* 1-second delay before fading out */
    }
    a:active {
        background: #ebebeb;
        color: #ffffff;
        transition: none;
    }
}

/* --- 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;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    color: #111111;
    text-align: left;
    overflow: hidden; 
}

#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; 
}
.about-content::-webkit-scrollbar-thumb {
    background: #ffc2d1; 
    border-radius: 10px;
}
.about-content::-webkit-scrollbar-thumb:hover {
    background: #ff9ebb; 
}

#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; 
    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;
    margin: 1.5rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: block;
    object-fit: cover;
}

/* This image's background isn't transparent — blend it into the pink
   panel instead of showing its own light backdrop as a visible box. */
.mantra-image {
    box-shadow: none;
    mix-blend-mode: multiply;
}

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

/* --- NEWSLETTER SIGNUP (custom, no ConvertKit branding/JS) --- */
.newsletter-form {
    margin: 2rem 0 0.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

.newsletter-form h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.newsletter-field {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.newsletter-field input {
    flex: 1 1 180px;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 30px;
    background: #ffffff;
    color: #111111;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
}

.newsletter-field input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.newsletter-field input:focus {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 1px;
}

.newsletter-field button {
    flex: 0 0 auto;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 30px;
    background: #111111;
    color: #ffe5ec;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.newsletter-field button:hover {
    background: #333333;
}

.newsletter-field button:disabled {
    opacity: 0.6;
    cursor: default;
}

.newsletter-status {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    margin-top: 0.6rem;
    min-height: 1.1em;
}

.newsletter-status.success {
    color: #0c905c;
}

.newsletter-status.error {
    color: #ea4110;
}

.newsletter-disclaimer {
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    color: rgba(0, 0, 0, 0.5);
    margin-top: 0.6rem;
}

/* --- DISCOGRAPHY MODAL TILE --- */
#discography-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ff9000;
    border-radius: inherit;
    z-index: 31;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    color: #000000;
    text-align: left;
    overflow: hidden;
}

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

.discography-content {
    height: 100%;
    overflow-y: auto;
    padding: 3.5rem 1.5rem 1.5rem 1.5rem;
}

.discography-content::-webkit-scrollbar {
    width: 6px;
}
.discography-content::-webkit-scrollbar-track {
    background: #ff9000;
}
.discography-content::-webkit-scrollbar-thumb {
    background: #cc7300;
    border-radius: 10px;
}
.discography-content::-webkit-scrollbar-thumb:hover {
    background: #a35c00;
}

#close-discography {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    color: #000000;
    border: none;
    font-size: 1.8rem;
    font-weight: 400;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
    z-index: 50;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

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

.discography-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.discography-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.discography-header p {
    font-size: 0.85rem;
    font-weight: 600;
}

#discography-search {
    flex: 0 0 auto;
    width: 240px;
    max-width: 100%;
    padding: 0.65rem 0.9rem;
    border: none;
    border-radius: 12px;
    background: #fff0f4;
    color: #1a1a1a;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
}

#discography-search::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

#discography-search:focus {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 1px;
}

.discography-empty {
    display: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.discog-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.discog-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem;
    border-radius: 10px;
    text-decoration: none;
    color: #000000;
    background: rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease;
}

.discog-row:hover {
    background: rgba(0, 0, 0, 0.14);
}

.discog-thumb {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.discog-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.discog-title {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discog-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: #3d2400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 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,
    #buy-link-btn {
        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;
    }

    .discography-content {
        padding: 3.5rem 1rem 1rem 1rem;
    }

    #discography-search {
        width: 100%;
    }

    .discog-thumb {
        width: 2.4rem;
        height: 2.4rem;
    }

    .discog-title {
        font-size: 0.82rem;
    }

    .discog-sub {
        font-size: 0.68rem;
    }
}