/* ============================================
   JUST A CHICKEN - ALBUMS / MUSIC PAGE
   Punk Rock Record Store Aesthetic
   Designed by Autom84You — https://autom84you.com
   ============================================ */

/* ----------------------------------------
   1. ALBUMS HERO
   ---------------------------------------- */
.albums-hero {
    position: relative;
    height: 260px;
    display: flex;
    align-items: flex-end;
    padding: 120px 0 40px;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 3px,
            rgba(227, 28, 37, 0.03) 3px,
            rgba(227, 28, 37, 0.03) 4px
        ),
        linear-gradient(
            180deg,
            var(--black) 0%,
            var(--dark) 60%,
            var(--black) 100%
        );
    overflow: hidden;
    border-bottom: 3px solid var(--red);
}

.albums-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(227, 28, 37, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 107, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.albums-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to top, var(--black), transparent);
    pointer-events: none;
}

.albums-hero .container {
    position: relative;
    z-index: 2;
}

.albums-hero-title {
    font-family: var(--font-punk);
    font-size: clamp(2.4rem, 6vw, 4rem);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1.1;
    position: relative;
}

/* Glitch effect for hero title */
.albums-hero-title.glitch {
    animation: albums-glitch-skew 4s infinite linear alternate-reverse;
}

.albums-hero-title.glitch::before,
.albums-hero-title.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.albums-hero-title.glitch::before {
    color: var(--red);
    z-index: -1;
    animation: albums-glitch-1 0.3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.albums-hero-title.glitch::after {
    color: var(--orange);
    z-index: -2;
    animation: albums-glitch-2 0.3s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes albums-glitch-1 {
    0%   { transform: translate(0); }
    20%  { transform: translate(-3px, 2px); }
    40%  { transform: translate(3px, -1px); }
    60%  { transform: translate(-2px, 1px); }
    80%  { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes albums-glitch-2 {
    0%   { transform: translate(0); }
    20%  { transform: translate(3px, -2px); }
    40%  { transform: translate(-3px, 1px); }
    60%  { transform: translate(2px, -1px); }
    80%  { transform: translate(-2px, 2px); }
    100% { transform: translate(0); }
}

@keyframes albums-glitch-skew {
    0%   { transform: skew(0deg); }
    2%   { transform: skew(-0.5deg); }
    4%   { transform: skew(0deg); }
    48%  { transform: skew(0deg); }
    50%  { transform: skew(0.3deg); }
    52%  { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.albums-hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--cream);
    margin-top: 10px;
    opacity: 0.85;
    letter-spacing: 1px;
}


/* ----------------------------------------
   2. ALBUM CAROUSEL
   ---------------------------------------- */
.album-carousel-section {
    position: relative;
    padding: 50px 0 30px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(227, 28, 37, 0.06) 0%, transparent 60%),
        var(--black);
}

.album-carousel-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 60px;
    overflow: hidden;
}

/* Carousel navigation arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--red);
    background: rgba(10, 10, 10, 0.85);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.carousel-nav:hover {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 0 18px rgba(227, 28, 37, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

/* The scrolling carousel track */
.album-carousel {
    display: flex;
    gap: 20px;
    padding: 40px 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: center;
}

.album-carousel::-webkit-scrollbar {
    display: none;
}

/* Individual album card in the carousel */
.album-carousel-item {
    flex: 0 0 250px;
    width: 250px;
    scroll-snap-align: center;
    cursor: pointer;
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(0.85);
    opacity: 0.6;
    filter: saturate(0.5) brightness(0.75);
    position: relative;
    text-align: center;
    padding: 10px;
}

.album-carousel-item:hover {
    opacity: 0.85;
    filter: saturate(0.75) brightness(0.85);
    transform: scale(0.92);
}

/* SELECTED / ACTIVE album card - pops out like pulling a record from the crate */
.album-carousel-item.selected {
    transform: scale(1.2);
    opacity: 1;
    filter: saturate(1) brightness(1);
    z-index: 5;
}

.album-carousel-item.selected .album-cover {
    box-shadow:
        0 0 0 3px var(--red),
        0 8px 30px rgba(227, 28, 37, 0.35),
        0 0 60px rgba(227, 28, 37, 0.15);
}

.album-carousel-item.selected::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 18px;
    background: radial-gradient(ellipse at center, rgba(227, 28, 37, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Album cover image */
.album-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.45s ease, transform 0.45s ease;
    position: relative;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.album-carousel-item:hover .album-cover img {
    transform: scale(1.03);
}

.album-carousel-item.selected .album-cover img {
    transform: scale(1.0);
}

/* Vinyl peek effect on hover - record sliding out */
.album-cover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background:
        radial-gradient(circle at center,
            var(--dark) 18%,
            transparent 19%,
            transparent 20%,
            #222 21%,
            #222 45%,
            transparent 46%,
            transparent 47%,
            #1a1a1a 48%,
            #1a1a1a 100%
        );
    transform: translate(-50%, -50%) translateX(0);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: -1;
    pointer-events: none;
}

.album-carousel-item:hover .album-cover::before {
    opacity: 0.5;
    transform: translate(-50%, -50%) translateX(30%);
}

.album-carousel-item.selected .album-cover::before {
    opacity: 0;
}

/* Album name below cover */
.album-carousel-name {
    font-family: var(--font-punk);
    font-size: 1rem;
    color: var(--cream);
    margin-top: 12px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-carousel-item.selected .album-carousel-name {
    color: var(--red);
    text-shadow: 0 0 10px rgba(227, 28, 37, 0.3);
}

/* Carousel dot indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 0 20px;
}

.carousel-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicators .indicator:hover {
    background: var(--light-gray);
    transform: scale(1.2);
}

.carousel-indicators .indicator.active {
    background: var(--red);
    box-shadow: 0 0 10px rgba(227, 28, 37, 0.5);
    transform: scale(1.3);
}


/* ----------------------------------------
   3. ALBUM DETAIL SECTION
   ---------------------------------------- */
.album-detail-section {
    padding: 40px 0 120px;
    background:
        linear-gradient(180deg, var(--black) 0%, var(--dark) 30%, var(--black) 100%);
    min-height: 400px;
}

.album-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* Left column: album info */
.album-detail-info {
    padding-right: 20px;
}

.album-detail-badge {
    display: inline-block;
    padding: 4px 16px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-radius: 30px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(227, 28, 37, 0.3);
}

.album-detail-title {
    font-family: var(--font-punk);
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 rgba(227, 28, 37, 0.2);
}

.album-detail-date {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--light-gray);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.album-detail-date i {
    color: var(--red);
    margin-right: 6px;
}

.album-detail-desc {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--cream);
    line-height: 1.8;
    opacity: 0.9;
    max-width: 480px;
}


/* ----------------------------------------
   4. TRACKLIST
   ---------------------------------------- */
.album-detail-tracks {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.tracks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--white);
    letter-spacing: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.tracks-header i {
    color: var(--red);
    margin-right: 10px;
}

.play-all-btn {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 6px 18px;
    border-radius: 30px;
    border: none;
    background: var(--red);
    color: var(--white);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.play-all-btn:hover {
    background: var(--red-glow);
    box-shadow: 0 0 15px rgba(227, 28, 37, 0.4);
    transform: translateY(-1px);
}

.play-all-btn span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tracks list container */
.tracks-list {
    max-height: 450px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--red) var(--dark);
}

.tracks-list::-webkit-scrollbar {
    width: 4px;
}

.tracks-list::-webkit-scrollbar-track {
    background: var(--dark);
}

.tracks-list::-webkit-scrollbar-thumb {
    background: var(--red);
    border-radius: 2px;
}

/* Individual track row */
.track-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.track-item:last-child {
    border-bottom: none;
}

.track-item:hover {
    background: rgba(227, 28, 37, 0.06);
    transform: translateX(4px);
}

.track-item:hover .track-play-btn {
    opacity: 1;
    transform: scale(1);
}

.track-item:hover .track-number {
    opacity: 0;
}

/* Currently playing track */
.track-item.playing {
    background: rgba(227, 28, 37, 0.1);
    border-left: 3px solid var(--red);
    padding-left: 21px;
    box-shadow: inset 4px 0 15px rgba(227, 28, 37, 0.1);
}

.track-item.playing .track-title {
    color: var(--red);
}

.track-item.playing .track-number {
    opacity: 0;
}

.track-item.playing .track-play-btn {
    opacity: 1;
    transform: scale(1);
}

.track-item.playing .track-equalizer {
    display: flex;
}

/* Track number */
.track-number {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--red);
    width: 28px;
    min-width: 28px;
    text-align: center;
    transition: opacity 0.2s ease;
    position: relative;
}

/* Play button overlay on track number */
.track-play-btn {
    position: absolute;
    left: 24px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--red);
    border: none;
    color: var(--white);
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.2s ease;
    z-index: 2;
}

.track-play-btn:hover {
    background: var(--red-glow);
    box-shadow: 0 0 12px rgba(227, 28, 37, 0.5);
}

/* Track title */
.track-title {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--white);
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Track duration */
.track-duration {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--light-gray);
    min-width: 45px;
    text-align: right;
    letter-spacing: 1px;
}

/* Empty state */
.tracks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--light-gray);
}

.tracks-empty i {
    font-size: 2.5rem;
    color: var(--red);
    margin-bottom: 16px;
    opacity: 0.5;
}

.tracks-empty p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    opacity: 0.7;
}


/* ----------------------------------------
   5. EQUALIZER ANIMATION (PLAYING INDICATOR)
   ---------------------------------------- */
.track-equalizer {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    margin-left: 10px;
}

.track-equalizer .eq-bar {
    width: 3px;
    border-radius: 2px 2px 0 0;
    background: var(--red);
}

.track-equalizer .eq-bar:nth-child(1) {
    animation: eq-bounce-1 0.5s ease-in-out infinite alternate;
}

.track-equalizer .eq-bar:nth-child(2) {
    animation: eq-bounce-2 0.7s ease-in-out infinite alternate;
}

.track-equalizer .eq-bar:nth-child(3) {
    animation: eq-bounce-3 0.45s ease-in-out infinite alternate;
}

.track-equalizer .eq-bar:nth-child(4) {
    animation: eq-bounce-4 0.6s ease-in-out infinite alternate;
}

@keyframes eq-bounce-1 {
    0%   { height: 4px; }
    100% { height: 16px; }
}

@keyframes eq-bounce-2 {
    0%   { height: 12px; }
    100% { height: 5px; }
}

@keyframes eq-bounce-3 {
    0%   { height: 6px; }
    100% { height: 14px; }
}

@keyframes eq-bounce-4 {
    0%   { height: 10px; }
    100% { height: 3px; }
}

/* Pause the equalizer when track is paused */
.track-item.playing.paused .track-equalizer .eq-bar {
    animation-play-state: paused;
}


/* ----------------------------------------
   6. AUDIO PLAYER (STICKY BOTTOM BAR)
   ---------------------------------------- */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background:
        linear-gradient(180deg, rgba(20, 20, 20, 0.97) 0%, rgba(10, 10, 10, 0.99) 100%);
    border-top: 2px solid var(--red);
    backdrop-filter: blur(20px);
    padding: 0;
    box-shadow:
        0 -4px 30px rgba(0, 0, 0, 0.6),
        0 -1px 0 rgba(227, 28, 37, 0.3);
    animation: player-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Red ambient glow on top edge */
.audio-player::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, rgba(227, 28, 37, 0.1), transparent);
    pointer-events: none;
}

.player-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 20px;
    position: relative;
}

/* Album art thumbnail with vinyl overlay */
.player-cover {
    position: relative;
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Spinning vinyl overlay when playing */
.player-vinyl-spin {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background:
        radial-gradient(circle at center,
            rgba(10, 10, 10, 0.9) 20%,
            transparent 21%,
            transparent 22%,
            rgba(30, 30, 30, 0.5) 23%,
            rgba(30, 30, 30, 0.5) 44%,
            transparent 45%,
            transparent 46%,
            rgba(20, 20, 20, 0.4) 47%,
            rgba(20, 20, 20, 0.4) 100%
        );
}

.audio-player.playing .player-vinyl-spin {
    opacity: 0.6;
    animation: vinyl-rotate 2s linear infinite;
}

@keyframes vinyl-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Song info */
.player-info {
    min-width: 120px;
    max-width: 200px;
    overflow: hidden;
}

.player-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.player-album {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--light-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Transport controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--red);
    transform: scale(1.08);
}

.player-btn:active {
    transform: scale(0.95);
}

/* Main play/pause button - larger and red */
.player-btn-play {
    width: 44px;
    height: 44px;
    background: var(--red);
    color: var(--white);
    font-size: 1rem;
    box-shadow: 0 2px 12px rgba(227, 28, 37, 0.35);
}

.player-btn-play:hover {
    background: var(--red-glow);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(227, 28, 37, 0.5);
    transform: scale(1.12);
}

/* Small buttons (shuffle, repeat, mute) */
.player-btn-sm {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    background: transparent;
}

.player-btn-sm:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Active states for shuffle/repeat */
.player-btn-sm.active {
    color: var(--red);
    text-shadow: 0 0 8px rgba(227, 28, 37, 0.4);
}

.player-btn-sm.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--red);
}

.player-btn-sm {
    position: relative;
}

/* Progress bar section */
.player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.player-time {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--light-gray);
    min-width: 36px;
    text-align: center;
    letter-spacing: 1px;
    user-select: none;
}

.player-progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: height 0.15s ease;
}

.player-progress-bar:hover {
    height: 7px;
}

.player-progress-bar:hover .player-progress-thumb {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* Red fill */
.player-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red), var(--red-glow));
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

/* Active/playing animated pulse on the fill edge */
.audio-player.playing .player-progress-fill::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red-glow);
    box-shadow: 0 0 6px var(--red-glow);
    animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% { box-shadow: 0 0 4px var(--red-glow); }
    50%      { box-shadow: 0 0 10px var(--red-glow), 0 0 20px rgba(227, 28, 37, 0.3); }
}

/* Draggable thumb handle */
.player-progress-thumb {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0.5);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 6px rgba(227, 28, 37, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

/* Extras: shuffle, repeat, volume */
.player-extras {
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Volume slider - custom range input */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.volume-slider:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Webkit slider thumb */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--red);
    cursor: pointer;
    box-shadow: 0 0 4px rgba(227, 28, 37, 0.4);
    transition: all 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--red-glow);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(227, 28, 37, 0.6);
}

/* Firefox slider thumb */
.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--red);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(227, 28, 37, 0.4);
}

.volume-slider::-moz-range-thumb:hover {
    background: var(--red-glow);
}

.volume-slider::-moz-range-track {
    background: transparent;
    border: none;
}

/* Close / dismiss player button */
.player-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--light-gray);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.player-close:hover {
    background: rgba(227, 28, 37, 0.2);
    color: var(--red);
    transform: rotate(90deg);
}


/* ----------------------------------------
   7. TRACKS HEADER BUTTONS
   ---------------------------------------- */
.tracks-header-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-album-btn {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 6px 18px;
    border-radius: 30px;
    border: 1px solid var(--red);
    background: transparent;
    color: var(--red);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.download-album-btn:hover {
    background: rgba(227, 28, 37, 0.1);
    box-shadow: 0 0 15px rgba(227, 28, 37, 0.2);
    transform: translateY(-1px);
}

.download-album-btn span {
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ----------------------------------------
   8. PURCHASE / DOWNLOAD MODAL
   ---------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-content {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.purchase-modal {
    background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
    border: 1px solid rgba(227, 28, 37, 0.3);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 32px;
    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(227, 28, 37, 0.08);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--red) transparent;
}

.purchase-modal::-webkit-scrollbar {
    width: 4px;
}

.purchase-modal::-webkit-scrollbar-thumb {
    background: var(--red);
    border-radius: 2px;
}

.purchase-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--light-gray);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.purchase-modal .modal-close:hover {
    background: rgba(227, 28, 37, 0.2);
    color: var(--red);
    border-color: var(--red);
    transform: rotate(90deg);
}

/* Purchase header with album cover */
.purchase-header {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.purchase-album-cover {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.5),
        0 0 0 2px rgba(227, 28, 37, 0.2);
}

.purchase-album-info {
    flex: 1;
}

.purchase-title {
    font-family: var(--font-punk);
    font-size: 1.5rem;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 4px;
}

.purchase-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--light-gray);
    margin-bottom: 10px;
}

.purchase-price-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(227, 28, 37, 0.1);
    border: 1px solid rgba(227, 28, 37, 0.25);
    border-radius: 8px;
    padding: 6px 14px;
}

.price-amount {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--red);
    letter-spacing: 1px;
}

.price-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* What's included */
.purchase-includes {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.purchase-includes h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--white);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.purchase-includes h4 i {
    color: var(--green, #4caf50);
    margin-right: 6px;
}

.purchase-includes ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.purchase-includes li {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--cream);
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.purchase-includes li i {
    color: var(--red);
    font-size: 0.7rem;
    width: 14px;
    text-align: center;
}

/* Purchase form */
.purchase-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.purchase-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.purchase-field label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--light-gray);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.purchase-field label i {
    color: var(--red);
    margin-right: 4px;
    width: 14px;
    text-align: center;
}

.purchase-field input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gray);
    transition: all 0.2s ease;
    outline: none;
}

.purchase-field input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.purchase-row {
    display: flex;
    gap: 14px;
}

.purchase-submit-btn {
    margin-top: 6px;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 2px;
    border: none;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: var(--white);
    cursor: not-allowed;
    opacity: 0.45;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-submit-btn span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.purchase-coming-soon {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--orange);
    letter-spacing: 1px;
    padding: 8px 14px;
    background: rgba(255, 107, 0, 0.08);
    border: 1px dashed rgba(255, 107, 0, 0.25);
    border-radius: 8px;
}

.purchase-coming-soon i {
    margin-right: 6px;
}

.purchase-secure {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--gray);
    opacity: 0.6;
}

.purchase-secure i {
    margin-right: 4px;
}


/* ----------------------------------------
   9. RESPONSIVE DESIGN
   ---------------------------------------- */

/* Tablets and below */
@media (max-width: 1024px) {
    .album-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .album-detail-info {
        padding-right: 0;
        text-align: center;
    }

    .album-detail-desc {
        max-width: 100%;
        margin: 0 auto;
    }

    .player-info {
        max-width: 150px;
    }

    .volume-slider {
        width: 60px;
    }
}

/* Mobile landscape / small tablets */
@media (max-width: 768px) {
    .albums-hero {
        height: 220px;
        padding: 100px 0 30px;
    }

    .albums-hero-title {
        font-size: 2rem;
    }

    /* Carousel adjustments */
    .album-carousel-wrapper {
        padding: 0 45px;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .carousel-prev {
        left: 4px;
    }

    .carousel-next {
        right: 4px;
    }

    .album-carousel {
        gap: 14px;
        padding: 30px 14px;
    }

    .album-carousel-item {
        flex: 0 0 180px;
        width: 180px;
    }

    .album-carousel-item.selected {
        transform: scale(1.12);
    }

    /* Track items */
    .track-item {
        padding: 12px 16px;
    }

    .track-play-btn {
        left: 16px;
    }

    /* Audio player: two-row layout for mobile */
    .player-inner {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }

    .player-cover {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .player-info {
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .player-controls {
        gap: 4px;
    }

    .player-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .player-btn-play {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    /* Progress bar spans full width as second row */
    .player-progress {
        order: 10;
        flex-basis: 100%;
        margin-top: -4px;
    }

    .player-extras {
        display: none;
    }

    .player-close {
        position: absolute;
        top: 6px;
        right: 8px;
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .album-detail-section {
        padding: 30px 0 100px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .albums-hero {
        height: 200px;
        padding: 100px 0 24px;
    }

    .albums-hero-title {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }

    .albums-hero-subtitle {
        font-size: 0.85rem;
    }

    .album-carousel-wrapper {
        padding: 0 36px;
    }

    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .album-carousel {
        gap: 10px;
        padding: 20px 10px;
    }

    .album-carousel-item {
        flex: 0 0 150px;
        width: 150px;
    }

    .album-carousel-item.selected {
        transform: scale(1.08);
    }

    .album-carousel-name {
        font-size: 0.85rem;
    }

    .carousel-indicators .indicator {
        width: 8px;
        height: 8px;
    }

    /* Album detail */
    .album-detail-title {
        font-size: 1.6rem;
    }

    .album-detail-desc {
        font-size: 0.9rem;
    }

    /* Simplified track layout */
    .tracks-header {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .track-item {
        padding: 10px 14px;
        gap: 10px;
    }

    .track-play-btn {
        left: 14px;
        width: 24px;
        height: 24px;
        font-size: 0.55rem;
    }

    .track-title {
        font-size: 0.85rem;
    }

    .track-duration {
        font-size: 0.8rem;
        min-width: 38px;
    }

    .track-equalizer {
        display: none !important;
    }

    /* Purchase modal */
    .purchase-modal {
        padding: 24px 20px;
    }

    .purchase-header {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .purchase-album-cover {
        width: 80px;
        height: 80px;
    }

    .purchase-title {
        font-size: 1.2rem;
    }

    .purchase-includes ul {
        grid-template-columns: 1fr;
    }

    .tracks-header-btns {
        flex-direction: column;
        gap: 4px;
    }

    /* Player: ultra compact */
    .player-inner {
        padding: 6px 10px;
        gap: 6px;
    }

    .player-cover {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 4px;
    }

    .player-title {
        font-size: 0.8rem;
    }

    .player-album {
        font-size: 0.65rem;
    }

    .player-btn {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    .player-btn-play {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .player-time {
        font-size: 0.7rem;
        min-width: 30px;
    }
}
