/* --- General Body & Fonts --- */
body {
    background-color: #0b0b1a;
    color: #eee;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 180px; /* Space for footer and player */
}
body.modal-open {
    overflow: hidden;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: #fff;
    text-align: center;
    border-bottom: 1px solid #ddd;
}
.site-header img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.main-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
    background-color: #0f0f1f;
    border-top: 1px solid #2a2a3a;
    border-bottom: 1px solid #2a2a3a;
}
.nav-btn {
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    border: 1px solid #555;
    cursor: pointer;
    color: #ddd;
    background: linear-gradient(145deg, #2c2c3a, #1a1a2a);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
.nav-btn:hover, .nav-btn.active {
    background: #7e57c2;
    border-color: #c5c5ff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 0 15px rgba(126, 87, 194, 0.4);
}

/* --- Main Content Area --- */
.main-content {
    padding: 2rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}
.page-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: #fff;
    margin: 0 0 2rem 0;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 25px rgba(126, 87, 194, 0.5);
    text-align: center;
}

/* --- Vibe Search & Top Bar --- */
.vibe-search-promo {
    text-align: center;
    padding: 1rem 0 2rem 0;
}
#vibe-search-btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: linear-gradient(145deg, #7e57c2, #42a5f5);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    animation: pulse-glow-cta 4s infinite ease-in-out;
}
.vibe-search-subtitle {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #b0a8e0;
}
@keyframes pulse-glow-cta {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(126, 87, 194, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 35px rgba(66, 165, 245, 0.9); }
}
.top-bar {
    padding: 1rem 0;
}
#search-input {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #555;
    background-color: #2c2c3a;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
#search-input:focus {
    border-color: #7e57c2;
    box-shadow: 0 0 15px rgba(126, 87, 194, 0.5);
}

/* --- Filters & Info Boxes --- */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0;
}
.filter-btn {
    font-weight: 700;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid #555;
    cursor: pointer;
    color: #ddd;
    background: #2c2c3a;
    transition: all 0.2s ease-in-out;
}
.filter-btn:hover {
    transform: translateY(-2px);
    border-color: #7e57c2;
}
.filter-btn.active {
    border-color: #c5c5ff;
    color: #fff;
    background: linear-gradient(145deg, #7e57c2, #42a5f5);
}
.info-box {
    margin: 1rem auto;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc;
    background: rgba(44, 44, 58, 0.5);
    padding: 1rem;
    border-radius: 12px;
}
.info-box a { color: #7e57c2; text-decoration: none; }

/* --- Beat List & Items --- */
.beat-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 200px;
}
.beat-item {
    background: rgba(42, 42, 60, 0.3);
    border: 1px solid #3a3a4a;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 1rem;
}
.beat-item.is-playing-card {
    animation: pulse-glow 2s infinite alternate;
    border-color: #7e57c2;
}
@keyframes pulse-glow {
    from { box-shadow: 0 0 8px rgba(126, 87, 194, 0.5); }
    to { box-shadow: 0 0 25px rgba(66, 165, 245, 0.8); }
}
.beat-item-play-btn {
    font-size: 1.5rem; color: #ddd; cursor: pointer; background: none; border: none; padding: 0;
}
.beat-item-play-btn:hover { color: #7e57c2; }
.beat-item-title { font-weight: 600; font-size: 1.1rem; }
.beat-item-category {
    font-size: 0.8rem; font-weight: 400; color: #aaa;
    text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}
.beat-item-price { font-weight: 700; color: #00ff99; }
.beat-item-price.sold { color: #ff5555; }
.btn {
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: #555;
    color: #e0e0e0;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-block;
}
.btn:hover { transform: translateY(-2px); }
.share-btn { background: transparent !important; color: #aaa !important; }
.buy-btn-green {
    background: transparent;
    border: 1px solid #4caf50;
    color: #4caf50;
}
.buy-btn-green:hover:not(:disabled) {
    background: linear-gradient(145deg, #7e57c2, #42a5f5);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 25px rgba(66, 165, 245, 0.8);
}
.buy-btn-green:disabled { cursor: not-allowed; opacity: 0.5; }

/* --- Loader --- */
.loader-container {
    position: absolute; inset: 0;
    display: flex; justify-content: center; align-items: center;
    background-color: rgba(11, 11, 26, 0.7);
    z-index: 10;
}
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #7e57c2;
    border-radius: 50%;
    width: 50px; height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Modals (Vibe & Social Proof) --- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.visible { opacity: 1; visibility: visible; }
.modal-content {
    position: relative;
    background: #1e1e2f;
    border: 1px solid #444;
    border-radius: 16px;
    padding: 2rem;
    width: 90%; max-width: 500px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 10px; right: 15px;
    font-size: 2rem; color: #888;
    cursor: pointer; background: none; border: none;
    transition: color 0.2s, transform 0.2s;
}
.modal-close:hover { color: #fff; transform: scale(1.1); }

/* --- Social Proof Modal --- */
.social-proof-content {
    box-shadow: 0 0 25px rgba(126, 87, 194, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
}

#social-proof-viewers {
    font-size: 1rem;
    color: #aaa;
    font-style: italic;
    text-align: center;
    margin-bottom: 0.5rem;
}

#social-proof-confirm-btn.confirm-btn {
    background: #4caf50;
    color: white;
    border: none;
    font-weight: 700;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 1rem;
}
#social-proof-confirm-btn.confirm-btn:hover {
    background: #43a047;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
}

/* --- Vibe Modal --- */
.vibe-modal-content {
    background: transparent; border: none;
    width: 90vw; height: 90vw; max-width: 600px; max-height: 600px;
}
#vibe-visualizer {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); z-index: 0;
}
.vibe-text-wrapper {
    position: relative; z-index: 1; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between; align-items: center;
}
.vibe-bubbles {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.5rem;
}
.vibe-bubble {
    padding: 0.8rem 1.5rem; border-radius: 50px;
    border: 1px solid #555; background: #333;
    cursor: pointer; transition: all 0.3s ease;
}
.vibe-bubble:hover { background: #7e57c2; transform: scale(1.1); }

/* --- Shuffle button --- */
#shuffle-vibes-btn {
    margin-top: 2.5rem; margin-bottom: 1rem;
    padding: 0.8rem 2rem; border-radius: 50px;
    background: linear-gradient(145deg, #7e57c2, #42a5f5);
    color: #fff; border: none; cursor: pointer;
    font-weight: 700; font-size: 1rem;
    transition: all 0.3s ease; box-shadow: 0 0 20px rgba(126, 87, 194, 0.7);
}
#shuffle-vibes-btn:hover { transform: scale(1.05); box-shadow: 0 0 35px rgba(66, 165, 245, 0.9); }
#shuffle-vibes-btn i { margin-right: 0.5rem; }

/* --- Accordion Info Section --- */
.info-accordion {
    border-bottom: 1px solid #3a3a4a;
    margin: 2rem 0;
    background: none;
    border-radius: 0;
}
.info-accordion[open] {
    background: rgba(42, 42, 60, 0.3);
    border-radius: 12px;
    border: 1px solid #3a3a4a;
    border-bottom: 1px solid #3a3a4a;
}
.info-accordion summary {
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0.2rem;
    cursor: pointer;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ccc;
}
.info-accordion summary::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
}
.info-accordion[open] summary::after {
    transform: rotate(180deg);
}
.info-accordion-content {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    color: #ccc;
    line-height: 1.7;
}
.info-accordion-content h4 {
    color: #fff;
    border-bottom: 1px solid #4a4a5a;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.info-accordion-content ul {
    padding-left: 20px;
    margin: 0;
}
.info-accordion-content li {
    margin-bottom: 0.75rem;
}

/* --- Sticky Player (Glassmorphism) --- */
#sticky-player {
    position: fixed; bottom: 85px; left: 0; width: 100%;
    z-index: 1500; transform: translateY(200%);
    transition: transform 0.5s ease;
    background: rgba(42, 42, 58, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 1rem;
    align-items: center;
}
#sticky-player.visible { transform: translateY(0); }
.track-info .track-title { font-weight: bold; margin: 0; }
.custom-audio-player { display: flex; align-items: center; gap: 10px; max-width: 500px; width: 100%; }
.player-btn { background: transparent; color: #ccc; border-radius: 50%; width: 35px; height: 35px; border: none; cursor: pointer; }
.play-pause-btn {
    background: linear-gradient(145deg, #7e57c2, #42a5f5);
    color: #fff; width: 45px; height: 45px;
    transition: all 0.3s ease; box-shadow: 0 0 20px rgba(126, 87, 194, 0.7);
}
.progress-bar-container { flex-grow: 1; background: rgba(0,0,0,0.2); border-radius: 5px; height: 10px; cursor: pointer; }
.progress-bar { background: linear-gradient(90deg, #7e57c2, #42a5f5); width: 0%; height: 100%; border-radius: 5px; }
.time-display { font-size: 0.85rem; color: #aaa; min-width: 80px; text-align: center; }

/* --- Footer --- */
.site-footer {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background-color: #0f0f1f; padding: 1rem; text-align: center;
    border-top: 1px solid #2a2a3a; z-index: 100;
}
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.5rem; }
.footer-links a { color: #ccc; text-decoration: none; }
.copyright-text { font-size: 0.8rem; color: #888; }

/* --- Single Beat View --- */
.single-beat-view .vibe-search-promo,
.single-beat-view .top-bar,
.single-beat-view .category-filter,
.single-beat-view #info-boxes-container { display: none; }
.back-to-all-btn {
    display: inline-block; margin-bottom: 2rem; color: #ccc;
    text-decoration: none; border: 1px solid #555; border-radius: 50px; padding: 0.4rem 1rem;
}
.back-to-all-btn:hover { border-color: #7e57c2; }
