/* Discography CSS - HerbalMuzic.com */

/* Import main site variables and styles - Use existing CSS custom properties */
/* This ensures consistency with the main site theme */

/* Discography-specific color variables */
:root {
    --bg-color: #0f1216;
    --sidebar-bg: #151a21;
    --card-bg: #1a2028;
    --primary-color: #00ff88;
    --primary-hover: #00cc6b;
    --secondary-color: #00ffff;
    --accent-color: #ff0055;
    --text-primary: #ffffff;
    --text-secondary: #a0a8b3;
    --text-muted: #6b7280;
    --text-color: #ffffff;
    --border-color: #2a323d;
    --danger-color: #ff0055;
    --success-color: #00ff88;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --transition-normal: 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Layout */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    padding: 20px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ensure discography content doesn't get hidden behind fixed navigation */
body {
    padding-top: 70px; /* Account for navbar height */
}

/* Adjust for different screen sizes */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
        padding-top: 80px; /* Navbar might be taller on mobile */
    }
    
    .main-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 90px; /* Even taller navbar on very small screens */
    }
    
    .main-content {
        padding: 12px;
    }
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-header {
    margin-bottom: 24px;
}

.sidebar-header h3 {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
}

.sidebar-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
}

.nav-btn:hover {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.nav-btn.active {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    font-weight: 600;
}

.nav-btn i {
    font-size: 1.1rem;
}

/* Viewport */
.viewport {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    min-height: 600px;
    overflow-x: hidden;
}

/* Adjust viewport padding on desktop for narrow screens to prevent horizontal overflow */
@media (min-width: 769px) and (max-width: 1200px) {
    .viewport {
        padding: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .viewport {
        padding: 18px;
    }
}

@media (min-width: 769px) and (max-width: 900px) {
    .viewport {
        padding: 16px;
    }
}

@media (min-width: 769px) and (max-width: 800px) {
    .viewport {
        padding: 14px;
    }
}

@media (min-width: 769px) and (max-width: 768px) {
    .viewport {
        padding: 12px;
    }
}

/* Adjust viewport padding on mobile to prevent horizontal overflow */
@media (max-width: 768px) {
    .viewport {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .viewport {
        padding: 12px;
    }
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.view-header h1 {
    font-family: var(--font-family-heading);
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.view-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 250px;
    transition: var(--transition-normal);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.filter-select {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Featured Section */
.featured-section {
    margin-bottom: 32px;
}

.featured-section h2 {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.featured-album {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-color));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: center;
}

.album-art {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    max-width: 100%;
    box-sizing: border-box;
}

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

.album-art:hover img {
    transform: scale(1.05);
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

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

.play-overlay-btn {
    background: var(--primary-color);
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.play-overlay-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.album-info h3 {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.album-info p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 16px;
}

.album-actions {
    display: flex;
    gap: 12px;
}

.btn-play, .btn-shuffle {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-play:hover, .btn-shuffle:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-shuffle {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-shuffle:hover {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.action-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.action-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.action-card span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Browse Sections */
.browse-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.section-header h3 {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.section-header .view-all {
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 25%;
    min-width: 70px;
}

/* Force mobile view all buttons to stay within bounds */
@media (max-width: 768px) {
    .section-header {
        flex-wrap: wrap;
    }
    
    .section-header h3 {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .section-header .view-all {
        flex: 0 0 auto;
        max-width: 40%;
        min-width: 80px;
        order: 2;
    }
}

@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .section-header h3 {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
    
    .section-header .view-all {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        order: 2;
    }
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    transition: var(--transition-normal);
}

.view-all:hover {
    text-decoration: underline;
    background-color: rgba(0, 255, 136, 0.1);
}

/* Enhanced mobile visibility for view all buttons */
@media (max-width: 768px) {
    .view-all {
        font-size: 0.9rem;
        padding: 8px 14px;
        min-height: 36px;
    }
}

@media (max-width: 480px) {
    .view-all {
        font-size: 0.85rem;
        padding: 10px 16px;
        min-height: 40px;
    }
}

/* Grid Layouts */
.album-grid, .artist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    overflow-x: hidden;
}

/* Enhanced responsive behavior for album grid */
.album-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Ensure albums shrink properly on smaller screens */
@media (max-width: 992px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .album-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .album-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }
}

/* Ensure latest albums section specifically adapts well */
#latest-albums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    #latest-albums {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    #latest-albums {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

/* Fix overflow issues for discover tab sections on tall and thin displays */
@media (max-width: 1200px) and (min-width: 993px) {
    .album-grid, .artist-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    
    #latest-albums {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    .album-grid, .artist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    #latest-albums {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) and (min-width: 577px) {
    .album-grid, .artist-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    #latest-albums {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 576px) and (min-width: 481px) {
    .album-grid, .artist-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }
    
    #latest-albums {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .album-grid, .artist-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
    }
    
    #latest-albums {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }
}

/* ULTRA-AGGRESSIVE MOBILE OVERFLOW PREVENTION FOR DISCOVER TAB SECTIONS */
@media (max-width: 768px) {
    /* Force single column layout for all discover sections on mobile */
    .section .album-grid, .section .artist-grid, #latest-albums, #popular-songs {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
    
    /* Ensure section content stays within bounds */
    .section {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }
    
    /* Ensure individual items don't overflow */
    .album-item, .artist-item, .song-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Force artwork to fit within container */
    .album-item .album-art, .artist-item .artist-photo, .song-item .song-art {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: 200px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    .album-item .album-art img, .artist-item .artist-photo img, .song-item .song-art img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        max-width: 100% !important;
        max-height: 200px !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Fix song item layout for mobile */
    .song-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px !important;
    }
    
    .song-art {
        width: 60px !important;
        height: 60px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    
    .song-content {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    
    .song-info h4, .song-info p {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
    }
    
    .song-actions {
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        width: auto !important;
        min-width: 0 !important;
    }
    
    .song-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 6px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    
    /* Ensure viewport and main content don't overflow */
    .viewport {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 16px !important;
        overflow-x: hidden !important;
    }
    
    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }
    
    /* Fix section padding to prevent overflow */
    .section {
        padding: 16px !important;
        margin: 0 !important;
    }
    
    .section-header {
        padding: 0 !important;
        margin: 0 0 12px 0 !important;
    }
}

@media (max-width: 480px) {
    /* Even more aggressive constraints for small mobile */
    .section .album-grid, .section .artist-grid, #latest-albums, #popular-songs {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .album-item, .artist-item, .song-item {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .album-item .album-art, .artist-item .artist-photo, .song-item .song-art {
        max-height: 160px !important;
        width: 100% !important;
    }
    
    /* Reduce song item padding for small screens */
    .song-item {
        padding: 10px !important;
        gap: 10px !important;
    }
    
    .song-art {
        width: 50px !important;
        height: 50px !important;
    }
    
    .song-btn {
        width: 32px !important;
        height: 32px !important;
        padding: 5px !important;
    }
    
    /* Ensure viewport has minimal padding */
    .viewport {
        padding: 0 12px !important;
    }
    
    .section {
        padding: 12px !important;
    }
}

/* iPhone-specific constraints */
@media (max-width: 414px) {
    /* Ultra-tight constraints for iPhone */
    .song-item {
        padding: 8px !important;
        gap: 8px !important;
    }
    
    .song-art {
        width: 45px !important;
        height: 45px !important;
    }
    
    .song-content {
        min-width: 0 !important;
        flex: 1 !important;
    }
    
    .song-actions {
        width: auto !important;
        flex-shrink: 0 !important;
    }
    
    .song-btn {
        width: 30px !important;
        height: 30px !important;
        padding: 4px !important;
    }
    
    /* Ensure no overflow on any iPhone */
    .viewport, .main-content, .section, .section .album-grid, .section .artist-grid, #latest-albums, #popular-songs {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Force content to fit within screen */
    * {
        box-sizing: border-box !important;
    }
}

/* Song List Layout - Single Column Format */
.song-grid, #songs-list, #recent-songs-list, #liked-songs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Enhanced Song Item for List View */
.song-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    box-shadow: var(--shadow-sm);
}

.song-item:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.song-item.playing {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), transparent);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

/* Song Artwork for List View - Optimized for Mobile Functionality */
.song-art {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    transition: var(--transition-normal);
    max-width: 100%;
    box-sizing: border-box;
}

.song-item:hover .song-art {
    border-color: var(--primary-color);
}

.song-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.song-art:hover img {
    transform: scale(1.05);
}

.song-art-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.song-art:hover .song-art-overlay {
    opacity: 1;
}

.song-art-play-btn {
    background: var(--primary-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.song-art-play-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Song Content for List View */
.song-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* Prevent flex item overflow */
}

.song-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.song-meta span {
    background: var(--card-bg);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
}

.song-meta .badge {
    background: rgba(255, 0, 85, 0.2);
    border-color: rgba(255, 0, 85, 0.4);
    color: #ff6b8b;
}

/* Song Actions for List View */
.song-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.song-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.song-btn:hover {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

/* Make like/heart buttons transparent by default in all song lists */
.song-btn i.far.fa-heart {
    color: var(--text-secondary);
}

.song-btn i.fas.fa-heart {
    color: var(--primary-color);
}

/* Override background for song buttons that contain heart icons */
.song-btn:has(i.fas.fa-heart), .song-btn:has(i.far.fa-heart) {
    background-color: transparent;
}

.song-btn:has(i.fas.fa-heart):hover, .song-btn:has(i.far.fa-heart):hover {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.song-btn.primary {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.song-btn.primary:hover {
    background-color: var(--primary-hover);
}

/* Responsive adjustments for song list */
@media (max-width: 768px) {
    .song-item {
        padding: 14px;
        gap: 14px;
    }
    
    .song-art {
        width: 70px;
        height: 70px;
    }
    
    .song-info h4 {
        font-size: 1rem;
    }
    
    .song-info p {
        font-size: 0.85rem;
    }
    
    /* Mobile search and filter improvements */
    .view-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .search-input {
        min-width: 100%;
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .song-item {
        padding: 12px;
        gap: 12px;
    }
    
    .song-art {
        width: 60px;
        height: 60px;
    }
    
    .song-info h4 {
        font-size: 0.95rem;
    }
    
    .song-info p {
        font-size: 0.8rem;
    }
    
    .song-actions {
        gap: 6px;
    }
    
    .song-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    /* Enhanced mobile search and filter */
    .view-controls {
        gap: 10px;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 12px 14px;
    }
    
    .filter-select {
        font-size: 1rem;
        padding: 12px 14px;
    }
}

/* Queue-specific song item styling - Keep existing layout for queue */
.queue-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-normal);
    cursor: pointer;
}

.queue-item:hover {
    background-color: var(--card-bg);
    border-color: var(--primary-color);
}

.queue-item.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), transparent);
}

.queue-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.queue-item-info img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.queue-item-info div h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.queue-item-info div p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.queue-remove-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-remove-btn:hover {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* Album Item */
.album-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.album-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Ensure album detail artwork doesn't overflow container */
.album-detail-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

/* Responsive adjustments for album detail */
@media (max-width: 768px) {
    .album-detail-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    #album-detail-view .album-art-large img {
        max-width: 300px;
        height: 250px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    #album-detail-view .album-art-large img {
        max-width: 250px;
        height: 200px;
    }
}

/* Artist detail view specific styling to fix image sizing issues */
#artist-detail-view .artist-detail-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

#artist-detail-view .artist-art-large {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#artist-detail-view .artist-art-large img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    display: block;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 1 / 1; /* Ensure image stays square */
}

#artist-detail-view .artist-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Desktop view: Image above bio and stats */
@media (min-width: 993px) {
    #artist-detail-view .artist-detail-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        align-items: center;
    }
    
    #artist-detail-view .artist-art-large {
        justify-content: center;
        align-items: center;
    }
    
    #artist-detail-view .artist-info {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        text-align: center;
    }
    
    #artist-detail-view .artist-stats {
        justify-content: center;
        margin-left: 0;
        margin-right: 0;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }
}

#artist-detail-view .artist-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), transparent);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-left: -1rem;
    margin-right: -1rem;
    margin-bottom: -1rem;
    margin-top: -1rem;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(255, 255, 255, 0.02));
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    border-radius: 12px;
}

#artist-detail-view .artist-stats span {
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive adjustments for artist detail */
@media (max-width: 768px) {
    #artist-detail-view .artist-detail-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    #artist-detail-view .artist-art-large img {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }
    
    #artist-detail-view .artist-stats {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #artist-detail-view .artist-art-large img {
        width: 220px;
        height: 220px;
    }
    
    #artist-detail-view .artist-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Ensure artist content sections are properly spaced */
#artist-detail-view .artist-content {
    margin-top: 2rem;
}

#artist-detail-view .section {
    margin-bottom: 2rem;
}

#artist-detail-view .section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}


.album-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.album-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.album-meta {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Artist Item */
.artist-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.artist-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.artist-photo {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    max-width: 100%;
    box-sizing: border-box;
}

.artist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-details h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
}

.artist-details p {
    color: var(--text-color);
    font-size: 0.875rem;
}

/* Now Playing Sidebar */
.now-playing-sidebar {
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.now-playing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.now-playing-header h3 {
    font-family: var(--font-family-heading);
    font-size: 1.125rem;
    font-weight: 600;
}

.collapse-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.collapse-btn:hover {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.collapse-btn.collapsed i {
    transform: rotate(-90deg);
}

/* Collapsible Sidebar Content */
.sidebar-content {
    display: block;
    transition: all 0.3s ease;
    max-height: 1000px;
    overflow: hidden;
}

.sidebar-content.collapsed {
    max-height: 0;
    padding: 0 0 16px 0;
    opacity: 0;
}

.sidebar-content.collapsed + .track-actions {
    display: none;
}

/* Desktop view - sidebar stays on right, no collapse functionality */
@media (min-width: 1201px) {
    .now-playing-sidebar {
        position: sticky;
        top: 20px;
        height: fit-content;
        width: 100%;
    }
    
    /* Hide collapse button on desktop */
    .collapse-btn {
        display: none;
    }
    
    /* Ensure content is always visible on desktop */
    .sidebar-content {
        max-height: none !important;
        opacity: 1 !important;
        padding: 16px 0 !important;
    }
    
    .track-actions {
        display: flex !important;
    }
}

/* Tablet and smaller desktop screens (half-size and smaller) */
@media (max-width: 1200px) and (min-width: 769px) {
    .main-content {
        grid-template-columns: 250px 1fr;
        padding: 16px;
    }
    
    .now-playing-sidebar {
        position: fixed;
        bottom: 0;
        right: 0;
        top: auto;
        width: 280px;
        height: max-content;
        z-index: 1000;
        border-radius: 12px 12px 0 0;
        border-top: 2px solid var(--primary-color);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .now-playing-sidebar.mobile-visible {
        transform: translateY(0);
    }
    
    .now-playing-header {
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-content {
        padding: 16px 0;
    }
    
    .track-display {
        gap: 12px;
    }
    
    .track-art-large {
        width: 80px;
        height: 80px;
    }
    
    .track-title {
        font-size: 1rem;
    }
    
    .track-artist {
        font-size: 0.9rem;
    }
    
    .control-buttons {
        gap: 8px;
    }
    
    .control-btn, .play-btn-large {
        width: 40px;
        height: 40px;
    }
    
    .play-btn-large {
        width: 50px;
        height: 50px;
    }
    
    .player-options {
        gap: 8px;
    }
    
    .option-btn {
        width: 36px;
        height: 36px;
    }
    
    .volume-container {
        display: none; /* Hide volume controls on smaller screens */
    }
    
    /* Collapsed state styling for half-size screens */
    .now-playing-sidebar.collapsed {
        border-radius: 12px 12px 0 0;
        height: 60px;
    }
    
    .now-playing-sidebar.collapsed .sidebar-content {
        display: none;
    }
    
    .now-playing-sidebar.collapsed .now-playing-header {
        padding: 12px 16px;
        background: linear-gradient(135deg, var(--sidebar-bg), var(--card-bg));
        border-radius: 12px 12px 0 0;
    }
    
    .now-playing-sidebar.collapsed .now-playing-header h3 {
        font-size: 0.9rem;
        opacity: 0.8;
    }
    
    .now-playing-sidebar.collapsed .collapse-btn {
        background-color: var(--primary-color);
        color: #000;
        border-color: var(--primary-color);
    }
    
    .now-playing-sidebar.collapsed .collapse-btn i {
        transform: rotate(-90deg);
    }
    
    /* Expanded state covers main viewport */
    .now-playing-sidebar:not(.collapsed) {
        width: 100%;
        height: 100vh;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border-radius: 0;
        transform: none;
        z-index: 2000;
    }
    
    .now-playing-sidebar:not(.collapsed) .sidebar-content {
        max-height: none;
        opacity: 1;
        padding: 20px;
        overflow-y: auto;
        height: calc(100vh - 60px);
    }
}

/* Mobile screens */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    
    .now-playing-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: auto;
        z-index: 1000;
        border-radius: 16px 16px 0 0;
        border-top: 2px solid var(--primary-color);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
        transform: translateY(0%);
        transition: transform 0.3s ease;
    }
    
    .now-playing-sidebar.mobile-visible {
        transform: translateY(0);
    }
    
    .now-playing-header {
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-content {
        padding: 16px 0;
    }
    
    .track-display {
        gap: 12px;
    }
    
    .track-art-large {
        width: 80px;
        height: 80px;
    }
    
    .track-title {
        font-size: 1rem;
    }
    
    .track-artist {
        font-size: 0.9rem;
    }
    
    .control-buttons {
        gap: 8px;
    }
    
    .control-btn, .play-btn-large {
        width: 40px;
        height: 40px;
    }
    
    .play-btn-large {
        width: 50px;
        height: 50px;
    }
    
    .player-options {
        gap: 8px;
    }
    
    .option-btn {
        width: 36px;
        height: 36px;
    }
    
    .volume-container {
        display: none; /* Hide volume controls on mobile */
    }
    
    /* Collapsed state styling for mobile */
    .now-playing-sidebar.collapsed {
        border-radius: 16px 16px 0 0;
        height: 85px;
    }
    
    .now-playing-sidebar.collapsed .sidebar-content {
        display: none;
    }
    
    .now-playing-sidebar.collapsed .now-playing-header {
        padding: 12px 16px;
        background: linear-gradient(135deg, var(--sidebar-bg), var(--card-bg));
        border-radius: 16px 16px 0 0;
    }
    
    .now-playing-sidebar.collapsed .now-playing-header h3 {
        font-size: 0.9rem;
        opacity: 0.8;
    }
    
    .now-playing-sidebar.collapsed .collapse-btn {
        background-color: var(--primary-color);
        color: #000;
        border-color: var(--primary-color);
    }
    
    .now-playing-sidebar.collapsed .collapse-btn i {
        transform: rotate(-90deg);
    }
    
    /* Expanded state covers entire screen */
    .now-playing-sidebar:not(.collapsed) {
        width: 100%;
        height: 100vh;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border-radius: 0;
        transform: none;
        z-index: 2000;
    }
    
    .now-playing-sidebar:not(.collapsed) .sidebar-content {
        max-height: none;
        opacity: 1;
        padding: 20px;
        overflow-y: auto;
        height: calc(100vh - 60px);
    }
}

.track-display {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.track-art-large {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
}

.track-art-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.track-art-large:hover img {
    transform: scale(1.05);
}

.track-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.track-title, .track-artist, .track-album {
    cursor: pointer;
    transition: var(--transition-normal);
}

.track-title:hover, .track-artist:hover, .track-album:hover {
    color: var(--primary-color);
}

.track-title {
    font-family: var(--font-family-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
}

.track-artist {
    font-size: 1rem;
    color: var(--text-secondary);
}

.track-album {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.player-controls {
    margin-bottom: 20px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: var(--bg-color);
    border-radius: 3px;
    cursor: pointer;
    appearance: none;
}

.progress-bar::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #000;
}

.progress-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #000;
}

.progress-bar::-moz-range-track {
    background-color: var(--bg-color);
    height: 6px;
    border-radius: 3px;
}

.current-time, .duration {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: monospace;
    min-width: 40px;
    text-align: center;
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.control-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.play-btn-large {
    background-color: var(--primary-color);
    border: none;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.play-btn-large:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

.player-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-btn:hover {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-bar {
    width: 100px;
    height: 4px;
    background-color: var(--bg-color);
    border-radius: 2px;
    cursor: pointer;
    appearance: none;
}

.volume-bar::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #000;
}

.volume-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #000;
}

.track-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.track-actions button {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.track-actions button:hover {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 3000; /* Increased z-index to appear above expanded sidebar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    z-index: 3001; /* Ensure modal content is above backdrop */
}

/* Mobile-specific modal positioning when sidebar is expanded */
@media (max-width: 768px) {
    .modal {
        z-index: 4000; /* Even higher z-index for mobile */
    }
    
    .modal-content {
        z-index: 4001;
        margin: 10% auto; /* Adjust margin for mobile */
        width: 95%;
        max-width: 400px;
    }
    
    /* Ensure modals appear above expanded sidebar */
    .now-playing-sidebar:not(.collapsed) + .modal {
        z-index: 5000;
    }
    
    .now-playing-sidebar:not(.collapsed) + .modal .modal-content {
        z-index: 5001;
    }
}

/* Tablet and smaller desktop screens */
@media (max-width: 1200px) and (min-width: 769px) {
    .modal {
        z-index: 3500; /* Higher than sidebar on half-size screens */
    }
    
    .modal-content {
        z-index: 3501;
    }
    
    /* When sidebar is expanded on half-size screens */
    .now-playing-sidebar:not(.collapsed) + .modal {
        z-index: 4500;
    }
    
    .now-playing-sidebar:not(.collapsed) + .modal .modal-content {
        z-index: 4501;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-normal);
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-header h3 {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-color);
    font-size: 0.95rem;
}

.tip-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 16px;
    font-style: italic;
}

/* Digital Wallet Buttons */
.wallet-buttons-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.wallet-btn {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: none; /* Hidden by default, shown when available */
}

.wallet-btn.apple-pay {
    background: #000;
    color: white;
    border: 1px solid #333;
}

.wallet-btn.apple-pay:hover {
    background: #111;
    transform: translateY(-1px);
}

.wallet-btn.google-pay {
    background: #fff;
    color: #000;
    border: 1px solid #ddd;
}

.wallet-btn.google-pay:hover {
    border-color: #999;
    transform: translateY(-1px);
}

.wallet-btn.cash-app {
    background: #00ff88;
    color: #000;
    border: 1px solid #00cc66;
}

.wallet-btn.cash-app:hover {
    background: #00e67a;
    border-color: #00b35c;
    transform: translateY(-1px);
}

.wallet-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Square Payment Form Styles */
#square-payment-form {
    margin: 20px 0;
}

#card-container {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

#card-container iframe {
    width: 100%;
    height: 40px;
    border: none;
}

#payment-errors {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 10px;
    min-height: 1.2rem;
    display: none;
}

.square-payment-button {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-block;
    text-decoration: none;
}

.square-payment-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.square-payment-button:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.custom-amount-section {
    margin-top: 16px;
}

.custom-amount-section label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.custom-amount-section input {
    width: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.custom-amount-section input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 250px 1fr 300px;
    }
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        margin-bottom: 20px;
    }
    
    .featured-album {
        grid-template-columns: 1fr;
        align-items: center;
        text-align: center;
        padding: 24px;
    }
    
    .album-art {
        margin: 0 auto 24px auto;
        width: 200px;
        height: 200px;
    }
    
    .album-info {
        text-align: center;
    }
    
    .track-display {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .track-art-large {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    .viewport {
        padding: 16px;
    }
    
    .view-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-input {
        min-width: 100%;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .song-grid, .album-grid, .artist-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .control-buttons {
        gap: 12px;
    }
    
    .control-btn, .play-btn-large {
        width: 40px;
        height: 40px;
    }
    
    .play-btn-large {
        width: 56px;
        height: 56px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    /* Enhanced featured album centering for mobile */
    .featured-album {
        padding: 20px;
        text-align: center;
    }
    
    .album-art {
        margin: 0 auto 20px auto;
        width: 180px;
        height: 180px;
    }
    
    .album-info {
        text-align: center;
    }
    
    .album-actions {
        justify-content: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .viewport {
        padding: 12px;
    }
    
    .view-header h1 {
        font-size: 1.5rem;
    }
    
    .featured-album {
        padding: 16px;
        text-align: center;
    }
    
    .album-art {
        margin: 0 auto 16px auto;
        width: 140px;
        height: 140px;
    }
    
    .album-info {
        text-align: center;
    }
    
    .album-actions {
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .btn-play, .btn-shuffle {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .song-grid, .album-grid, .artist-grid {
        grid-template-columns: 1fr;
    }
    
    .track-art-large {
        width: 120px;
        height: 120px;
    }
    
    .volume-container {
        display: none; /* Hide volume on very small screens */
    }
}

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

/* Focus styles for keyboard navigation */
.song-item:focus, .album-item:focus, .artist-item:focus,
.nav-btn:focus, .control-btn:focus, .play-btn-large:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error states */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--danger-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 3000;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Success states */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 3000;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mt-8 { margin-top: 32px; }
.mb-8 { margin-bottom: 32px; }

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(255, 255, 255, 0.02));
}

.empty-state h3 {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-color);
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .viewport {
        border: none;
        background: white;
        color: black;
    }
}

/* Liked Songs View Styles */
#liked-view {
    display: none;
}

#liked-view.active {
    display: block;
}

#liked-view .view-header {
    margin-bottom: 30px;
}

#liked-view .view-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

#liked-view .search-input {
    flex: 1;
    min-width: 300px;
}

#liked-view .filter-select {
    width: 200px;
}

#liked-songs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#liked-songs-list .song-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    box-shadow: var(--shadow-sm);
}

#liked-songs-list .song-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

#liked-songs-list .song-art {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

#liked-songs-list .song-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#liked-songs-list .song-content {
    flex: 1;
    min-width: 0;
}

#liked-songs-list .song-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#liked-songs-list .song-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#liked-songs-list .song-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

#liked-songs-list .song-meta span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--card-bg);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

#liked-songs-list .song-meta .badge {
    background: rgba(255, 0, 85, 0.2);
    border-color: rgba(255, 0, 85, 0.4);
    color: #ff6b8b;
}

#liked-songs-list .song-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

#liked-songs-list .song-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

#liked-songs-list .song-btn:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

#liked-songs-list .song-btn.primary {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

#liked-songs-list .song-btn.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

#liked-songs-list .like-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

#liked-songs-list .like-btn:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

#liked-songs-list .like-btn i {
    font-size: 1rem;
}

#liked-songs-list .like-btn i.fas.fa-heart {
    color: var(--primary-color);
}

#liked-songs-list .like-btn i.far.fa-heart {
    color: var(--text-secondary);
}

#liked-songs-list .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(255, 255, 255, 0.02));
}

#liked-songs-list .empty-state i {
    display: block;
    margin-bottom: 16px;
    font-size: 3rem;
    color: var(--primary-color);
}

#liked-songs-list .empty-state h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
}

#liked-songs-list .empty-state p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}
