:root {
    --bg-color: #0b0c10;
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-color-2: rgba(255, 255, 255, 0.06);
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0aab2;
    --accent-1: #ff2a5f; /* Neon pink/red */
    --accent-2: #00f0ff; /* Neon cyan */
    --accent-3: #6a00ff; /* Purple */
    --accent-4: #00ffaa; /* Green */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans TC', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Animated Shapes for Liquid Glass */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #6a00ff;
    top: 50%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Header & Nav */
header {
    background: rgba(11, 12, 16, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-border);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-left {
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.header-center::-webkit-scrollbar {
    display: none;
}

.header-right {
    flex-shrink: 0;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-1);
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-btn:hover, .nav-btn.active {
    color: var(--text-primary);
    background: var(--surface-color-2);
}

/* Main Content */
main {
    flex: 1;
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.view {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view.active {
    display: block;
}

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

/* Typography & General */
h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    margin-top: 2rem;
}

.section-header h2 span {
    color: var(--accent-2);
    font-weight: 300;
    margin-left: 0.5rem;
}

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

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), #ff5e00);
    color: #fff;
    border: none;
    box-shadow: 0 10px 20px rgba(255, 42, 95, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(255, 42, 95, 0.4);
}

.btn-gacha {
    background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
    box-shadow: 0 10px 20px rgba(106, 0, 255, 0.3);
}

.btn-gacha:hover {
    box-shadow: 0 15px 25px rgba(106, 0, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

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

/* Glass Panels */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* Hero Section */
.hero {
    margin: 2rem 0 3rem 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3.5rem;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero p strong {
    color: var(--accent-2);
    font-weight: 700;
}

.badge {
    display: inline-block;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Stats Dashboard */
.stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 4rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* Gacha Section */
.gacha-section {
    margin-bottom: 4rem;
    text-align: center;
}

.gacha-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px;
}

.gacha-card {
    width: 280px;
    height: 380px;
    cursor: pointer;
    padding: 0;
    border: none;
    background: none;
}

.gacha-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.gacha-card-inner.flipped {
    transform: rotateY(180deg);
}

.gacha-card-front,
.gacha-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* When flipped: front can't capture clicks, back can */
.gacha-card-inner.flipped .gacha-card-front {
    pointer-events: none;
}

.gacha-card-inner.flipped .gacha-card-back {
    pointer-events: auto;
}

.gacha-card-front {
    background: linear-gradient(135deg, rgba(106,0,255,0.15), rgba(0,240,255,0.1));
    border: 1px solid rgba(106,0,255,0.3);
    backdrop-filter: blur(16px);
}

.gacha-card-front:hover .gacha-card-glow {
    opacity: 1;
}

.gacha-card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(106,0,255,0.4), transparent);
    border-radius: 50%;
    opacity: 0.5;
    transition: opacity 0.5s;
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    0% { transform: scale(0.9); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0.6; }
}

.gacha-card-back {
    background: linear-gradient(135deg, rgba(255,42,95,0.12), rgba(0,240,255,0.08));
    border: 1px solid rgba(255,42,95,0.3);
    backdrop-filter: blur(16px);
    transform: rotateY(180deg);
}

.gacha-rarity {
    font-size: 1.8rem;
    color: #ffd700;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.gacha-song-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
}

.gacha-song-album {
    font-size: 0.9rem;
    color: var(--accent-2);
    margin-bottom: 0.3rem;
}

.gacha-song-band {
    font-size: 1rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
}

@keyframes card-shine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.gacha-card-inner.flipped .gacha-card-back::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 20px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    background-size: 200% 100%;
    animation: card-shine 3s infinite;
}

/* Home Section Spacing */
.home-section {
    margin-bottom: 4rem;
}

/* Quick Nav Grid */
.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.quick-nav-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-nav-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: var(--surface-color-2);
}

.qn-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.qn-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.qn-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Graph Legend */
.graph-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.3rem;
    vertical-align: middle;
}

/* Grids */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--accent-2);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Timeline */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    padding: 2rem;
    border-left: 2px solid var(--surface-border);
    position: relative;
    margin-bottom: 2rem;
    background: var(--surface-color);
    border-radius: 0 16px 16px 0;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    border-left-color: var(--accent-1);
    background: rgba(255, 255, 255, 0.05);
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent-1);
    border-radius: 50%;
    left: -7px;
    top: 2.5rem;
    box-shadow: 0 0 10px var(--accent-1);
}

.timeline-month {
    font-family: var(--font-heading);
    color: var(--accent-1);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-item h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.timeline-item a {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
}

.timeline-item a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--surface-border);
    margin-top: auto;
    background: rgba(11, 12, 16, 0.5);
    backdrop-filter: blur(10px);
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-links a {
    color: var(--accent-2);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ============ RESPONSIVE — TABLET & MOBILE ============ */
@media (max-width: 768px) {
    /* ---- Header & Nav ---- */
    .header-container {
        display: grid;
        grid-template-columns: max-content 1fr;
        align-items: center;
        gap: 0.5rem 1rem;
        padding: 0.5rem 1rem;
    }

    .header-left {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .header-right {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .header-center {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        width: 100%;
        justify-content: flex-start;
        gap: 0.15rem;
        padding-bottom: 0.2rem;
    }

    .nav-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .search-container {
        width: 100%;
        max-width: 200px;
    }

    #global-search {
        width: 100%;
    }

    #global-search:focus {
        width: 100%;
    }

    .search-dropdown {
        width: 100vw; /* Take full viewport width */
        right: auto;
        left: -1rem; /* Adjust for padding to snap to edge */
        transform: translateX(0);
    }

    /* ---- Main content — push below taller header ---- */
    main {
        margin-top: 110px;
        padding: 1rem;
    }

    /* ---- Reduce padding on glass panels / cards ---- */
    .glass-panel {
        padding: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .vinyl-card {
        padding: 1.5rem;
    }

    /* ---- Typography ---- */
    h2 {
        font-size: 2rem;
    }

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

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

    .section-title {
        font-size: 1.4rem;
    }

    .section-header {
        margin-bottom: 2rem;
        margin-top: 1rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    /* ---- Stats Dashboard ---- */
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

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

    .stat-icon {
        font-size: 1.6rem;
    }

    /* ---- Gacha Card ---- */
    .gacha-card {
        width: 250px;
        height: 340px;
    }

    .gacha-song-name {
        font-size: 1.1rem;
    }

    /* ---- Quick Nav Grid ---- */
    .quick-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .quick-nav-card {
        padding: 1.2rem;
    }

    .qn-icon {
        font-size: 2rem;
    }

    .qn-title {
        font-size: 1.1rem;
    }

    /* ---- Grid (bands, stores, venues, etc.) ---- */
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* ---- Filter Bar ---- */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.8rem;
    }

    .filter-tags {
        justify-content: center;
    }

    .filter-search-wrap {
        width: 100%;
        min-width: 0;
    }

    /* ---- Timeline ---- */
    .timeline-item h3 {
        font-size: 1.3rem;
    }

    /* ---- Calendar ---- */
    .calendar-controls {
        gap: 0.5rem;
    }

    #current-month-display {
        font-size: 1.2rem;
    }

    /* ---- Modal ---- */
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .modal-content.glass-panel {
        padding: 1.5rem;
    }

    .close-btn {
        top: 1rem;
        right: 1rem;
        font-size: 1.6rem;
    }

    /* ---- Favorites grid ---- */
    .favorites-grid {
        grid-template-columns: 1fr;
    }

    /* ---- Playlist cards ---- */
    .playlist-header {
        padding: 1rem;
    }

    .playlist-body {
        padding: 0 1rem 1rem;
    }

    .playlist-actions {
        padding: 0 1rem 1rem;
    }

    /* ---- Footer ---- */
    footer {
        padding: 2rem 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    main {
        margin-top: 110px;
        padding: 0.8rem;
    }

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

    .quick-nav-grid {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.6rem;
    }

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

    .glass-panel {
        padding: 1.2rem;
        border-radius: 14px;
    }

    .gacha-card {
        width: 220px;
        height: 310px;
    }

    .gacha-song-name {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .gacha-actions .btn-primary,
    .gacha-actions .btn-secondary {
        width: auto;
    }

    .nav-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

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

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

/* Calendar Grid Styles */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#current-month-display {
    color: var(--accent-1);
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.calendar-wrapper {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 1rem;
    overflow-x: auto;
}

.calendar-wrapper > div {
    min-width: 700px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--surface-border);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-day {
    min-height: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.08);
}

.calendar-day.empty {
    background: rgba(255, 255, 255, 0.01);
    border-color: rgba(255, 255, 255, 0.02);
}

.calendar-date {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
    align-self: flex-end;
}

.calendar-event {
    background: rgba(0, 240, 255, 0.1);
    border-left: 3px solid var(--accent-1);
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.3rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event:hover {
    background: rgba(0, 240, 255, 0.2);
}

.calendar-event.livehouse {
    background: rgba(255, 0, 102, 0.1);
    border-left-color: var(--accent-2);
}

.calendar-event.livehouse:hover {
    background: rgba(255, 0, 102, 0.2);
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 600px;
    width: 90%;
    position: relative;
}

.close-btn {
    color: var(--text-secondary);
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--accent-1);
    text-decoration: none;
    cursor: pointer;
}

/* Accordion Styles */
.accordion {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    padding: 1rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    transition: 0.4s;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    display: flex;
    justify-content: space-between;
}

.accordion.active, .accordion:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--accent-2);
}

.accordion-panel {
    padding: 0 1rem;
    background: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    margin-bottom: 0.5rem;
}

.track-list {
    list-style-position: inside;
    color: var(--text-secondary);
    padding: 1rem 0;
}
.track-list li {
    margin-bottom: 0.3rem;
}

/* Vinyl Record CD Card Styles */
.vinyl-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.vinyl-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.vinyl-card:hover .vinyl-disc {
    animation: spin-vinyl 3s linear infinite;
}

.vinyl-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
}

.vinyl-sleeve {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 8px;
    top: 10px;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    text-align: center;
    padding: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.4s ease;
}

.vinyl-card:hover .vinyl-sleeve {
    transform: translateX(-20px);
}

.vinyl-disc {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        #333 15%,
        #1a1a1a 16%,
        #111 30%,
        #222 31%,
        #111 45%,
        #1a1a1a 46%,
        #222 60%,
        #111 61%,
        #1a1a1a 75%,
        #222 76%,
        #111 90%,
        #1a1a1a 91%
    );
    top: 15px;
    right: 0;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.vinyl-disc::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #555, #333);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #444;
}

.vinyl-disc::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,255,255,0.05);
}

@keyframes spin-vinyl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vinyl-info {
    text-align: center;
    width: 100%;
}

.vinyl-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.vinyl-info .vinyl-meta {
    font-size: 0.85rem;
    color: var(--accent-2);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.vinyl-info .vinyl-genre {
    margin-bottom: 0.8rem;
}

.vinyl-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Global Search Styles */
.search-container {
    padding: 0;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-1);
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.2);
}

#global-search {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.6rem 1.5rem 0.6rem 2.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    width: 200px;
    outline: none;
    transition: width 0.3s ease;
}

#global-search:focus {
    width: 280px;
}

#global-search::placeholder {
    color: rgba(255,255,255,0.4);
}

.search-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    width: 350px;
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    padding: 0.5rem 0;
}

/* Custom Scrollbar for Search Dropdown */
.search-dropdown::-webkit-scrollbar {
    width: 6px;
}
.search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.search-result-item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.search-result-icon {
    font-size: 1.2rem;
}

.search-result-info {
    display: flex;
    flex-direction: column;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.search-result-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.search-category-header {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-family: var(--font-heading);
    color: var(--accent-1);
    background: rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============ FILTER BAR ============ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.filter-tag {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover {
    border-color: var(--accent-2);
    color: var(--accent-2);
    background: rgba(0, 240, 255, 0.08);
}

.filter-tag.active {
    border-color: var(--accent-1);
    color: #fff;
    background: var(--accent-1);
    box-shadow: 0 0 12px rgba(255, 42, 95, 0.3);
}

.filter-search-wrap {
    min-width: 200px;
}

.filter-search {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--surface-border);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.filter-search:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ============ PLAYER VINYL ============ */
.player-vinyl-wrap {
    display: flex;
    justify-content: center;
    margin: 0.8rem 0;
}

.player-vinyl {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #222 0%, #111 40%, #333 41%, #111 60%, #333 61%, #1a1a1a 100%);
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.6), inset 0 0 10px rgba(255,255,255,0.05);
}

.player-vinyl.spinning {
    animation: vinylSpin 2s linear infinite;
}

.vinyl-groove {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: inset 0 0 0 4px rgba(255,255,255,0.02), inset 0 0 0 8px rgba(255,255,255,0.02), inset 0 0 0 12px rgba(255,255,255,0.015);
}

.vinyl-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
    box-shadow: 0 0 8px rgba(255,42,95,0.4);
}

@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============ PLAYER PROGRESS BAR ============ */
.player-progress-wrap {
    width: 80%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin: 0.8rem auto 0;
    overflow: hidden;
}

.player-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    border-radius: 3px;
    transition: width 0.1s linear;
}

.player-progress.animating {
    animation: progressSweep 8s linear forwards;
}

@keyframes progressSweep {
    from { width: 0%; }
    to { width: 100%; }
}

/* ============ FAVORITE BUTTON ============ */
.btn-fav {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--accent-1);
    background: transparent;
    color: var(--accent-1);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-fav:hover {
    background: rgba(255, 42, 95, 0.15);
    box-shadow: 0 0 12px rgba(255, 42, 95, 0.25);
}

.btn-fav.favorited {
    background: var(--accent-1);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 42, 95, 0.4);
}

/* ============ FAVORITES GRID ============ */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.fav-card {
    background: var(--surface-color-2);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.fav-card:hover {
    border-color: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,240,255,0.1);
}

.fav-vinyl-mini {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #333 0%, #111 60%, #222 100%);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--accent-1);
}

.fav-info {
    flex: 1;
    min-width: 0;
}

.fav-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fav-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fav-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.fav-btn-play, .fav-btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--surface-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fav-btn-play:hover {
    background: rgba(0,240,255,0.15);
    color: var(--accent-2);
    border-color: var(--accent-2);
}

.fav-btn-remove:hover {
    background: rgba(255,42,95,0.15);
    color: var(--accent-1);
    border-color: var(--accent-1);
}

/* ============ ENHANCED PLAYLIST CARDS ============ */
.playlist-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    transition: all 0.3s ease;
}

.playlist-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.12);
}

.playlist-header {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.playlist-header::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background: inherit;
}

.playlist-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.playlist-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    position: relative;
}

.playlist-theme {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    position: relative;
}

.playlist-body {
    padding: 0 1.5rem 1.5rem;
}

.playlist-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.playlist-track {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
    border-radius: 4px;
    padding-left: 0.5rem;
}

.playlist-track:hover {
    background: rgba(255,255,255,0.04);
}

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

.playlist-track-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-right: 0.8rem;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

.playlist-track-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-track-band {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.playlist-track-play {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-track-play:hover {
    background: rgba(0,240,255,0.15);
    color: var(--accent-2);
}

.playlist-actions {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 0.5rem;
}

/* (mobile overrides for filter-bar, favorites-grid, etc. consolidated into main @media block above) */
