/* =========================================================
   GLOBAL RESET
========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at top, #1a1233, #07030f);
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================================================
   PAGE WRAPPER
========================================================= */
.page-wrapper {
    padding-bottom: 120px; /* space for search panel */
}

/* =========================================================
   EVENTS GRID – BASIC FOR MASONRY.JS
========================================================= */
.events-grid {
    padding: 14px 12px;
}

/* Masonry items - width controls columns */
.event-card,
.brand-card,
.promoted-card {
    width: calc(50% - 8px); /* mobile 2 columns */
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 0 20px rgba(105, 48, 195, 0.4);
    transition: all 0.4s ease;
    cursor: pointer;
}

@media (min-width: 768px) {
    .event-card,
    .brand-card,
    .promoted-card {
        width: calc(33.333% - 13.33px); /* tablet 3 columns */
    }
}

@media (min-width: 1200px) {
    .event-card,
    .brand-card,
    .promoted-card {
        width: calc(20% - 19.2px); /* desktop 5 columns */
    }
}

.event-card:hover,
.brand-card:hover,
.promoted-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(255, 214, 90, 0.3);
    border: 2px solid #FFD65A;
}

.event-card img,
.brand-card img,
.promoted-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.promoted-card img {
    margin-top: 42px;
}

/* =========================================================
   DAY BADGE – RIBBON TOP-LEFT ON ALL EVENTS OF THE DAY
========================================================= */
.has-day-badge {
    position: relative;
}

.day-badge {
    position: absolute;
    top: 12px;
    left: -8px;
    z-index: 4;
    padding: 6px 18px 6px 26px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
}

.day-badge::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -12px;
    border-left: 10px solid transparent;
    border-top: 12px solid transparent; /* color set per day class */
}

/* Day-specific colors (light glow + border) */
.day-today .day-badge {
    background: linear-gradient(135deg, #FFD65A, #ffab00);
    color: #3a1a6a;
    box-shadow: 0 0 20px rgba(255, 214, 90, 0.6);
}

.day-today .day-badge::before {
    border-top-color: #ffab00;
}

.day-tomorrow .day-badge {
    background: linear-gradient(135deg, #a0ff5a, #7fff00);
    color: #1a3a1a;
    box-shadow: 0 0 20px rgba(160, 255, 90, 0.6);
}

.day-tomorrow .day-badge::before {
    border-top-color: #7fff00;
}

.day-future .day-badge {
    background: linear-gradient(135deg, #5ad4ff, #00aaff);
    color: #1a2a3a;
    box-shadow: 0 0 20px rgba(90, 212, 255, 0.6);
}

.day-future .day-badge::before {
    border-top-color: #00aaff;
}

/* Apply glow border to the card itself */
.day-today {
    border: 2px solid #FFD65A;
    box-shadow: 0 0 24px rgba(255, 214, 90, 0.5);
}

.day-tomorrow {
    border: 2px solid #a0ff5a;
    box-shadow: 0 0 24px rgba(160, 255, 90, 0.5);
}

.day-future {
    border: 2px solid #5ad4ff;
    box-shadow: 0 0 24px rgba(90, 212, 255, 0.5);
}

/* =========================================================
   PROMOTED GLOW & HEADER
========================================================= */
.promoted-card {
    animation: promotedGlow 4s infinite ease-in-out;
}

@keyframes promotedGlow {
    0% { box-shadow: 0 0 16px rgba(105, 48, 195, 0.35); }
    50% { box-shadow: 0 0 28px rgba(255, 214, 90, 0.55); }
    100% { box-shadow: 0 0 16px rgba(105, 48, 195, 0.35); }
}

.promo-header {
    width: 100%;
    text-align: center;
    padding: 8px 0;
    font-weight: 800;
    font-size: 13px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    animation: promoHeaderShift 7s infinite ease-in-out;
}

@keyframes promoHeaderShift {
    0%, 70% {
        background: linear-gradient(to right, #55229b, #6a32cc);
        color: #FFD65A;
    }
    100% {
        background: linear-gradient(to right, #FFD65A, #FFC83D);
        color: #3a1a6a;
    }
}

.promo-header::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: shimmerMove 2.4s infinite ease-in-out;
}

@keyframes shimmerMove {
    0% { left: -120%; }
    60%,100% { left: 140%; }
}

/* =========================================================
   LOADING SCREEN
========================================================= */
.loading-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #1a1233, #07030f);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity .6s ease;
}

.loading-logo {
    width: 160px;
    border-radius: 20px;
    box-shadow: 0 0 18px rgba(255, 214, 90, 0.55);
    z-index: 3;
}

.loading-text {
    margin-top: 10px;
    font-size: 15px;
    color: #d6caff;
    z-index: 3;
}

.loading-gif {
    width: 120px;
    margin-top: 14px;
    animation: loaderPulse 2.4s infinite ease-in-out;
    z-index: 3;
}

@keyframes loaderPulse {
    50% {
        box-shadow: 0 0 26px rgba(210, 138, 255, 0.7);
    }
}

/* =========================================================
   FLOATING MUSIC ICONS
========================================================= */
#musicNotesContainer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.music-note {
    position: absolute;
    bottom: -40px;
    font-size: 26px;
    opacity: 0;
    animation: floatMusicUp 4s linear forwards;
    filter: drop-shadow(0 0 14px rgba(214, 107, 255, 0.9));
}

@keyframes floatMusicUp {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(-180px) scale(1.25);
        opacity: 0;
    }
}

/* =========================================================
   SEARCH PANEL
========================================================= */
.bottom-search-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 5, 25, 0.95);
    padding: 10px;
    z-index: 5000;
    backdrop-filter: blur(6px);
}

.search-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    outline: none;
    background: #1b1336;
    color: #fff;
    font-size: 14px;
}

.search-filters {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.filter-pill {
    flex: 1;
    padding: 6px 8px;
    border-radius: 8px;
    background: #2a1d55;
    color: #fff;
    border: none;
}