/**
 * musick.com.au Stylesheet
 * National Australian Local Music Platform
 */

/* CSS Variables - Enhanced for better contrast and vibrancy */
:root {
    --yellow: #FFE135;
    --purple: #B794F6;
    --orange: #FF7849;
    --teal: #00E5DB;
    --pink: #FF69B4;
    --dark: #1a1a2e;
    --darker: #0f0f1a;
    --light: #f5f5f5;
    --spotify-green: #1DB954;
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.12);
    --focus-color: #B794F6;
    --green: #6BCB77;
}

[data-theme="light"] {
    --bg-primary: #e8e4f0;
    --bg-secondary: #f5f3f8;
    --bg-card: rgba(131, 56, 236, 0.08);
    --text-primary: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.8);
    --text-muted: rgba(26, 26, 46, 0.55);
    --darker: #ddd8e8;
    --border-color: rgba(131, 56, 236, 0.15);
    --focus-color: #7C3AED;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: var(--purple);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--pink);
}

/* Main Navigation */
.main-nav {
    background: linear-gradient(135deg, #FF8C00 0%, #FF6B35 50%, #FF006E 100%);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 75px;
    transition: transform 0.3s ease;
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--purple);
    color: white;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--bg-primary);
    padding: 20px;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    border-top: 2px solid var(--purple);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-menu.active {
    display: flex;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

.mobile-link {
    padding: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--bg-card);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: none;
    border-radius: 50px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 1.3rem;
    box-shadow: 0 4px 20px rgba(155, 123, 184, 0.4);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 105, 180, 0.5);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg,
        rgba(155, 123, 184, 0.3) 0%,
        rgba(255, 107, 53, 0.2) 50%,
        rgba(255, 105, 180, 0.3) 100%),
        var(--bg-primary);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .hero {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 50%, var(--pink) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
    animation: shimmer 20s linear infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-50%) translateY(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) translateY(-50%) rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Bangers', cursive;
    font-size: clamp(3rem, 10vw, 6rem);
    color: #ffffff;
    text-shadow: 4px 4px 0 var(--purple), 8px 8px 0 var(--pink);
    letter-spacing: 4px;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 10px;
    font-weight: 600;
}

/* Light mode hero - dark text for contrast */
[data-theme="light"] .hero h1 {
    color: var(--dark);
    text-shadow: 4px 4px 0 #fff, 8px 8px 0 var(--purple);
}

[data-theme="light"] .hero .subtitle {
    color: var(--dark);
}

.hero-logo {
    max-width: 300px;
    margin-bottom: 20px;
}

.cassette {
    font-size: 4rem;
    animation: bounce 1s ease-in-out infinite;
}

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

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Year Selector */
.year-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 10px;
    flex-wrap: wrap;
}

.year-btn {
    padding: 12px 24px;
    border: 2px solid var(--yellow);
    background: transparent;
    color: var(--yellow);
    border-radius: 30px;
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-btn:hover {
    background: rgba(255, 225, 53, 0.2);
    transform: scale(1.05);
}

.year-btn.active {
    background: var(--yellow);
    color: var(--dark);
}

.year-btn.all-years {
    border-color: var(--pink);
    color: var(--pink);
}

.year-btn.all-years:hover {
    background: rgba(255, 105, 180, 0.2);
}

.year-btn.all-years.active {
    background: var(--pink);
    color: white;
}

/* Year Selector in Hero - More prominent placement */
.hero-year-selector {
    margin: 25px 0 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-year-selector .year-btn {
    padding: 10px 20px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .hero-year-selector {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 20px -10px 10px;
        padding: 12px 15px;
        flex-wrap: nowrap;
    }

    .hero-year-selector::-webkit-scrollbar {
        display: none;
    }

    .hero-year-selector .year-btn {
        flex-shrink: 0;
        padding: 10px 18px;
        font-size: 1rem;
    }
}

/* ==========================================
   COUNTDOWN FILTERS - Enhanced Styling
   ========================================== */

/* Main filter container */
.countdown-filters {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px 24px 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Top row: Year dropdown, Search, Page size */
.filters-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Year Dropdown - Beautified select */
.year-selector {
    flex-shrink: 0;
}

.year-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.2), rgba(255, 0, 110, 0.15));
    border: 2px solid var(--purple);
    color: var(--text-primary);
    padding: 12px 44px 12px 18px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238338EC' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    min-width: 140px;
}

.year-dropdown:hover {
    border-color: var(--pink);
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.3), rgba(255, 0, 110, 0.25));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(131, 56, 236, 0.3);
}

.year-dropdown:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255, 225, 53, 0.2);
}

.year-dropdown option {
    background: var(--bg-primary, #1a1a2e);
    color: var(--text-primary);
    padding: 12px;
}

/* Search container with icon */
.search-container {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-container .search-icon {
    position: absolute;
    left: 16px;
    opacity: 0.5;
    pointer-events: none;
}

.search-container .search-input {
    width: 100%;
    padding-left: 48px;
}

/* Page size buttons */
.page-size-compact {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.page-size-compact .size-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-size-compact .size-btn:hover {
    background: rgba(131, 56, 236, 0.2);
    border-color: var(--purple);
    color: var(--text-primary);
}

.page-size-compact .size-btn.active {
    background: var(--purple);
    border-color: var(--purple);
    color: white;
}

/* Genre scroll container */
.genre-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -8px;
    padding: 0 8px 12px;
}

.genre-scroll-container::-webkit-scrollbar {
    display: none;
}

.genre-tags {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.genre-tags .genre-tag {
    white-space: nowrap;
    flex-shrink: 0;
}

.genre-count {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 4px;
}

/* Results info text */
.results-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}

/* Song list spacing from filters */
.song-list {
    margin-top: 8px;
}

/* Light theme adjustments */
[data-theme="light"] .countdown-filters {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .year-dropdown {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.08), rgba(255, 0, 110, 0.05));
    color: var(--dark);
}

[data-theme="light"] .year-dropdown option {
    background: white;
    color: var(--dark);
}

[data-theme="light"] .page-size-compact .size-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--dark);
}

[data-theme="light"] .page-size-compact .size-btn:hover {
    background: rgba(131, 56, 236, 0.1);
}

[data-theme="light"] .results-info {
    color: rgba(0, 0, 0, 0.5);
    border-top-color: rgba(0, 0, 0, 0.08);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .countdown-filters {
        padding: 16px;
        margin-bottom: 20px;
    }

    .filters-top-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .year-dropdown {
        width: 100%;
        padding: 14px 44px 14px 18px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .search-container {
        min-width: 100%;
    }

    .page-size-compact {
        justify-content: center;
    }

    .page-size-compact .size-btn {
        flex: 1;
        text-align: center;
    }

    .genre-scroll-container {
        margin: 0 -16px;
        padding: 0 16px 12px;
    }
}

/* Section Navigation */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
    position: sticky;
    top: 70px;
    background: rgba(26, 26, 46, 0.95);
    padding: 20px;
    z-index: 100;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.nav-tab {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--purple);
    color: var(--text-primary);
}

.nav-tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(155, 123, 184, 0.4);
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 100%);
    color: var(--dark);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--purple) 0%, #7B5EA7 100%);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px) rotate(1deg);
}

.stat-card.gold {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 100%);
    color: var(--dark);
}

.stat-card.teal {
    background: linear-gradient(135deg, var(--teal) 0%, #008B8B 100%);
}

.stat-card.pink {
    background: linear-gradient(135deg, var(--pink) 0%, #FF1493 100%);
}

.stat-card.green {
    background: linear-gradient(135deg, var(--spotify-green) 0%, #1aa34a 100%);
}

.stat-card.purple {
    background: linear-gradient(135deg, var(--purple) 0%, #7b5a9e 100%);
}

.stat-number {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    letter-spacing: 2px;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 15px 25px;
    border-radius: 50px;
    border: 2px solid var(--purple);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-color: var(--yellow);
    box-shadow: 0 0 20px rgba(255, 225, 53, 0.3);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Genre Filter */
.genre-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.genre-tag {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--purple);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.genre-tag:hover, .genre-tag.active {
    background: var(--purple);
    transform: scale(1.05);
}

.genre-tag[data-genre="rock"].active { background: #e74c3c; border-color: #e74c3c; }
.genre-tag[data-genre="indie"].active { background: #9b59b6; border-color: #9b59b6; }
.genre-tag[data-genre="pop"].active { background: #ff69b4; border-color: #ff69b4; }
.genre-tag[data-genre="punk"].active { background: #2ecc71; border-color: #2ecc71; }
.genre-tag[data-genre="electronic"].active { background: #00ced1; border-color: #00ced1; }
.genre-tag[data-genre="hip-hop"].active { background: #f39c12; border-color: #f39c12; }
.genre-tag[data-genre="folk"].active { background: #8b4513; border-color: #8b4513; }

/* Song List - Single column for proper ranking display */
.song-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================
   SONG ITEM - ALIGNED GRID LAYOUT
   Fixed-width columns ensure vertical alignment across all rows
   ========================================== */
.song-item {
    display: grid;
    /* Fixed columns: rank(50px) | art(55px) | info(flex) | actions(200px) */
    grid-template-columns: 50px 55px 1fr 200px;
    align-items: center;
    gap: 8px 16px; /* row-gap | column-gap */
    background: var(--bg-card);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    min-height: 70px; /* Consistent row height */
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: var(--yellow);
}

.song-item.top-10 {
    background: linear-gradient(90deg, rgba(255, 225, 53, 0.15) 0%, var(--bg-card) 100%);
    border-left-color: var(--yellow);
}

/* Position/Rank Column - Fixed width, right-aligned for number alignment */
.position {
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    color: var(--yellow);
    text-align: right;
    width: 50px;
    padding-right: 5px;
}

.song-item.top-10 .position {
    color: var(--orange);
    font-size: 1.5rem;
}

.song-item.top-10 .song-info {
    padding-left: 10px;
}

/* Source badges for national countdown - inline with title */
.source-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.source-badge.all-time {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #1a1a2e;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}
.source-badge.annual {
    background: linear-gradient(135deg, #3A86FF, #8338EC);
    color: white;
    box-shadow: 0 2px 6px rgba(131, 56, 236, 0.25);
}

/* Album Art Column - Fixed size, strict dimensions */
.album-art {
    width: 55px;
    height: 55px;
    min-width: 55px;
    max-width: 55px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.album-art:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Song Info Column - Flexible, with left padding for spacing from art */
.song-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0; /* Allow text truncation */
    overflow: hidden;
    padding-left: 4px; /* Extra spacing from album art */
}

/* Title Row - Title + Optional Badges */
.song-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.song-title-row .song-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

/* Meta Row - Artist + Genre + Year */
.song-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

/* Song Title Styling */
.song-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-title:hover {
    color: var(--yellow);
}

/* Artist Name Styling */
.artist-name {
    color: #E9D5FF; /* Light purple - readable on dark backgrounds */
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.artist-name:hover {
    color: var(--pink);
}

/* Ensure artist name is always readable */
[data-theme="dark"] .artist-name,
html:not([data-theme="light"]) .artist-name {
    color: #E9D5FF; /* Light purple for dark mode */
}

/* Genre Tag */
.song-genre {
    font-size: 0.65rem;
    padding: 2px 8px;
    background: rgba(155, 123, 184, 0.25);
    border-radius: 8px;
    display: inline-block;
    white-space: nowrap;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Year Tag */
.song-year {
    font-size: 0.7rem;
    color: var(--teal) !important;
    opacity: 0.8;
    flex-shrink: 0;
}

/* ==========================================
   SONG ACTIONS - Fixed Width for Alignment
   Width: 200px to fit heart + video + play/find
   ========================================== */
.song-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
}

/* Heart/Playlist Button - Fixed Size */
.playlist-add-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.playlist-add-btn:hover {
    background: rgba(255, 0, 110, 0.3);
    transform: scale(1.05);
}

.playlist-add-btn.in-playlist {
    background: rgba(255, 0, 110, 0.4);
}

.playlist-add-btn .heart {
    color: var(--pink);
}

/* Action Button Base */
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Spotify/Play Button - Fixed Width */
.spotify-btn {
    background: var(--spotify-green);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 70px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.spotify-btn:hover {
    background: #1ed760;
    transform: scale(1.02);
    color: white;
}

/* YouTube/Video Button - Fixed Width */
.youtube-btn {
    background: #FF0000;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 70px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.youtube-btn:hover {
    background: #cc0000;
    transform: scale(1.02);
    color: white;
}

.youtube-btn.small {
    padding: 6px 10px;
    font-size: 0.75rem;
    min-width: 60px;
}

/* Placeholder for missing video button - preserves alignment */
.song-actions .btn-placeholder {
    width: 70px;
    min-width: 70px;
    visibility: hidden;
}

/* Artist Leaderboard */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 50px 1fr 80px 100px;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.leaderboard-item.gold {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3) 0%, var(--bg-card) 100%);
    border: 2px solid gold;
}

.leaderboard-item.silver {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.3) 0%, var(--bg-card) 100%);
    border: 2px solid silver;
}

.leaderboard-item.bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.3) 0%, var(--bg-card) 100%);
    border: 2px solid #cd7f32;
}

.rank {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    text-align: center;
}

.leaderboard-item.gold .rank { color: gold; }
.leaderboard-item.silver .rank { color: silver; }
.leaderboard-item.bronze .rank { color: #cd7f32; }

.song-count {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--yellow);
    text-align: center;
}

/* City Cards (Homepage) */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.city-card {
    background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.city-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(155, 123, 184, 0.4);
}

.city-card.coming-soon {
    background: var(--bg-card);
    opacity: 0.7;
}

.city-card h2 {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
}

.city-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.city-card .btn {
    background: white;
    color: var(--dark);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.city-card .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.coming-soon-badge {
    background: var(--yellow);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Footer */
.main-footer {
    background: var(--darker);
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: 2px solid var(--purple);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--yellow);
    margin-bottom: 20px;
    font-family: 'Bangers', cursive;
    letter-spacing: 1px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--yellow);
}

.footer-links .coming-soon {
    color: var(--text-secondary);
    opacity: 0.5;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    color: var(--yellow);
    transform: scale(1.2);
}

.footer-bottom {
    border-top: 1px solid var(--bg-card);
    padding-top: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.footer-credits {
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Ad Containers */
.ad-container {
    text-align: center;
    margin: 20px 0;
    min-height: 90px;
}

.ad-footer {
    background: var(--darker);
    padding: 20px;
}

/* Light Theme Overrides */
[data-theme="light"] .hero h1 {
    color: var(--dark);
}

[data-theme="light"] .nav-tabs {
    background: rgba(248, 249, 250, 0.95);
}

[data-theme="light"] .main-nav {
    background: rgba(248, 249, 250, 0.95);
}

[data-theme="light"] .song-item,
[data-theme="light"] .leaderboard-item {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .search-input {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--dark);
}

[data-theme="light"] .search-input::placeholder {
    color: rgba(26, 26, 46, 0.5);
}

[data-theme="light"] .main-footer {
    background: #e9ecef;
}

[data-theme="light"] .main-footer h3,
[data-theme="light"] .main-footer h4 {
    color: #1a1a2e;
}

[data-theme="light"] .main-footer p,
[data-theme="light"] .footer-links a,
[data-theme="light"] .footer-bottom p {
    color: #444;
}

[data-theme="light"] .footer-links a:hover {
    color: var(--purple);
}

[data-theme="light"] .footer-social a {
    color: #555;
}

[data-theme="light"] .footer-social a:hover {
    color: var(--pink);
}

/* Light Theme - Navigation Contrast Fixes */
[data-theme="light"] .nav-tab {
    color: #1a1a2e !important;
}

[data-theme="light"] .nav-tab:hover,
[data-theme="light"] .nav-tab.active {
    color: #7C3AED !important;
}

[data-theme="light"] .main-nav a {
    color: #1a1a2e;
}

/* Light Theme - Song Item Text Contrast */
[data-theme="light"] .song-title {
    color: #1a1a2e;
}

[data-theme="light"] .artist-name {
    color: #6B21A8; /* Darker purple for better contrast */
}

[data-theme="light"] .position {
    color: #7C3AED;
}

/* Light Theme - Album Art Styling */
[data-theme="light"] .album-art {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
}

/* Light Theme - City Cards Text Readability */
[data-theme="light"] .city-card h2,
[data-theme="light"] .city-card p,
[data-theme="light"] .city-card .city-stats {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Light Theme - Stat Cards */
[data-theme="light"] .stat-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Light Theme - Hero Text Shadow for Readability */
[data-theme="light"] .hero h1,
[data-theme="light"] .hero .subtitle {
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

/* Light Theme - Buttons */
[data-theme="light"] .spotify-btn {
    background: #1DB954;
    color: white;
}

[data-theme="light"] .playlist-add-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #1a1a2e;
}

[data-theme="light"] .playlist-add-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Light Theme - Genre Tags */
[data-theme="light"] .genre-tag {
    background: #f0f0f0;
    color: #1a1a2e;
    border: 1px solid #ddd;
}

[data-theme="light"] .genre-tag.active,
[data-theme="light"] .genre-tag:hover {
    background: var(--purple);
    color: white;
    border-color: var(--purple);
}

/* Light Theme - Year Buttons */
[data-theme="light"] .year-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a2e;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .year-btn.active,
[data-theme="light"] .year-btn:hover {
    background: var(--purple);
    color: white;
    border-color: var(--purple);
}

/* Light Theme - Dropdown Menu */
[data-theme="light"] .dropdown-menu {
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .dropdown-menu a {
    color: #1a1a2e;
}

[data-theme="light"] .dropdown-menu a:hover {
    background: #f5f5f5;
    color: var(--purple);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    /* Mobile menu animation */
    .mobile-menu {
        transform: translateX(100%);
        transition: transform 0.3s ease-out;
    }

    .mobile-menu.active {
        transform: translateX(0);
    }

    /* Reduced header height on mobile */
    .main-nav {
        padding: 10px 0;
    }

    .nav-logo img {
        height: 55px;
    }

    /* CRITICAL: Mobile song list - maintain alignment */
    .song-item {
        grid-template-columns: 40px 45px 1fr 120px;
        padding: 10px 12px;
        gap: 8px 12px; /* row-gap | column-gap for alignment */
        min-height: 60px;
    }

    .song-actions {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
        width: 120px;
        min-width: 120px;
        justify-content: flex-end;
    }

    /* Compact buttons on mobile - icons only */
    .song-actions .playlist-add-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 8px;
    }

    .song-actions .action-text {
        display: none;
    }

    /* Icon-only buttons on mobile */
    .song-actions .spotify-btn,
    .song-actions .youtube-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        font-size: 0;
        border-radius: 8px;
    }

    .song-actions .spotify-btn::before {
        content: "🎧";
        font-size: 1.1rem;
    }

    .song-actions .youtube-btn::before {
        content: "🎬";
        font-size: 1.1rem;
    }

    /* Find button variant */
    .song-actions .spotify-btn[style*="opacity"]::before {
        content: "🔍";
    }

    /* Hide button text on mobile */
    .song-actions .spotify-btn .btn-text,
    .song-actions .spotify-btn .text {
        display: none;
    }

    /* Touch-friendly minimum targets (44px) */
    button, .btn, a.btn, .genre-tag, .year-btn,
    .filter-btn, .nav-tab, .playlist-add-btn,
    .remove-btn, .mobile-link {
        min-height: 44px;
        min-width: 44px;
    }

    /* Genre filter horizontal scroll */
    .genre-filter {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding: 8px 0 12px;
        margin: 0 -15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .genre-filter::-webkit-scrollbar {
        display: none;
    }

    .genre-tag {
        padding: 12px 18px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Year selector horizontal scroll */
    .year-selector {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        padding: 0 15px 12px;
        margin: 0 -15px;
    }

    .year-selector::-webkit-scrollbar {
        display: none;
    }

    .year-btn {
        flex-shrink: 0;
        padding: 12px 20px;
    }

    /* Nav tabs horizontal scroll */
    .nav-tabs {
        top: 56px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        padding: 12px 15px;
        gap: 8px;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tab {
        flex-shrink: 0;
        padding: 10px 18px;
    }

    .leaderboard-item {
        grid-template-columns: 40px 1fr 60px;
    }

    .leaderboard-item .avg-position {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 18px 15px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .theme-toggle {
        top: auto;
        bottom: 20px;
        right: 20px;
    }

    .cities-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .city-card {
        padding: 30px 25px;
    }

    /* Remove button touch-friendly */
    .remove-btn {
        padding: 12px;
    }

    /* Playlist add button touch-friendly */
    .playlist-add-btn {
        padding: 12px;
    }

    /* Venue badge touch-friendly */
    .venue-badge {
        padding: 10px 16px;
    }

    /* Album art size on mobile */
    .album-art {
        width: 45px;
        height: 45px;
        min-width: 45px;
    }

    .position {
        font-size: 1.2rem;
        text-align: right;
        width: 40px;
        padding-right: 4px;
    }
}

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

    .stat-card {
        padding: 15px 12px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Song item - compact with aligned actions */
    .song-item {
        grid-template-columns: 35px 40px 1fr 100px;
        gap: 6px 8px; /* row-gap | column-gap for alignment */
        padding: 10px 12px;
        min-height: 56px;
    }

    .song-actions {
        gap: 4px;
        width: 100px;
        min-width: 100px;
    }

    /* Smaller action buttons on 480px */
    .song-actions .playlist-add-btn,
    .song-actions .spotify-btn,
    .song-actions .youtube-btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
    }

    /* Icon-only buttons */
    .song-actions .spotify-btn,
    .song-actions .youtube-btn {
        font-size: 0;
    }

    .song-actions .spotify-btn::before {
        content: "🎧";
        font-size: 1rem;
    }

    .song-actions .youtube-btn::before {
        content: "🎬";
        font-size: 1rem;
    }

    /* For Find buttons */
    .song-actions .spotify-btn[style*="opacity"]::before {
        content: "🔍";
    }

    .song-actions .playlist-add-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .position {
        font-size: 1rem;
        text-align: right;
        width: 35px;
        padding-right: 3px;
    }

    .album-art {
        width: 40px;
        height: 40px;
        min-width: 40px;
        max-width: 40px;
    }

    .song-title {
        font-size: 0.9rem;
        color: #ffffff;
        font-weight: 600;
    }

    .artist-name {
        font-size: 0.8rem;
        color: #E9D5FF !important; /* Light purple - ensure readable */
    }

    .song-genre {
        display: none; /* Hide genre tag on very small screens */
    }

    /* Better song card spacing */
    .song-item {
        margin-bottom: 8px;
        border-radius: 10px;
    }

    /* Hero adjustments */
    .hero {
        padding: 50px 15px;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    /* Container padding */
    .container {
        padding: 15px 12px;
    }

    /* Footer grid single column */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: var(--dark);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    margin: 40px auto;
    position: relative;
    animation: modalSlide 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    padding: 40px;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.modal-header h2 {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
}

.modal-body {
    padding: 30px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close-modal:hover {
    opacity: 1;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 3000;
    animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-card);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Section */
.section {
    margin-bottom: 40px;
}

.section h2 {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--yellow);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

/* All Years Statistics */
.allyears-section {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.allyears-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.winner-card {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
    color: white;
}

.winner-card:hover {
    transform: scale(1.03);
}

.winner-year {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    color: var(--yellow);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.winner-song {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 10px 0 5px;
}

.winner-artist {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Map Styles */
#map {
    height: 500px;
    border-radius: 15px;
    margin: 20px 0;
}

.map-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.map-sidebar {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.map-sidebar h3 {
    color: var(--yellow);
    margin-bottom: 15px;
    font-family: 'Bangers', cursive;
}

.location-group {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-card);
}

.location-name {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location-count {
    background: var(--purple);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.location-artists {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

@media (max-width: 768px) {
    .map-container {
        grid-template-columns: 1fr;
    }

    #map {
        height: 350px;
    }

    .map-sidebar {
        max-height: 300px;
    }
}

/* ==========================================
   LIGHT THEME OVERRIDES
   ========================================== */

[data-theme="light"] {
    --yellow-text: #b8860b; /* Dark goldenrod for better contrast */
}

/* Yellow text needs to be darker in light mode */
[data-theme="light"] .hero h1,
[data-theme="light"] .section h2,
[data-theme="light"] .map-sidebar h3,
[data-theme="light"] .year-btn.active {
    color: var(--purple) !important;
}

[data-theme="light"] .hero .subtitle,
[data-theme="light"] .hero-content p {
    color: var(--dark) !important;
}

/* Stat cards in light mode - VIBRANT colors matching dark mode energy */
[data-theme="light"] .stat-card {
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 4px 10px rgba(0,0,0,0.1);
}

[data-theme="light"] .stat-card.gold {
    background: linear-gradient(135deg, #FFE135 0%, #FF7849 100%) !important;
    box-shadow: 0 8px 25px rgba(255,120,73,0.4);
}

[data-theme="light"] .stat-card.gold .stat-number {
    color: #1a1a2e !important;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

[data-theme="light"] .stat-card.pink {
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%) !important;
    box-shadow: 0 8px 25px rgba(255,20,147,0.4);
}

[data-theme="light"] .stat-card.pink .stat-number {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

[data-theme="light"] .stat-card.teal {
    background: linear-gradient(135deg, #00E5DB 0%, #008B8B 100%) !important;
    box-shadow: 0 8px 25px rgba(0,139,139,0.4);
}

[data-theme="light"] .stat-card.teal .stat-number {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

[data-theme="light"] .stat-card.green {
    background: linear-gradient(135deg, #6BCB77 0%, #1DB954 100%) !important;
    box-shadow: 0 8px 25px rgba(29,185,84,0.4);
}

[data-theme="light"] .stat-card.green .stat-number {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

[data-theme="light"] .stat-card.purple {
    background: linear-gradient(135deg, #B794F6 0%, #8338EC 100%) !important;
    box-shadow: 0 8px 25px rgba(131,56,236,0.4);
}

[data-theme="light"] .stat-card.purple .stat-number {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

[data-theme="light"] .stat-card .stat-label {
    color: rgba(255,255,255,0.95) !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

[data-theme="light"] .stat-card.gold .stat-label {
    color: rgba(26,26,46,0.9) !important;
    text-shadow: none;
}

/* Coming soon city cards - fix the white text on light gray */
[data-theme="light"] .city-card.coming-soon {
    background: #e8e8e8 !important;
    opacity: 1;
    border: 2px dashed #aaa;
}

[data-theme="light"] .city-card.coming-soon h2,
[data-theme="light"] .city-card.coming-soon p,
[data-theme="light"] .city-card.coming-soon .city-state {
    color: #666 !important;
}

[data-theme="light"] .coming-soon-badge {
    background: #888;
    color: white;
}

/* Active city cards in light mode */
[data-theme="light"] .city-card:not(.coming-soon) h2,
[data-theme="light"] .city-card:not(.coming-soon) p {
    color: white !important;
}

/* Song list items */
[data-theme="light"] .song-item {
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

[data-theme="light"] .song-item:hover {
    background: #fafafa;
}

[data-theme="light"] .song-item .song-title,
[data-theme="light"] .song-item .artist-name,
[data-theme="light"] .song-item .position {
    color: var(--dark) !important;
}

[data-theme="light"] .song-item .song-genre {
    color: #666 !important;
    background: rgba(131, 56, 236, 0.15);
}

[data-theme="light"] .source-badge.all-time {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #1a1a2e;
}

[data-theme="light"] .source-badge.annual {
    background: linear-gradient(135deg, #3A86FF, #8338EC);
    color: white;
}

/* Leaderboard */
[data-theme="light"] .leaderboard-item {
    background: white;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .leaderboard-item h3,
[data-theme="light"] .leaderboard-item .song-count,
[data-theme="light"] .leaderboard-item .rank {
    color: var(--dark) !important;
}

/* Year buttons */
[data-theme="light"] .year-btn {
    background: white;
    border-color: var(--purple);
    color: var(--purple);
}

[data-theme="light"] .year-btn:hover {
    background: #f0e6f6;
}

[data-theme="light"] .year-btn.active {
    background: var(--purple);
    color: white !important;
}

[data-theme="light"] .year-btn.all-years {
    border-color: var(--pink);
    color: var(--pink);
}

[data-theme="light"] .year-btn.all-years.active {
    background: var(--pink);
    color: white !important;
}

/* Genre tags */
[data-theme="light"] .genre-tag {
    background: white;
    border: 1px solid #ddd;
    color: var(--dark);
}

[data-theme="light"] .genre-tag.active,
[data-theme="light"] .genre-tag:hover {
    background: var(--purple);
    color: white;
    border-color: var(--purple);
}

/* Search input */
[data-theme="light"] .search-input {
    background: white;
    border: 2px solid #ddd;
    color: var(--dark);
}

[data-theme="light"] .search-input::placeholder {
    color: #999;
}

/* Nav tabs */
[data-theme="light"] .nav-tab {
    color: var(--dark);
}

[data-theme="light"] .nav-tab.active {
    background: var(--purple);
    color: white;
}

/* Winner cards */
[data-theme="light"] .winner-card {
    background: white;
    border: 2px solid var(--purple);
}

[data-theme="light"] .winner-card .winner-song,
[data-theme="light"] .winner-card .winner-artist,
[data-theme="light"] .winner-card .winner-year {
    color: var(--dark);
}

/* Allyears section */
[data-theme="light"] .allyears-section {
    background: white;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .allyears-section h2,
[data-theme="light"] .allyears-section p {
    color: var(--dark);
}

/* ================================
   NEW COMPONENTS - All Years, Playlist, Gigs, Venues, Album Art
   ================================ */

/* Album Art */
.album-art {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-size: cover;
    background-position: center;
}

.song-item.top-10 .album-art {
    width: 55px;
    height: 55px;
    min-width: 55px;
    max-width: 55px;
}

/* Song Actions */
.song-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.playlist-add-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 5px;
}

.playlist-add-btn .heart {
    color: var(--pink);
}

.playlist-add-btn.in-playlist .heart {
    color: #ff1744;
}

.playlist-add-btn:hover {
    transform: scale(1.2);
}

.spotify-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #1DB954;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.spotify-btn:hover {
    background: #1ed760;
    transform: translateY(-2px);
}

.spotify-btn.big-btn {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Song Genre Tag */
.song-genre {
    display: inline;
    padding: 2px 8px;
    background: var(--purple);
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 8px;
    white-space: nowrap;
    width: fit-content;
}

/* Playlist Section */
.playlist-builder {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px;
}

.playlist-items {
    min-height: 100px;
}

.empty-playlist {
    text-align: center;
    opacity: 0.6;
    padding: 40px 20px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.playlist-item:hover {
    background: rgba(255,255,255,0.1);
}

.playlist-position {
    font-weight: bold;
    color: var(--yellow);
    font-size: 1.1rem;
    min-width: 30px;
}

.playlist-info {
    flex: 1;
}

.playlist-title {
    font-weight: 600;
    display: block;
}

.playlist-artist {
    opacity: 0.7;
    font-size: 0.9rem;
}

.playlist-original {
    color: var(--teal);
    font-size: 0.85rem;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: transform 0.2s;
}

.remove-btn:hover {
    transform: scale(1.2);
}

.playlist-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* All Years Statistics Section - Enhanced */
#allyears {
    padding-top: 10px;
}

#allyears h2 {
    margin-bottom: 24px;
}

.allyears-subsection {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.allyears-subsection h3 {
    color: var(--yellow);
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.allyears-subsection > p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.allyears-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.allyears-stat-card {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.08), rgba(255, 0, 110, 0.05));
    border-radius: 14px;
    padding: 18px;
    border-left: 4px solid var(--pink);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.allyears-stat-card:hover {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.15), rgba(255, 0, 110, 0.1));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(131, 56, 236, 0.2);
    border-left-color: var(--yellow);
}

.allyears-stat-card h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}

.allyears-stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.allyears-stat-card .stat-details {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 8px;
    color: var(--text-secondary);
}

.year-badges {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.year-badge {
    background: linear-gradient(135deg, var(--purple), #6a1b9a);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(131, 56, 236, 0.25);
    transition: all 0.2s ease;
}

.year-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(131, 56, 236, 0.4);
}

/* Light theme adjustments for All Years */
[data-theme="light"] .allyears-subsection {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .allyears-subsection h3 {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .allyears-stat-card {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.05), rgba(255, 0, 110, 0.03));
    border-top-color: rgba(0, 0, 0, 0.06);
    border-right-color: rgba(0, 0, 0, 0.04);
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .allyears-stat-card:hover {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.1), rgba(255, 0, 110, 0.05));
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Gigs Section */
.gigs-grid {
    display: grid;
    gap: 15px;
}

.gig-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px;
    border-left: 4px solid var(--teal);
    transition: all 0.2s;
}

.gig-card:hover {
    background: rgba(255,255,255,0.08);
}

.gig-date {
    text-align: center;
    min-width: 60px;
}

.gig-day {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--yellow);
}

.gig-month {
    display: block;
    font-size: 0.9rem;
    color: var(--teal);
    font-weight: 600;
}

.gig-details {
    flex: 1;
}

.gig-details h3 {
    color: white;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.gig-venue {
    color: var(--pink);
    font-weight: 600;
    margin-bottom: 5px;
}

.gig-address,
.gig-time,
.gig-price {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.gig-btn {
    align-self: center;
}

/* Venues Section */
.venues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.venue-card {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px;
    border-top: 4px solid var(--pink);
    transition: all 0.2s;
}

.venue-card:hover {
    background: rgba(255,255,255,0.08);
}

.venue-name {
    color: var(--yellow);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.venue-address {
    opacity: 0.8;
    margin-bottom: 10px;
}

.venue-desc {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 15px;
    line-height: 1.5;
}

.venue-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.venue-link {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.venue-link:hover {
    background: var(--purple);
}

/* Light theme overrides for new components */
[data-theme="light"] .playlist-item,
[data-theme="light"] .gig-card,
[data-theme="light"] .venue-card,
[data-theme="light"] .playlist-builder {
    background: white;
    border: 1px solid #e0e0e0;
}

[data-theme="light"] .playlist-item:hover,
[data-theme="light"] .gig-card:hover,
[data-theme="light"] .venue-card:hover {
    background: #f8f8f8;
}

[data-theme="light"] .playlist-title,
[data-theme="light"] .gig-details h3 {
    color: var(--dark);
}

[data-theme="light"] .allyears-stat-card h4 {
    color: var(--dark);
}

[data-theme="light"] .btn-secondary {
    background: #f0f0f0;
    color: var(--dark);
    border-color: #ddd;
}

[data-theme="light"] .btn-secondary:hover {
    background: #e0e0e0;
}

[data-theme="light"] .venue-link {
    background: #f0f0f0;
    color: var(--dark);
}

[data-theme="light"] .venue-link:hover {
    background: var(--purple);
    color: white;
}

[data-theme="light"] .venue-name {
    color: var(--purple);
}

/* Mobile Responsiveness for new components */
@media (max-width: 768px) {
    .song-actions {
        flex-direction: column;
        gap: 5px;
    }

    .spotify-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .allyears-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .allyears-subsection {
        padding: 18px;
        margin-bottom: 24px;
    }

    .allyears-subsection h3 {
        font-size: 1.1rem;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .allyears-stat-card {
        padding: 14px;
    }

    .allyears-stat-card .stat-value {
        font-size: 1.3rem;
    }

    .allyears-stat-card h4 {
        font-size: 0.95rem;
    }

    .year-badges {
        gap: 4px;
        margin-top: 10px;
    }

    .year-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .gig-card {
        flex-direction: column;
        text-align: center;
    }

    .gig-date {
        display: flex;
        gap: 5px;
        justify-content: center;
    }

    .venues-grid {
        grid-template-columns: 1fr;
    }

    .playlist-item {
        flex-wrap: wrap;
    }

    .playlist-original {
        width: 100%;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .allyears-grid {
        grid-template-columns: 1fr;
    }

    .album-art {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
}

/* ================================
   CONTRIBUTE SECTION - HERO STYLE
   ================================ */

.contribute-hero {
    position: relative;
    margin: 40px -20px;
    padding: 60px 20px;
    overflow: hidden;
}

.contribute-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #FF006E 0%, #8338EC 50%, #3A86FF 100%);
    z-index: 0;
}

.contribute-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.contribute-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contribute-hero h2 {
    font-family: 'Bangers', cursive;
    font-size: 3rem;
    color: white !important;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.contribute-tagline {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.95) !important;
    margin-bottom: 35px;
}

.contribute-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.contribute-card {
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 20px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: none;
}

/* Colorful card variants */
.contribute-card.card-band {
    background: linear-gradient(160deg, #FF3385 0%, #FF006E 40%, #B80050 100%);
    box-shadow: 0 10px 30px rgba(255,0,110,0.5);
}
.contribute-card.card-venue {
    background: linear-gradient(160deg, #33E0FF 0%, #00B4D8 40%, #007A94 100%);
    box-shadow: 0 10px 30px rgba(0,180,216,0.5);
}
.contribute-card.card-gig {
    background: linear-gradient(160deg, #FFE566 0%, #FFD93D 40%, #E6A800 100%);
    box-shadow: 0 10px 30px rgba(255,217,61,0.5);
}
.contribute-card.card-gig h3 { color: #1a1a2e !important; }
.contribute-card.card-gig p { color: rgba(0,0,0,0.75) !important; }
.contribute-card.card-countdown {
    background: linear-gradient(160deg, #4ADE80 0%, #22C55E 40%, #15803D 100%);
    box-shadow: 0 10px 30px rgba(34,197,94,0.5);
}

.contribute-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    filter: brightness(1.1);
}

.contribute-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.contribute-card h3 {
    color: #FFD93D !important;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.contribute-card p {
    color: rgba(255,255,255,0.9) !important;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
}

/* Light theme - keep the gradient, it works for both */
[data-theme="light"] .contribute-hero {
    /* Same gradient looks great in light mode too */
}

[data-theme="light"] .contribute-card h3 {
    color: #FFD93D !important;
}

@media (max-width: 900px) {
    .contribute-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .contribute-hero {
        padding: 40px 15px;
        margin: 30px -15px;
    }

    .contribute-hero h2 {
        font-size: 2.2rem;
    }

    .contribute-tagline {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }

    .contribute-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .contribute-card {
        padding: 20px 15px;
    }

    .contribute-icon {
        font-size: 2.5rem;
    }

    .contribute-card h3 {
        font-size: 1.1rem;
    }

    .contribute-card p {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .contribute-grid {
        grid-template-columns: 1fr;
    }

    .contribute-card {
        padding: 25px 20px;
    }
}

/* ==========================================
   ENHANCED MOBILE RESPONSIVENESS
   ========================================== */

/* Small phones (320px - 480px) */
@media (max-width: 480px) {
    .search-input {
        min-width: 100%;
        padding: 12px 20px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .search-form {
        flex-direction: column;
    }

    .search-form .btn {
        width: 100%;
    }

    .cities-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero p {
        font-size: 0.95rem;
    }

    .container {
        padding: 0 15px;
    }

    /* Touch-friendly buttons */
    .btn, button, a.btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    /* Newsletter form */
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input[type="email"] {
        min-width: 100% !important;
        margin-bottom: 10px;
    }

    /* Song items more compact - keep alignment */
    .song-item {
        grid-template-columns: 35px 40px 1fr 90px;
        padding: 8px 12px;
        gap: 8px;
    }

    .song-rank {
        font-size: 1rem;
    }

    .album-art {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .song-title {
        font-size: 0.9rem;
    }

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

    .song-actions {
        width: 90px;
        min-width: 90px;
    }
}

/* Very small phones (< 360px) */
@media (max-width: 360px) {
    .nav-logo img {
        height: 30px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero .subtitle {
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 12px 10px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* Very compact song items - maintain alignment */
    .song-item {
        grid-template-columns: 28px 35px 1fr 80px;
        gap: 6px;
        padding: 8px 10px;
        min-height: 50px;
    }

    .position {
        font-size: 0.9rem;
    }

    .album-art {
        width: 35px;
        height: 35px;
        min-width: 35px;
    }

    .song-actions {
        width: 80px;
        min-width: 80px;
        gap: 4px;
    }

    .song-actions .playlist-add-btn,
    .song-actions .spotify-btn,
    .song-actions .youtube-btn {
        width: 32px;
        min-width: 32px;
        height: 32px;
    }

    .song-title {
        font-size: 0.8rem;
        /* Allow some wrapping on tiny screens instead of aggressive truncation */
        white-space: normal;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

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

    /* Touch-friendly buttons - minimum 44px for accessibility */
    .song-actions .spotify-btn {
        padding: 8px 10px;
        min-width: 44px;
        min-height: 44px;
    }

    .song-actions .playlist-add-btn {
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
    }

    .song-actions {
        gap: 8px;
    }

    /* Stats in single column on tiny screens */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Year buttons smaller */
    .year-btn {
        padding: 10px 16px;
        font-size: 1rem;
    }

    /* Nav tabs smaller */
    .nav-tab {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* Genre tags smaller */
    .genre-tag {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

/* Tablet landscape and iPad */
@media (min-width: 768px) and (max-width: 1024px) {
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contribute-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

/* Focus states for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--purple);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bg-card: rgba(255, 255, 255, 0.15);
        --text-secondary: rgba(255, 255, 255, 0.95);
        --border-color: rgba(255, 255, 255, 0.3);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* ==========================================
   ENHANCED MOBILE VIBRANCY
   ========================================== */

/* Make cards more visible on mobile */
@media (max-width: 768px) {
    .card,
    .song-item,
    .city-card,
    .stat-card,
    .gig-card,
    .venue-card,
    .artist-card {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--border-color);
    }

    /* Increase text contrast on mobile */
    .text-secondary,
    .artist-name,
    .meta,
    .subtitle {
        color: var(--text-secondary);
    }

    /* Make gradients more vibrant on mobile */
    .hero {
        background: linear-gradient(135deg,
            var(--bg-primary) 0%,
            rgba(155, 123, 184, 0.2) 50%,
            var(--bg-secondary) 100%);
    }

    /* Increase button visibility */
    .btn-primary {
        background: linear-gradient(135deg, var(--purple), var(--pink));
        box-shadow: 0 4px 15px rgba(155, 123, 184, 0.4);
    }

    /* Song list stripe for better readability */
    .song-item:nth-child(odd) {
        background: rgba(255, 255, 255, 0.06);
    }

    .song-item:nth-child(even) {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* ==========================================
   MOBILE SIDEBAR REORDERING & STICKY CTA
   ========================================== */

/* Move sidebar CTAs above fold on mobile */
@media (max-width: 900px) {
    /* Flex column for two-column layouts */
    .artist-layout,
    .venue-layout,
    .gig-layout,
    .genre-layout,
    .content-with-sidebar {
        display: flex;
        flex-direction: column;
    }

    /* Move key sidebar CTAs to top - match all sidebar class variants */
    .sidebar .ticket-card,
    .sidebar .streaming-links,
    .sidebar .rsvp-card,
    .sidebar .booking-card,
    .sidebar .cta-card,
    .artist-sidebar .sidebar-card:first-child,
    .venue-sidebar .sidebar-card:first-child,
    .gig-sidebar .sidebar-card:first-child,
    .genre-sidebar .sidebar-card:first-child {
        order: -1;
    }

    /* All sidebar variants become full width on mobile */
    .sidebar,
    .artist-sidebar,
    .venue-sidebar,
    .gig-sidebar,
    .genre-sidebar {
        width: 100%;
        order: 1; /* After main content by default */
    }

    /* Main content areas full width */
    .main-content,
    .artist-main,
    .venue-main,
    .gig-main,
    .genre-main {
        width: 100%;
        order: 0;
    }
}

/* Sticky bottom CTA bar for key actions */
.mobile-sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .mobile-sticky-cta {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 16px;
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        z-index: 100;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    .mobile-sticky-cta .btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 1rem;
    }

    /* Add padding to body when sticky CTA is present */
    body.has-sticky-cta {
        padding-bottom: 70px;
    }

    /* Light theme sticky CTA */
    [data-theme="light"] .mobile-sticky-cta {
        background: #fff;
        border-top-color: #e0e0e0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }
}

/* ==========================================
   IMPROVED GIG INFO CARDS MOBILE
   ========================================== */

@media (max-width: 600px) {
    .gig-info-cards {
        grid-template-columns: 1fr;
    }

    .gig-info-cards .info-card {
        padding: 15px;
    }
}

/* ==========================================
   IMPROVED FILTER ROWS
   ========================================== */

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 8px;
        margin: 0 -15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .filter-row::-webkit-scrollbar {
        display: none;
    }

    .filter-row .filter-btn,
    .filter-row button {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* ==========================================
   MOBILE-FRIENDLY MODALS
   ========================================== */

@media (max-width: 768px) {
    .modal-content {
        margin: 20px 10px;
        max-width: calc(100% - 20px);
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }

    .modal-header {
        padding: 25px 20px;
    }

    .modal-header h2 {
        font-size: 1.8rem;
    }

    .modal-body {
        padding: 20px;
    }

    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
    }
}

/* ==========================================
   TOUCH-FRIENDLY INTERACTIVE ELEMENTS
   ========================================== */

/* Larger tap areas for links in lists */
@media (max-width: 768px) {
    .footer-links li {
        margin-bottom: 0;
    }

    .footer-links a {
        display: block;
        padding: 10px 0;
        min-height: 44px;
    }

    /* Mobile menu links */
    .mobile-link {
        display: block;
        padding: 15px;
        min-height: 50px;
    }

    /* Social links larger */
    .footer-social a {
        padding: 10px;
        font-size: 1.3rem;
    }

    /* Dropdown/select elements */
    select {
        min-height: 44px;
        padding: 10px 15px;
        font-size: 16px; /* Prevents iOS zoom */
    }
}

/* ===== Branded Artist Placeholder ===== */
.musick-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.musick-placeholder__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image:
        repeating-linear-gradient(
            var(--rotation, 15deg),
            transparent,
            transparent 18px,
            rgba(255,255,255,0.3) 18px,
            rgba(255,255,255,0.3) 20px
        );
    transform: translateX(var(--offset, 0px));
}

.musick-placeholder__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 10px;
}

.musick-placeholder__name {
    font-family: 'Bangers', cursive;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    line-height: 1.2;
    word-break: break-word;
    max-width: 90%;
    text-align: center;
}

.musick-placeholder__brand {
    font-family: 'Bangers', cursive;
    color: rgba(255,255,255,0.4);
    letter-spacing: 3px;
    text-transform: lowercase;
}

.musick-placeholder__cta {
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
    line-height: 1.4;
    max-width: 200px;
    margin: 8px auto 0;
}

/* Size: large (artist page hero) */
.musick-placeholder--large .musick-placeholder__name { font-size: 2rem; }
.musick-placeholder--large .musick-placeholder__brand { font-size: 1.2rem; margin-top: 4px; }

/* Size: medium (cards) */
.musick-placeholder--medium .musick-placeholder__name { font-size: 1rem; }
.musick-placeholder--medium .musick-placeholder__brand { font-size: 0.7rem; margin-top: 2px; }

/* Size: small (similar artists, avatars) */
.musick-placeholder--small .musick-placeholder__name { font-size: 0.75rem; }
.musick-placeholder--small .musick-placeholder__brand { font-size: 0.55rem; margin-top: 1px; }

/* Light theme */
[data-theme="light"] .musick-placeholder__name { color: rgba(255,255,255,0.95); }
[data-theme="light"] .musick-placeholder__brand { color: rgba(255,255,255,0.5); }
[data-theme="light"] .musick-placeholder__cta { color: rgba(255,255,255,0.8); }
