/* ==========================================================================
   SPOTIFY-INSPIRED ISLAMIC AUDIO PLAYER - STYLESHEET
   Supports: Desktop, iPad/Tablet, Smartphone (Responsive)
   Design: Deep Obsidian / Forest Emerald & Gold Theme
   ========================================================================== */

:root {
    --sp-bg-base: #0c1412;
    --sp-bg-surface: #14201c;
    --sp-bg-card: #1b2b26;
    --sp-bg-card-hover: #233731;
    --sp-emerald: #10b981;
    --sp-emerald-hover: #059669;
    --sp-emerald-glow: rgba(16, 185, 129, 0.35);
    --sp-gold: #f59e0b;
    --sp-gold-light: #fbbf24;
    --sp-text-main: #f8fafc;
    --sp-text-sub: #94a3b8;
    --sp-text-muted: #64748b;
    --sp-border: rgba(255, 255, 255, 0.08);
    --sp-border-active: rgba(16, 185, 129, 0.4);
    --sp-bar-height: 86px;
    --sp-mobile-bar-height: 64px;
}

/* ==========================================================================
   HOMEPAGE AUDIO SECTION
   ========================================================================== */
.qa-audio-section {
    background: radial-gradient(circle at 80% 20%, rgba(0, 112, 84, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 10% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
                #0a1310;
    color: var(--sp-text-main);
    padding: 70px 0 80px 0;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 70px;
}

.qa-audio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), rgba(245, 158, 11, 0.3), transparent);
}

.audio-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.28);
    color: #34d399;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.audio-main-heading {
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.audio-sub-heading {
    font-size: 0.96rem;
    color: var(--sp-text-sub);
    max-width: 650px;
    margin: 0;
    line-height: 1.6;
}

/* Playlist Filter Pills (Spotify Chips) */
.spotify-filter-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.spotify-filter-nav::-webkit-scrollbar {
    display: none;
}

.spotify-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid var(--sp-border);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.spotify-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.spotify-chip.active {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff;
    border-color: #34d399;
    box-shadow: 0 4px 14px var(--sp-emerald-glow);
}

.spotify-chip .chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.25);
    color: #e2e8f0;
}

.spotify-chip.active .chip-count {
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

/* Audio Search Input */
.spotify-search-wrapper {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.spotify-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--sp-border);
    border-radius: 999px;
    padding: 9px 38px 9px 40px;
    color: #ffffff;
    font-size: 0.86rem;
    transition: all 0.25s ease;
}

.spotify-search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--sp-emerald);
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.spotify-search-input::placeholder {
    color: var(--sp-text-muted);
}

.spotify-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sp-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.spotify-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--sp-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    display: none;
    padding: 2px 6px;
}

.spotify-search-clear:hover {
    color: #ffffff;
}

/* ==========================================================================
   FEATURED NOW PLAYING HERO CARD (Left Column)
   ========================================================================== */
.spotify-hero-card {
    background: linear-gradient(145deg, #182722 0%, #101c18 100%);
    border: 1px solid var(--sp-border);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease;
}

.spotify-hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-cover-container {
    position: relative;
    width: 100%;
    padding-top: 75%;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #0d1714;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.hero-cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.spotify-hero-card:hover .hero-cover-img {
    transform: scale(1.03);
}

.hero-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.hero-play-btn-big {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 62px !important;
    height: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    border: 3px solid rgba(255, 255, 255, 0.25) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 24px rgba(16, 185, 129, 0.55);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
    outline: none !important;
}

.hero-play-btn-big i.bi-play-fill {
    margin-left: 3px;
}

.hero-play-btn-big i.bi-pause-fill {
    margin-left: 0;
}

.hero-play-btn-big:hover {
    transform: translate(-50%, -50%) scale(1.12) !important;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.65), 0 0 32px rgba(52, 211, 153, 0.7);
}

.hero-play-btn-big:active {
    transform: translate(-50%, -50%) scale(0.96) !important;
}

.hero-badge-live {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(12, 20, 18, 0.82) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #34d399 !important;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-width: calc(100% - 28px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-track-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.35;
}

.hero-track-speaker {
    font-size: 0.92rem;
    color: var(--sp-gold-light);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-track-desc {
    font-size: 0.84rem;
    color: var(--sp-text-sub);
    line-height: 1.55;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-meta-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--sp-border);
    font-size: 0.8rem;
    color: var(--sp-text-muted);
}

/* ==========================================================================
   SPOTIFY TRACKLIST TABLE / CARDS (Right Column)
   ========================================================================== */
.spotify-tracklist-container {
    background: rgba(20, 32, 28, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--sp-border);
    border-radius: 24px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.spotify-tracklist-container::-webkit-scrollbar {
    width: 6px;
}
.spotify-tracklist-container::-webkit-scrollbar-track {
    background: transparent;
}
.spotify-tracklist-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

/* Tracklist Header Row */
.spotify-tracklist-header {
    display: grid;
    grid-template-columns: 36px minmax(180px, 1.8fr) minmax(130px, 1.2fr) 75px 60px 42px;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--sp-border);
    color: var(--sp-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Individual Track Item Row */
.spotify-track-item {
    display: grid;
    grid-template-columns: 36px minmax(180px, 1.8fr) minmax(130px, 1.2fr) 75px 60px 42px;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-radius: 14px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
}

.spotify-track-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.spotify-track-item.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--sp-border-active);
}

.spotify-track-item.active .track-title {
    color: #34d399 !important;
    font-weight: 700;
}

/* Column 1: Index / Play Icon / Equalizer */
.track-col-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    position: relative;
    font-size: 0.85rem;
    color: var(--sp-text-muted);
    font-weight: 600;
}

.track-index-num {
    display: block;
}

.track-hover-play {
    display: none;
    font-size: 1.1rem;
    color: #ffffff;
}

.spotify-track-item:hover .track-index-num {
    display: none;
}
.spotify-track-item:hover .track-hover-play {
    display: block;
}

/* Active Playing Equalizer */
.track-eq-anim {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    width: 20px;
    height: 18px;
}

.spotify-track-item.active.playing .track-index-num,
.spotify-track-item.active.playing .track-hover-play {
    display: none !important;
}

.spotify-track-item.active.playing .track-eq-anim {
    display: flex !important;
}

.eq-bar {
    width: 3px;
    background: #10b981;
    border-radius: 2px;
    animation: eqBounce 1.2s ease-in-out infinite alternate;
}
.eq-bar:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 95%; animation-delay: 0.3s; }
.eq-bar:nth-child(3) { height: 40%; animation-delay: 0.15s; }
.eq-bar:nth-child(4) { height: 80%; animation-delay: 0.4s; }

@keyframes eqBounce {
    0% { height: 20%; }
    50% { height: 100%; }
    100% { height: 35%; }
}

/* Column 2: Title & Speaker with Cover */
.track-col-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.track-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #101c18;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.track-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.track-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.spotify-track-item:hover .track-title {
    color: #34d399;
}

.track-speaker {
    font-size: 0.78rem;
    color: var(--sp-text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column 3: Category */
.track-col-category {
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.track-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700 !important;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    color: #0f172a !important;
}

.track-pill-tag i {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: #0f172a !important;
}

.track-pill-tag .track-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Column 4: Play count */
.track-col-plays {
    font-size: 0.78rem;
    color: var(--sp-text-muted);
    white-space: nowrap;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Column 5: Duration */
.track-col-duration {
    font-size: 0.82rem;
    color: var(--sp-text-sub);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

/* Column 6: Action Button (Strictly Circular 100%) */
.track-col-action {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
}

.track-action-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08);
    border: none !important;
    color: #cbd5e1;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    outline: none !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.track-action-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.track-action-btn i.bi-play-fill {
    margin-left: 2px;
}

.track-action-btn:hover {
    background: var(--sp-emerald) !important;
    color: #ffffff !important;
    transform: scale(1.1);
}

.spotify-track-item.active .track-action-btn {
    background: var(--sp-emerald) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px var(--sp-emerald-glow) !important;
}

/* Empty State */
.spotify-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--sp-text-muted);
}
.spotify-empty-state i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 12px;
    display: block;
}

/* ==========================================================================
   PERSISTENT FLOATING BOTTOM PLAYER BAR (Spotify Style)
   ========================================================================== */
.spotify-player-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    background: rgba(12, 20, 18, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    height: var(--sp-bar-height);
    transform: translateY(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.spotify-player-bar.active {
    transform: translateY(0);
}

.player-bar-container {
    height: 100%;
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
}

/* Left Section: Track Info */
.player-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.player-bar-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    background: #14201c;
    flex-shrink: 0;
    cursor: pointer;
}

.player-bar-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.player-bar-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    cursor: pointer;
}

.player-bar-title:hover {
    color: #34d399;
}

.player-bar-speaker {
    font-size: 0.76rem;
    color: var(--sp-text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Center Section: Controls & Progress */
.player-bar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
}

.player-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 6px;
}

.player-btn-icon {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.player-btn-icon:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.player-btn-icon.active {
    color: var(--sp-emerald);
}

.player-btn-icon.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--sp-emerald);
    border-radius: 50%;
}

.player-btn-play-main {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    background: #ffffff;
    color: #000000;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-btn-play-main i.bi-play-fill {
    margin-left: 2px;
}

.player-btn-play-main:hover {
    transform: scale(1.1);
    background: var(--sp-emerald);
    color: #ffffff;
    box-shadow: 0 4px 18px var(--sp-emerald-glow);
}

/* Scrubber / Progress Bar */
.player-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.player-timestamp {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--sp-text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 38px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    user-select: none;
}

.player-timestamp-right {
    text-align: right;
    justify-content: flex-end;
}

.player-slider-track {
    flex-grow: 1;
    position: relative;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    overflow: visible;
    transition: height 0.15s ease, background-color 0.15s ease;
}

.player-slider-track:hover {
    height: 6px;
    background: rgba(255, 255, 255, 0.28);
}

.player-slider-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--sp-emerald);
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    transition: background-color 0.2s ease;
}

.player-slider-track:hover .player-slider-fill {
    background: #34d399;
}

.player-slider-thumb {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    max-width: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    position: absolute !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    opacity: 1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45) !important;
    pointer-events: none !important;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease !important;
    z-index: 2 !important;
}

.player-slider-track:hover .player-slider-thumb {
    transform: translate(-50%, -50%) scale(1.25) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.65), 0 0 10px rgba(52, 211, 153, 0.5) !important;
}

/* Native Range Input Hidden Overlay */
.player-range-input {
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100% + 16px);
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 3;
}

/* Right Section: Volume & Utilities */
.player-bar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

/* Speed Button */
.player-speed-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--sp-border);
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-speed-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Volume Bar */
.player-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 120px;
}

.player-volume-slider {
    flex-grow: 1;
    position: relative;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.player-volume-fill {
    height: 100%;
    border-radius: 999px;
    background: #ffffff;
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

.player-volume-slider:hover .player-volume-fill {
    background: var(--sp-emerald);
}

/* Close Button (X) */
.player-close-btn,
.player-minimize-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--sp-text-sub);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    margin-left: 4px;
}

.player-close-btn:hover,
.player-minimize-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
    transform: scale(1.08);
}

/* ==========================================================================
   FLOATING RESTORE PILL (When Player is Minimized)
   ========================================================================== */
.spotify-restore-pill { display: none !important; }

.spotify-restore-pill:hover {
    transform: scale(1.05);
}

.spotify-restore-pill.show { display: none !important; }

.player-mobile-close-btn {
    display: none !important;
}

/* ==========================================================================
   MOBILE MINI PLAYER & RESPONSIVE RULES (< 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
    /* Dock bottom player cleanly ABOVE bottom-nav-bar as a floating card */
    .spotify-player-bar {
        position: fixed !important;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        margin: 0 auto !important;
        height: 60px !important;
        min-height: 60px !important;
        border-radius: 16px !important;
        background: rgba(14, 23, 20, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(16, 185, 129, 0.35) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.2) !important;
        z-index: 1045 !important;
    }

    .spotify-player-bar:not(.active) {
        transform: translateY(280%) !important;
        pointer-events: none !important;
    }

    .spotify-player-bar.active {
        transform: translateY(0) !important;
    }

    .player-bar-container {
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 0 14px;
        position: relative;
    }

    /* Top thin progress bar on mobile */
    .player-mobile-progress {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: rgba(255, 255, 255, 0.1);
    }

    .player-mobile-progress-fill {
        height: 100%;
        background: var(--sp-emerald);
        width: 0%;
        transition: width 0.2s linear;
    }

    .player-bar-thumb {
        width: 42px;
        height: 42px;
        border-radius: 8px;
    }

    .player-bar-title {
        font-size: 0.85rem;
        max-width: 170px;
    }

    .player-bar-speaker {
        font-size: 0.72rem;
        max-width: 170px;
    }

    /* Hide desktop controls row and right utilities in mini-player */
    .player-bar-center .player-progress-row,
    .player-controls-row .player-btn-icon:not(#player-btn-next):not(#player-mobile-btn-close),
    .player-bar-right {
        display: none !important;
    }

    .player-controls-row .player-btn-icon#player-mobile-btn-close {
        display: inline-flex !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        aspect-ratio: 1 / 1 !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
        flex: 0 0 32px !important;
        flex-shrink: 0 !important;
        background: rgba(255, 255, 255, 0.1);
        color: #cbd5e1;
        border: 1px solid rgba(255, 255, 255, 0.2);
        align-items: center;
        justify-content: center;
        font-size: 0.76rem;
        cursor: pointer;
        transition: all 0.2s ease;
        margin-left: 2px;
    }

    .player-controls-row .player-btn-icon#player-mobile-btn-close:active,
    .player-controls-row .player-btn-icon#player-mobile-btn-close:hover {
        background: rgba(239, 68, 68, 0.22) !important;
        color: #f87171 !important;
        border-color: rgba(239, 68, 68, 0.45) !important;
        transform: scale(0.95);
    }

    .player-controls-row .player-btn-icon#player-mobile-btn-close i {
        display: inline-flex;
        line-height: 1;
        margin: 0;
        padding: 0;
    }

    .player-bar-center {
        width: auto;
        margin: 0;
    }

    .player-controls-row {
        gap: 8px;
        margin-bottom: 0;
    }

    .player-btn-play-main {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 50% !important;
        font-size: 1.05rem;
    }

    /* Tracklist table on tablet / mobile */
    .spotify-tracklist-header {
        display: none;
    }

    .spotify-track-item {
        grid-template-columns: 32px 1fr 40px;
        padding: 8px 10px;
    }

    .track-col-category,
    .track-col-plays,
    .track-col-duration {
        display: none;
    }

    .spotify-hero-card {
        margin-bottom: 24px;
    }

    .audio-main-heading {
        font-size: 1.6rem;
    }

    .spotify-restore-pill { display: none !important; }
}

/* ==========================================================================
   MOBILE FULLSCREEN SHEET MODAL (Spotify Mobile Player Sheet)
   ========================================================================== */
.spotify-fullscreen-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: radial-gradient(circle at 50% 20%, #153228 0%, #0c1512 80%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 20px 24px env(safe-area-inset-bottom, 24px) 24px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    overflow-y: auto;
}

.spotify-fullscreen-modal.active {
    transform: translateY(0);
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sheet-dismiss-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 6px;
}

.sheet-header-meta {
    text-align: center;
}

.sheet-header-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sp-text-muted);
}

.sheet-header-playlist {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.sheet-artwork-wrapper {
    width: 100%;
    max-width: 320px;
    margin: auto auto 24px auto;
    position: relative;
    padding-top: min(100%, 320px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    background: #14201c;
}

.sheet-artwork-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sheet-track-info {
    text-align: left;
    margin-bottom: 20px;
}

.sheet-track-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.sheet-track-speaker {
    font-size: 0.95rem;
    color: var(--sp-gold-light);
    font-weight: 600;
}

.sheet-progress-wrapper {
    margin-bottom: 24px;
}

.sheet-progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--sp-text-sub);
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

.sheet-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 10px;
}

.sheet-btn-play-big {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    background: #ffffff;
    color: #000000;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    outline: none !important;
    font-size: 1.8rem;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease;
}

.sheet-btn-play-big i.bi-play-fill {
    margin-left: 3px;
}

.sheet-btn-play-big:active {
    transform: scale(0.95);
}

.sheet-footer-utilities {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--sp-border);
}

.sheet-speed-pills {
    display: flex;
    gap: 6px;
}

.sheet-speed-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--sp-border);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.sheet-speed-chip.active {
    background: var(--sp-emerald);
    color: #ffffff;
    border-color: #34d399;
}

