/* ===============================================
   04 - MUSIC SECTION - PRODUCTION READY 2025
   Optimized, scalable, performant music player
   Typography-first design with clean iconography
   =============================================== */

/* Optimized CSS Variables */
:root {
    --music-glass: rgba(255, 255, 255, 0.06);
    --music-glass-border: rgba(212, 176, 120, 0.12);
    --music-hover-glass: rgba(255, 255, 255, 0.1);
    --music-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --music-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --music-blur: 16px;
    --music-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --music-glow: 0 0 20px rgba(212, 176, 120, 0.15);

    /* Typography Scale */
    --music-text-xl: 1.125rem;
    --music-text-base: 1rem;
    --music-text-sm: 0.875rem;
    --music-text-xs: 0.75rem;

    /* Standardized Icon Scale - Perfect Harmony */
    --icon-xs: 12px;      /* Tiny details */
    --icon-sm: 16px;      /* Standard UI icons */
    --icon-base: 20px;    /* Default size */
    --icon-md: 24px;      /* Medium importance */
    --icon-lg: 28px;      /* Large interactive */
    --icon-xl: 32px;      /* Primary actions */

    /* Button & Touch Target Sizes */
    --touch-xs: 32px;     /* Minimum touch */
    --touch-sm: 36px;     /* Small buttons */
    --touch-md: 40px;     /* Standard buttons */
    --touch-lg: 44px;     /* Large touch targets */
}

/* ===============================================
   DESKTOP MUSIC SECTION - MODERN LAYOUT
   =============================================== */

.section#music {
    padding: 6rem 0;
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(212, 176, 120, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 176, 120, 0.03) 0%, transparent 50%),
        var(--section-bg);
    transition: var(--music-transition);
    overflow: hidden;
}

.section#music::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, transparent 30%, rgba(212, 176, 120, 0.02) 50%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
    animation: musicBackgroundFloat 20s ease-in-out infinite;
}

@keyframes musicBackgroundFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

.section#music .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.section#music .glass-container {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    -webkit-backdrop-filter: blur(var(--music-blur));
    backdrop-filter: blur(var(--music-blur));
    border-radius: 24px;
    border: 1px solid var(--music-glass-border);
    padding: 3rem;
    box-shadow:
        var(--music-shadow-strong),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: var(--music-transition);
    position: relative;
    overflow: visible;
}

.section#music .glass-container:hover {
    transform: translateY(-2px);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        var(--music-glow);
    border-color: rgba(212, 176, 120, 0.25);
}

/* ===============================================
   SECTION HEADER - PREMIUM STYLING
   =============================================== */

.section#music .section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section#music .section-header::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--gradient-gold);
    border-radius: 1px;
    animation: headerGlow 2s ease-in-out infinite alternate;
}

@keyframes headerGlow {
    0% { box-shadow: 0 0 5px rgba(212, 176, 120, 0.3); }
    100% { box-shadow: 0 0 20px rgba(212, 176, 120, 0.6); }
}

.section#music .section-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    background:
        linear-gradient(135deg, #d4b078 0%, #f4d03f 50%, #d4b078 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(212, 176, 120, 0.3);
    letter-spacing: -2px;
    position: relative;
    /* animation: titleFloat 3s ease-in-out infinite; */ /* Disabled for performance */
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.section#music .section-subtitle {
    font-size: 1.3rem;
    color: var(--accent-gold);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
    /* animation: subtitlePulse 4s ease-in-out infinite; */ /* Disabled for performance */
}

@keyframes subtitlePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ===============================================
   MUSIC CONTENT WRAPPER - ADVANCED LAYOUT
   =============================================== */

.music-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.music-section {
    margin: 3rem 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.music-section::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: -2rem;
    right: -2rem;
    bottom: -1rem;
    background:
        linear-gradient(90deg, transparent, rgba(212, 176, 120, 0.03), transparent);
    border-radius: 20px;
    opacity: 0;
    transition: var(--music-transition);
    pointer-events: none;
}

.music-section:hover::before {
    opacity: 1;
}

.music-section-title {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    font-weight: 800;
    text-align: center;
    position: relative;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.music-section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: 2px;
    /* animation: sectionTitleGlow 3s ease-in-out infinite; */ /* Disabled for performance */
}

@keyframes sectionTitleGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(212, 176, 120, 0.4);
        width: 80px;
    }
    50% {
        box-shadow: 0 0 25px rgba(212, 176, 120, 0.7);
        width: 120px;
    }
}

/* ===============================================
   MUSIC CONTAINERS & LAYOUT - 2025 STYLE
   =============================================== */

#tracks-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    position: relative;
}

/* Track Container with Pagination */
.tracks-wrapper {
    position: relative;
}

.tracks-list {
    max-height: 500px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 176, 120, 0.3) transparent;
}

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

.tracks-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.tracks-list::-webkit-scrollbar-thumb {
    background: rgba(212, 176, 120, 0.3);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.tracks-list::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 176, 120, 0.5);
}

/* Load More Button */
.load-more-section {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 176, 120, 0.1);
}

.load-more-btn {
    background: var(--music-glass);
    -webkit-backdrop-filter: blur(var(--music-blur));
    backdrop-filter: blur(var(--music-blur));
    border: 1px solid var(--music-glass-border);
    border-radius: 8px;
    padding: 0.75rem 2rem;
    color: var(--accent-gold);
    font-size: var(--music-text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--music-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    will-change: transform;
}

.load-more-btn:hover {
    background: var(--music-hover-glass);
    transform: translateY(-1px);
    box-shadow: var(--music-shadow);
    border-color: rgba(212, 176, 120, 0.2);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.load-more-icon {
    width: var(--icon-sm);
    height: var(--icon-sm);
    transition: transform 0.3s ease;
}

.load-more-btn:hover .load-more-icon {
    transform: translateY(2px);
}

#albums-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    justify-content: center;
    padding: 0 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===============================================
   MODERN MUSIC CARDS - SCALABLE DESIGN
   =============================================== */

.modern-music-card {
    background: var(--music-glass);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--music-transition);
}

.modern-music-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--music-shadow-hover);
    border-color: rgba(212, 176, 120, 0.4);
    z-index: 2;
    background: var(--music-hover-glass);
}

.card-content {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1rem;
    align-items: center;
}

/* ===============================================
   TRACK ARTWORK - ADVANCED STYLING
   =============================================== */

.track-artwork {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: var(--music-transition);
}

.track-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.track-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.track-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.artist-name {
    font-size: 0.9rem;
    color: rgba(212, 176, 120, 0.8);
    margin: 0;
}

.duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: var(--music-text-xs);
    font-weight: 600;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--music-transition);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

.modern-music-card:hover .duration-badge {
    background:
        linear-gradient(145deg, rgba(212, 176, 120, 0.9), rgba(184, 149, 95, 0.8));
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(212, 176, 120, 0.4);
}

/* ===============================================
   TRACK INFO - PREMIUM TYPOGRAPHY
   =============================================== */

.track-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    position: relative;
    flex: 1;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.track-name {
    font-size: var(--music-text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.02em;
    line-height: 1.4;
    transition: color 0.2s ease;
    font-family: var(--font-family);
}

.modern-music-card:hover .track-name {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(212, 176, 120, 0.3);
    transform: translateX(3px);
}

.artist-name {
    font-size: var(--music-text-sm);
    color: var(--accent-gold);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    transition: color 0.2s ease, opacity 0.2s ease;
    font-family: var(--font-family);
}

.modern-music-card:hover .artist-name {
    opacity: 1;
    color: #f4d03f;
    transform: translateX(3px);
}

/* ===============================================
   PLAYER CONTROLS - MICRO-INTERACTIONS
   =============================================== */

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ctrl-btn {
    width: var(--touch-sm);
    height: var(--touch-sm);
    border-radius: 50%;
    border: 1px solid rgba(212, 176, 120, 0.25);
    background: rgba(212, 176, 120, 0.08);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--music-transition);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.ctrl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, rgba(212, 176, 120, 0.2), rgba(244, 208, 63, 0.1));
    opacity: 0;
    transition: var(--music-transition);
}

.ctrl-btn:hover {
    background:
        linear-gradient(145deg, rgba(212, 176, 120, 0.2), rgba(212, 176, 120, 0.1));
    transform: scale(1.1) translateY(-2px);
    box-shadow:
        0 8px 20px rgba(212, 176, 120, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(212, 176, 120, 0.5);
}

.ctrl-btn:hover::before {
    opacity: 1;
}

.ctrl-btn:active {
    transform: scale(0.95) translateY(0);
    transition: all 0.1s ease;
}

.ctrl-btn.play-pause {
    width: var(--touch-md);
    height: var(--touch-md);
    background: var(--gradient-gold);
    color: white;
    border: none;
    box-shadow: 0 3px 12px rgba(212, 176, 120, 0.35);
}

@keyframes playBtnPulse {
    0%, 100% {
        box-shadow:
            0 6px 20px rgba(212, 176, 120, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 8px 30px rgba(212, 176, 120, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.ctrl-btn.play-pause:hover {
    background:
        linear-gradient(145deg, #f4d03f, #d4b078);
    transform: scale(1.15) translateY(-3px);
    box-shadow:
        0 12px 35px rgba(212, 176, 120, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.control-icon {
    width: var(--icon-sm);
    height: var(--icon-sm);
    transition: var(--music-transition);
}

.ctrl-btn:hover .control-icon {
    transform: scale(1.1);
}

/* ===============================================
   TRACK ACTIONS - PLATFORM LINKS & VIDEO
   =============================================== */

.track-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.platform-links {
    display: flex;
    gap: 1rem; /* Increased spacing */
    align-items: center;
    margin-right: 1rem; /* Add some margin from edge */
}

.platform-btn {
    width: var(--touch-sm);
    height: var(--touch-sm);
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--music-transition);
    font-size: var(--icon-base);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    will-change: transform;
}

.platform-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--music-transition);
}

.platform-btn:hover::before {
    opacity: 1;
}

/* Platform specific styles with better icons */
.platform-btn.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    font-family: "Font Awesome 6 Brands";
}

.platform-btn.spotify {
    background: linear-gradient(135deg, #1db954, #1aa34a);
    font-family: "Font Awesome 6 Brands";
}

.platform-btn.apple {
    background: linear-gradient(135deg, #000000, #333333);
    font-family: "Font Awesome 6 Brands";
}


.platform-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.platform-btn.youtube:hover {
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.platform-btn.spotify:hover {
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
}

.platform-btn.apple:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.platform-btn:active {
    transform: scale(0.95) translateY(-1px) rotate(0deg);
    transition: all 0.1s ease;
}


/* ===============================================
   ALBUM CARDS - PREMIUM DESIGN
   =============================================== */

.album-card {
    background: var(--music-glass);
    -webkit-backdrop-filter: blur(var(--music-blur));
    backdrop-filter: blur(var(--music-blur));
    border-radius: 16px;
    border: 1px solid var(--music-glass-border);
    padding: 1.5rem;
    text-align: center;
    transition: var(--music-transition);
    box-shadow: var(--music-shadow);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    min-width: 200px;
    max-width: 280px;
    margin: 0 auto;
}

.album-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(212, 176, 120, 0.05), transparent 70%);
    opacity: 0;
    transition: var(--music-transition);
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(212, 176, 120, 0.3);
    border-color: rgba(212, 176, 120, 0.4);
    background:
        linear-gradient(145deg, var(--music-hover-glass) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.album-card:hover::before {
    opacity: 1;
}

.album-artwork {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 0.75rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    transition: var(--music-transition);
    position: relative;
}

.album-card:hover .album-artwork {
    transform: scale(1.05);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(212, 176, 120, 0.3);
}

.album-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--music-transition);
}

.album-card:hover .album-artwork img {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.05);
}

.album-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.3px;
    transition: var(--music-transition);
}

.album-card:hover .album-info h4 {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(212, 176, 120, 0.3);
}

.album-info p {
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
    transition: var(--music-transition);
}

.album-card:hover .album-info p {
    color: #f4d03f;
}

.album-platforms {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* ===============================================
   DARK/LIGHT MODE VARIATIONS
   =============================================== */

[data-theme="dark"] .section#music {
    background:
        radial-gradient(circle at 20% 20%, rgba(212, 176, 120, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 176, 120, 0.05) 0%, transparent 50%),
        var(--gradient-dark);
}

[data-theme="light"] .section#music {
    background:
        radial-gradient(circle at 20% 20%, rgba(212, 176, 120, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 176, 120, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

[data-theme="light"] .section#music .section-title {
    color: var(--text-primary);
}

[data-theme="light"] .section#music .glass-container {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-color: rgba(184, 149, 95, 0.3);
}

[data-theme="light"] .modern-music-card,
[data-theme="light"] .album-card {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    border-color: rgba(184, 149, 95, 0.2);
}

/* ===============================================
   MOBILE RESPONSIVE - 2025 OPTIMIZED
   =============================================== */

@media (max-width: 768px) {
    .section#music {
        padding: 4rem 0;
    }

    .section#music .container {
        padding: 0 1rem;
    }

    .section#music .glass-container {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .section#music .section-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        letter-spacing: -1px;
    }

    .section#music .section-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .music-content-wrapper {
        gap: 2.5rem;
    }

    .music-section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    /* Mobile card layout */
    .card-content {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
        gap: 0.8rem;
    }

    .track-controls-fixed {
        grid-column: 1 / -1;
        justify-content: center;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(212, 176, 120, 0.1);
        gap: 1rem;
    }

    .platform-links {
        gap: 0.75rem;
    }

    .platform-btn {
        width: var(--touch-md);
        height: var(--touch-md);
        font-size: var(--icon-md);
    }


    .track-artwork {
        width: 60px;
        height: 60px;
        border-radius: 12px;
    }

    .track-name {
        font-size: 1rem;
    }

    .artist-name {
        font-size: 0.85rem;
    }

    .platform-links {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        gap: 0.5rem;
        margin-top: 0;
    }

    .track-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .track-controls {
        gap: 1.5rem;
        margin-left: 0;
        align-self: center;
    }

    .play-pause-btn {
        width: 42px;
        height: 42px;
    }


    .platform-links {
        gap: 1rem;
        margin-right: 0;
    }

    .platform-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .ctrl-btn {
        width: var(--touch-md);
        height: var(--touch-md);
    }

    .ctrl-btn.play-pause {
        width: var(--touch-lg);
        height: var(--touch-lg);
    }

    .control-icon {
        width: var(--icon-sm);
        height: var(--icon-sm);
    }

    /* Album cards mobile */
    #albums-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .album-card {
        padding: 1rem;
    }

    .album-artwork {
        width: 80px;
        height: 80px;
    }

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

    /* Mobile album overlay adjustments */
    .album-overlay {
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(4px);
    }

    .album-icons {
        gap: 0.75rem;
    }

    .album-play-icon {
        width: 20px;
        height: 20px;
    }

    .album-youtube-icon {
        font-size: 18px;
    }

    /* Always show overlay on mobile for touch access */
    .album-overlay {
        opacity: 0.7;
    }

    .album-cover:hover .album-overlay {
        opacity: 1;
    }

    .simple-play-btn {
        width: 40px;
        height: 40px;
    }

    .simple-play-btn .play-icon {
        width: 18px;
        height: 18px;
    }

    .album-info h4 {
        font-size: 1.1rem;
    }

    .album-info p {
        font-size: 0.9rem;
    }

    /* Track controls mobile adjustments */
    .track-controls-fixed {
        gap: 0.5rem;
        padding: 0.375rem;
        right: 0.75rem;
    }

    .platform-link {
        width: var(--touch-sm);
        height: var(--touch-sm);
        min-width: 36px;
        min-height: 36px;
    }

    .platform-icon {
        width: var(--icon-sm);
        height: var(--icon-sm);
    }

    .play-pause-btn {
        width: var(--touch-md);
        height: var(--touch-md);
    }

    .play-icon {
        width: var(--icon-md);
        height: var(--icon-md);
    }

    /* Fix mobile layout - no overlap */
    .modern-music-card .card-content {
        padding-right: 0; /* Remove padding on mobile */
    }

    /* Mobile tracks container - simplified layout */
    .modern-music-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* Better text sizing for mobile */
    .track-name {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.2;
    }

    .artist-name {
        font-size: 0.875rem;
        opacity: 0.8;
    }
}

/* Small Mobile Phones - Ultra Compact */
@media (max-width: 480px) {
    .section#music .glass-container {
        padding: 1.25rem 0.75rem;
        border-radius: 20px;
    }

    .section#music .section-title {
        font-size: 1.875rem;
        letter-spacing: -0.02em;
    }

    .music-section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .card-content {
        grid-template-columns: 56px 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .track-artwork {
        width: 56px;
        height: 56px;
        border-radius: 10px;
    }

    .track-name {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .artist-name {
        font-size: var(--music-text-xs);
    }

    .duration-badge {
        padding: 2px 6px;
        font-size: 0.65rem;
        bottom: 4px;
        right: 4px;
    }

    .platform-btn {
        width: var(--touch-sm);
        height: var(--touch-sm);
        font-size: var(--icon-sm);
    }

    .ctrl-btn {
        width: var(--touch-sm);
        height: var(--touch-sm);
    }

    .ctrl-btn.play-pause {
        width: var(--touch-md);
        height: var(--touch-md);
    }


    /* Album cards ultra compact */
    #albums-container {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .album-card {
        padding: 0.75rem;
    }

    .album-artwork {
        width: 90px;
        height: 90px;
    }

    .album-info h4 {
        font-size: 0.95rem;
    }

    .album-info p {
        font-size: var(--music-text-xs);
    }

    /* Extra compact controls for small screens */
    .track-controls-fixed {
        gap: 0.375rem;
        padding: 0.25rem;
        right: 0.5rem;
    }

    .platform-link {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }

    .platform-icon {
        width: var(--icon-xs);
        height: var(--icon-xs);
    }

    .play-pause-btn {
        width: 40px;
        height: 40px;
    }

    /* Ultra compact layout for small mobile */
    .modern-music-card {
        padding: 1rem;
        border-radius: 20px;
    }

    .card-content {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .track-artwork {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }

    .track-controls-fixed {
        padding: 0.75rem;
        gap: 0.5rem;
        border-radius: 14px;
    }

    .platform-link {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .platform-icon {
        width: var(--icon-sm);
        height: var(--icon-sm);
    }

    .play-pause-btn {
        width: 44px;
        height: 44px;
    }

    .track-name {
        font-size: 0.95rem;
    }

    .artist-name {
        font-size: 0.85rem;
    }
}

/* Tiny Screens - Extreme Compact */
@media (max-width: 360px) {
    .card-content {
        grid-template-columns: 50px 1fr;
        gap: 0.5rem;
        padding: 0.625rem;
    }

    .track-artwork {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }

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

    .platform-links {
        gap: 0.5rem;
    }

    .platform-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    #albums-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .album-artwork {
        width: 80px;
        height: 80px;
    }
}

/* ===============================================
   PERFORMANCE OPTIMIZATIONS - PRODUCTION READY
   =============================================== */

/* GPU Acceleration & Hardware Optimization */
.modern-music-card,
.album-card,
.platform-btn,
.ctrl-btn,
.track-artwork,
.load-more-btn {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Contain paint & layout for better performance */
.modern-music-card {
    contain: layout style paint;
}

.track-artwork img {
    contain: paint;
}

/* Optimize scrolling performance */
.tracks-list {
    contain: layout style paint;
    transform: translateZ(0);
}

/* Lazy loading & intersection observer ready */
.modern-music-card[data-loaded="false"] {
    opacity: 0;
    transform: translateY(20px);
}

.modern-music-card[data-loaded="true"] {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .modern-music-card[data-loaded="true"] {
        transition: none;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .modern-music-card:hover,
    .album-card:hover,
    .ctrl-btn:hover,
    .platform-btn:hover,
    .platform-link:hover,
    .play-pause-btn:hover {
        transform: none !important;
    }

    /* Disable all animations that cause shaking */
    .modern-music-card,
    .album-card,
    .platform-link,
    .play-pause-btn {
        transform: none !important;
        will-change: auto;
    }

    /* Increase touch targets */
    .ctrl-btn,
    .platform-btn,
    .platform-link {
        min-width: 44px;
        min-height: 44px;
    }
}

/* High performance mode for low-end devices */
@media (max-width: 480px) and (max-height: 800px) {
    .modern-music-card::before,
    .album-card::before {
        display: none;
    }

    .section#music::before {
        display: none;
    }

    .tracks-list {
        /* -webkit-overflow-scrolling: touch; */ /* Deprecated property */
        overscroll-behavior: contain;
    }

    /* Reduce blur on low-end devices */
    .modern-music-card,
    .album-card,
    .video-modal {
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
}

/* Battery saving mode */
@media (prefers-reduced-motion: reduce) {
    .modern-music-card,
    .album-card,
    .platform-btn,
    .ctrl-btn {
        transition: none;
    }

    .music-section-title,
    .section#music .section-title,
    .track-name,
    .artist-name,
    .album-title,
    .album-artist,
    h1, h2, h3, h4, h5, h6 {
        animation: none !important;
        transform: none !important;
    }
}

/* ===============================================
   LEGACY SUPPORT
   =============================================== */

.music-card,
.modern-player-card {
    background: var(--music-glass);
    border-radius: 16px;
    border: 1px solid var(--music-glass-border);
    overflow: hidden;
    transition: var(--music-transition);
    position: relative;
    box-shadow: var(--music-shadow-soft);
}

.music-card:hover,
.modern-player-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--music-shadow-strong);
    border-color: rgba(212, 176, 120, 0.4);
}

/* ===============================================
   ADVANCED ANIMATIONS - PRODUCTION OPTIMIZED
   =============================================== */

/* Smooth entrance animations */
@keyframes musicCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes musicHeaderFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes platformBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Staggered entrance animations */
.modern-music-card {
    animation: musicCardSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
}

.modern-music-card:nth-child(1) { animation-delay: 0.1s; }
.modern-music-card:nth-child(2) { animation-delay: 0.2s; }
.modern-music-card:nth-child(3) { animation-delay: 0.3s; }
.modern-music-card:nth-child(4) { animation-delay: 0.4s; }
.modern-music-card:nth-child(5) { animation-delay: 0.5s; }

/* Section header animations */
.music-section-title {
    animation: musicHeaderFloat 4s ease-in-out infinite;
}

/* Interactive hover animations */
.platform-btn:active {
    animation: platformBounce 0.3s ease;
}

/* Loading animation */
@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.loading-card {
    background: var(--music-glass);
    border-radius: 12px;
    height: 80px;
    margin-bottom: 0.75rem;
    animation: loadingPulse 2s ease-in-out infinite;
}

/* Scroll animations */
@keyframes scrollFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    animation: scrollFadeIn 0.8s ease-out forwards;
}

/* Micro-interactions */
.duration-badge {
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.modern-music-card:hover .duration-badge {
    transform: scale(1.05);
    background: rgba(212, 176, 120, 0.9);
    color: #000;
}

/* Enhanced focus states for accessibility */
.ctrl-btn:focus,
.platform-btn:focus,
.load-more-btn:focus {
    outline: 2px solid rgba(212, 176, 120, 0.6);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(212, 176, 120, 0.2);
}

/* State transitions */
.playing-track {
    background: var(--music-active-glass);
    border-color: rgba(212, 176, 120, 0.4);
}

.playing-track .track-name {
    color: var(--accent-gold);
}


/* Album card class consistency */
.modern-album-card {
    background: var(--music-glass);
    -webkit-backdrop-filter: blur(var(--music-blur));
    backdrop-filter: blur(var(--music-blur));
    border-radius: 12px;
    border: 1px solid var(--music-glass-border);
    padding: 1rem;
    text-align: center;
    transition: var(--music-transition);
    box-shadow: var(--music-shadow);
    position: relative;
    overflow: hidden;
}

.modern-album-card:hover {
    transform: translateY(-3px); /* Reduced animation */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(212, 176, 120, 0.3);
    background: var(--music-hover-glass);
}

.album-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Simple YouTube Button for Albums */
.simple-youtube-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--touch-lg);
    height: var(--touch-lg);
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--music-transition);
    opacity: 0;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    will-change: transform;
}

.simple-youtube-btn:hover {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.album-cover:hover .simple-youtube-btn {
    opacity: 1;
}

.simple-youtube-icon {
    width: var(--icon-md);
    height: var(--icon-md);
    color: white;
    margin-left: 2px; /* Offset for play icon optical alignment */
}

/* Remove old conflicting styles */
.music-grid,
.music-artwork,
.play-overlay,
.play-btn,
.music-info,
.music-title,
.music-artist,
.music-links,
.platform-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.platform-link.youtube {
    color: #ff0000;
}

.platform-link.youtube:hover {
    background: linear-gradient(145deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.1));
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 25px rgba(255, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 0, 0, 0.3);
}

.platform-link.spotify {
    color: #1db954;
}

.platform-link.spotify:hover {
    background: linear-gradient(145deg, rgba(29, 185, 84, 0.2), rgba(29, 185, 84, 0.1));
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 25px rgba(29, 185, 84, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(29, 185, 84, 0.3);
}

.platform-link.apple {
    color: #fc3c44;
}

.platform-link.apple:hover {
    background: linear-gradient(145deg, rgba(252, 60, 68, 0.2), rgba(252, 60, 68, 0.1));
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 25px rgba(252, 60, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(252, 60, 68, 0.3);
}

.platform-icon {
    width: var(--icon-md);
    height: var(--icon-md);
    transition: var(--music-transition);
}

/* Fixed Track Controls - Right Side */
.track-controls-fixed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.play-pause-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d4b078, #b8965f);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-icon {
    width: 20px;
    height: 20px;
    color: rgba(0, 0, 0, 0.8);
    margin-left: 2px;
}

.platform-link {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.platform-link.spotify {
    color: #1db954;
    background: rgba(29, 185, 84, 0.1);
}

.platform-link.apple {
    color: #fc3c44;
    background: rgba(252, 60, 68, 0.1);
}

.platform-link.youtube {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
}

.platform-icon {
    width: 20px;
    height: 20px;
}

/* Professional Track Controls Layout (Legacy) */
.track-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Clean spacing */
}

.play-pause-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #d4b078, #b8965f);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 8px 25px rgba(212, 176, 120, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.play-pause-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-pause-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 12px 35px rgba(212, 176, 120, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        0 0 0 3px rgba(212, 176, 120, 0.2);
}

.play-pause-btn:hover::before {
    opacity: 1;
}

.play-pause-btn .play-icon {
    width: var(--icon-lg);
    height: var(--icon-lg);
    color: rgba(0, 0, 0, 0.8);
    margin-left: 2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}



/* Album Cover for Modern Album Cards */
.album-cover {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 0.75rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    transition: var(--music-transition);
    position: relative;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--music-transition);
}

.album-cover:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.album-cover:hover img {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.05);
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--music-transition);
    backdrop-filter: blur(2px);
}

.album-cover:hover .album-overlay {
    opacity: 1;
}

.album-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.album-play-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.album-youtube-icon {
    font-size: 20px;
    color: #ff0000;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

