/* ========================================
   SEARCH PAGE REDESIGN STYLES
   ======================================== */

/* Random Song Header Section */
.random-section-header {
    background: linear-gradient(135deg, #E91E8C 0%, #30B3B8 100%);
    border: 1px solid rgba(233, 30, 140, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 20px 24px 20px;
}

.random-header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

/* Vinyl Button - Header Version */
.vinyl-button-header {
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.vinyl-outer-header {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.vinyl-button-header:hover .vinyl-outer-header {
    transform: scale(1.05) rotate(15deg);
    box-shadow: 0 6px 20px rgba(48, 179, 184, 0.4);
}

.vinyl-inner-header {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-grooves-header {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        transparent 0px,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
}

.vinyl-center-header {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #30B3B8 0%, #2a9fa3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(48, 179, 184, 0.5);
    z-index: 1;
}

.play-icon-vinyl-header {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Random Text Content */
.random-text-content {
    flex: 1;
    min-width: 0;
}

.random-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.random-genre-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.random-genre-selector:hover {
    color: #30B3B8;
}

.random-genre-selector svg {
    transition: transform 0.2s ease;
}

.random-genre-selector.active svg {
    transform: rotate(180deg);
}

/* Genre Dropdown */
.genre-dropdown {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.genre-dropdown-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.genre-dropdown-item:hover {
    background: rgba(48, 179, 184, 0.15);
    border-color: rgba(48, 179, 184, 0.5);
    color: #30B3B8;
}

.genre-dropdown-item.active {
    background: rgba(48, 179, 184, 0.2);
    border-color: #30B3B8;
    color: #30B3B8;
}

/* Artists Section */
.artists-section {
    margin: 32px 20px;
}

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

.view-all-btn {
    background: transparent;
    border: none;
    color: #30B3B8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background: rgba(48, 179, 184, 0.1);
}

/* Artists Grid - 7 items in a flexible grid */
.artists-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

/* Hide scrollbar but keep functionality */
.artists-grid::-webkit-scrollbar {
    height: 6px;
}

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

.artists-grid::-webkit-scrollbar-thumb {
    background: rgba(48, 179, 184, 0.3);
    border-radius: 3px;
}

.artists-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(48, 179, 184, 0.5);
}

.artist-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    flex-shrink: 0;
}

/* ========================================
   FOUNDING ARTISTS - ELECTRIC CELEBRATION
   ======================================== */

/* Section title enhancement */
#foundingArtistsSection .section-title {
    background: linear-gradient(90deg, #F67854, #E91E8C, #30B3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Founding Artists Cards - Electric Style */
#foundingArtistsList .artist-card {
    position: relative;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    min-width: 140px;
    flex-shrink: 0;
    border-radius: 16px;
    border: 2px solid transparent;
    background: 
        linear-gradient(#1a1a2e, #1a1a2e) padding-box,
        linear-gradient(135deg, #F67854, #E91E8C, #30B3B8) border-box;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s ease;
}

/* Animated gradient border effect */
#foundingArtistsList .artist-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #F67854, #E91E8C, #30B3B8, #F67854);
    background-size: 300% 300%;
    border-radius: 16px;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
    opacity: 0.7;
}

/* Inner background to cover the gradient */
#foundingArtistsList .artist-card::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, 
        rgba(26, 26, 46, 0.95) 0%, 
        rgba(26, 26, 46, 0.9) 100%
    );
    border-radius: 14px;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#foundingArtistsList .artist-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(233, 30, 140, 0.3),
        0 0 20px rgba(246, 120, 84, 0.2),
        0 0 40px rgba(48, 179, 184, 0.1);
}

/* Founding artist avatar with glow */
#foundingArtistsList .artist-card-avatar {
    border: 3px solid transparent;
    background: 
        linear-gradient(#1a1a2e, #1a1a2e) padding-box,
        linear-gradient(135deg, #F67854, #E91E8C, #30B3B8) border-box;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 15px rgba(233, 30, 140, 0.3);
}

#foundingArtistsList .artist-card:hover .artist-card-avatar {
    box-shadow: 0 0 25px rgba(233, 30, 140, 0.5);
}

/* Founding badge/star indicator */
#foundingArtistsList .artist-card-name::after {
    content: ' ⭐';
    font-size: 10px;
}

.artist-card:hover {
    background: rgba(48, 179, 184, 0.1);
    border-color: rgba(48, 179, 184, 0.5);
    transform: translateY(-4px);
}

.artist-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 2px solid rgba(48, 179, 184, 0.3);
}

.artist-card-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-card-genre {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Genre Cards Section */
.genre-cards-section {
    margin: 32px 20px 100px 20px;
}

.genre-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .genre-cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Genre Card - Album Art Collage Version */
.genre-card-collage {
    aspect-ratio: 1;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.genre-card-collage:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(48, 179, 184, 0.8);
}

/* 2x2 Grid of Album Covers */
.genre-card-covers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
}

.genre-card-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.genre-card-collage:hover .genre-card-cover-img {
    opacity: 0.5;
}

/* Dark Overlay with Genre Info */
.genre-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background 0.4s ease;
}

.genre-card-collage:hover .genre-card-overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

.genre-card-name {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.genre-card-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
}

/* Hide browse content when searching */
#searchResults.active ~ #searchBrowseContent {
    display: none;
}

/* Loading state */
.loading-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 40px 20px;
    font-size: 14px;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .random-section-header {
        padding: 20px 16px;
        margin: 16px 16px 20px 16px;
    }

    .random-title {
        font-size: 18px;
    }

    .random-genre-selector {
        font-size: 13px;
    }

    .artists-grid {
        gap: 12px;
    }

    .artist-card {
        padding: 12px;
        min-width: 120px;
    }

    .artist-card-avatar {
        width: 70px;
        height: 70px;
    }

    .genre-card-emoji {
        font-size: 36px;
    }

    .genre-card-name {
        font-size: 14px;
    }

    .genre-dropdown {
        grid-template-columns: 1fr;
    }
}

/* Desktop Optimizations */
@media (min-width: 1024px) {
    .genre-cards-grid {
        gap: 16px;
    }
}

/* ========================================
   BROWSE THE CRATE SECTION
   ======================================== */

.browse-crate-section {
    padding: 0 20px;
    margin-bottom: 24px;
}

.browse-crate-title {
    font-size: 13px;
    font-weight: 700;
    color: #30B3B8;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

/* Genre Chips Row */
.genre-chips-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.genre-chips-row::-webkit-scrollbar {
    display: none;
}

.genre-chip {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent;
    border: 2px solid #475569;
    color: #94a3b8;
}

.genre-chip:hover {
    border-color: #64748b;
    color: #e2e8f0;
}

.genre-chip.active {
    background: #30B3B8;
    border-color: #30B3B8;
    color: white;
}

.genre-chip.hype {
    background: transparent;
    border: 2px solid #E91E8C;
    color: #E91E8C;
}

.genre-chip.hype.active {
    background: linear-gradient(135deg, #E91E8C 0%, #ff6b9d 100%);
    border-color: #E91E8C;
    color: white;
}

/* ========================================
   CRATE SONGS SECTIONS
   ======================================== */

.crate-songs-section {
    padding: 0 20px;
    margin-bottom: 32px;
}

.crate-songs-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.see-all-link {
    color: #30B3B8;
    font-size: 14px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
}

.see-all-link:hover {
    text-decoration: underline;
}

/* Song Cards Horizontal Scroll */
.song-cards-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.song-cards-scroll::-webkit-scrollbar {
    display: none;
}

/* Individual Song Card */
.song-card-crate {
    flex-shrink: 0;
    width: 160px;
    cursor: pointer;
}

.song-card-cover-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.song-card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.song-card-crate:hover .song-card-cover {
    transform: scale(1.05);
}

/* Song Card Cover Fallback */
.song-card-cover-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Artist Avatar on Cover */
.song-card-artist-avatar {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* NEW Badge */
.song-card-new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #30B3B8;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Song Info */
.song-card-title {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-artist {
    font-size: 13px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty State */
.crate-empty-state {
    padding: 32px 20px;
    text-align: center;
    color: #64748b;
}

.crate-empty-state p {
    font-size: 14px;
    margin-bottom: 12px;
}

.crate-empty-state a {
    color: #30B3B8;
    text-decoration: none;
    font-weight: 600;
}

.crate-empty-state a:hover {
    text-decoration: underline;
}

/* ========================================
   RISING NOW SECTION
   ======================================== */

.rising-now-section {
    padding: 0 20px;
    margin-bottom: 24px;
}

.rising-now-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.rising-now-dot {
    width: 10px;
    height: 10px;
    background: #f97316;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.rising-now-title {
    font-size: 13px;
    font-weight: 700;
    color: #30B3B8;
    letter-spacing: 1.5px;
}

.rising-now-subtitle {
    font-size: 13px;
    color: #64748b;
}

.rising-now-card {
    background: linear-gradient(135deg, #E91E8C 0%, #30B3B8 100%);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rising-now-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 30, 140, 0.3);
}

.rising-now-points {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.rising-now-points svg {
    width: 16px;
    height: 16px;
}

.rising-now-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rising-now-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.rising-now-genre {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.rising-now-name {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
