:root { --bg: #0a0a0a; --card: #161616; --text: #e0e0e0; --accent: #bb86fc; --sameday: #03dac6; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 20px; line-height: 1.5; }

/* --- LAYOUT & HEADER --- */
header { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 40px; }

/* Countdown */
.countdown-container {
    width: 100%; max-width: 700px;
    background: linear-gradient(90deg, rgba(20,20,20,0.95) 0%, rgba(30,30,30,0.95) 100%);
    border: 1px solid #333;
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 12px 24px;
    display: none; /* Toggled to flex in JS */
    align-items: center; justify-content: space-between;
    box-shadow: 0 0 20px rgba(0,0,0,0.4), inset 0 0 60px rgba(187, 134, 252, 0.05);
    position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Animated sheen */
.countdown-container::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    animation: sheen 4s infinite; pointer-events: none;
}
@keyframes sheen { 0% { left: -100%; } 20% { left: 100%; } 100% { left: 100%; } }

.countdown-content { text-align: left; z-index: 2; display: flex; flex-direction: column; justify-content: center; }

.countdown-label {
    font-size: 0.65rem; color: var(--accent);
    text-transform: uppercase; letter-spacing: 2px; font-weight: 800;
    margin-bottom: 2px; display: flex; align-items: center; gap: 6px;
}
.countdown-label::before { content: '●'; font-size: 0.6rem; animation: pulse 2s infinite; }

.countdown-event { font-size: 1.1rem; color: #fff; font-weight: 700; z-index: 2; line-height: 1.2; }
.countdown-event a { color: #fff; text-decoration: none; transition: all 0.2s; }
.countdown-event a:hover { color: var(--accent); text-shadow: 0 0 10px var(--accent); }

.countdown-loc {
    font-size: 0.8rem; color: #bbb; margin-top: 3px;
    font-weight: 400; display: flex; align-items: center;
}
.countdown-loc::before {
    content: '📍'; font-size: 0.7rem; margin-right: 4px; opacity: 0.7;
}

.countdown-days {
    font-size: 2.2rem; color: #fff; font-weight: 900;
    margin-left: 20px; z-index: 2; line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    text-align: center;
}
.days-unit { font-size: 0.7rem; color: #888; font-weight: 600; display: block; margin-top: 2px; letter-spacing: 1px; }

/* Controls */
.controls {
    display: flex; gap: 15px; align-items: center; background: #1a1a1a;
    padding: 12px 20px; border-radius: 12px; border: 1px solid #333;
    flex-wrap: wrap; justify-content: center; width: 100%; max-width: 900px;
}

.search-input {
    background: #000; border: 1px solid #333; color: #fff;
    padding: 8px 15px; border-radius: 8px; font-size: 0.9rem; width: 180px; transition: border-color 0.2s;
}
.search-input:focus { outline: none; border-color: var(--accent); }

.filter-group { display: flex; gap: 5px; }
.filter-btn {
    background: transparent; border: none; color: #666;
    padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; transition: all 0.2s;
    white-space: nowrap;
}
.filter-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.filter-btn.active { background: var(--accent); color: #000; }

.toggle-container {
    display: flex; align-items: center; gap: 10px;
    padding-left: 15px; border-left: 1px solid #333;
    color: #666; font-weight: 600; font-size: 0.9rem; cursor: pointer; user-select: none;
}
.toggle-switch {
    width: 34px; height: 18px; background: #333; border-radius: 20px;
    position: relative; transition: background 0.3s;
}
.toggle-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: transform 0.3s;
}
.toggle-container.active .toggle-switch { background: var(--accent); }
.toggle-container.active .toggle-switch::after { transform: translateX(16px); }
.toggle-container.active { color: #fff; }

.view-toggle { display: flex; background: #000; border-radius: 6px; padding: 2px; border: 1px solid #333; }
.view-btn { background: transparent; border: none; color: #666; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.85rem;}
.view-btn.active { background: #222; color: #fff; }

/* --- TIMELINE VIEW --- */
.timeline {
    display: flex; flex-direction: column;
    align-items: center; max-width: 850px; margin: 0 auto; width: 100%;
}

.card {
    width: 100%; background: var(--card); border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: row; border: 1px solid #222; position: relative;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 220px; /* Ensure consistent height */
}
.card:hover { transform: scale(1.01); border-color: var(--accent); box-shadow: 0 0 20px rgba(187, 134, 252, 0.1); }

/* Ready to Launch Glow */
.card-ready {
    border: 1px solid #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}
.ready-checkmark {
    position: absolute; top: 10px; right: 10px;
    background: rgba(0,0,0,0.8); color: #ffd700;
    border: 1px solid #ffd700; border-radius: 50%;
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; z-index: 3; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.poster-container { width: 180px; position: relative; flex-shrink: 0; background: #000; }
.poster { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.8; transition: 0.3s; position: absolute; top: 0; left: 0; }
.card:hover .poster { opacity: 1; }
.poster-link { display: block; height: 100%; width: 100%; position: absolute; top: 0; left: 0; }

.event-type-badge {
    position: absolute; top: 10px; left: 10px; padding: 3px 8px;
    background: rgba(0,0,0,0.8); color: #aaa; border: 1px solid #333;
    border-radius: 4px; font-size: 0.6rem; text-transform: uppercase; font-weight: 800; z-index: 2;
}

.status {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 6px 0;
    text-align: center;
    font-weight: 900;
    font-size: 0.75rem;
    text-transform: uppercase;
    z-index: 2;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

/* STATUS COLORS */
.status-confirmed { background: rgba(46, 125, 50, 0.5); color: #fff; box-shadow: 0 -2px 10px rgba(46, 125, 50, 0.4); } /* Green */
.status-attended { background: rgba(27, 94, 32, 0.5); color: #ccc; } /* Darker Green */

.status-abort { background: rgba(245, 0, 87, 0.5); color: #fff; box-shadow: 0 -2px 10px rgba(245, 0, 87, 0.4); } /* Bright Pink/Red */
.status-skipped { background: rgba(198, 40, 40, 0.5); color: #fff; } /* Red */

.status-interested { background: rgba(21, 101, 192, 0.5); color: #fff; } /* Blue */
.status-high-interest { background: rgba(0, 176, 255, 0.5); color: #121212; box-shadow: 0 -2px 10px rgba(0, 176, 255, 0.3); } /* Lighter Brighter Blue */

.status-pending { background: rgba(230, 126, 34, 0.5); color: #fff; } /* Orange */
.status-probably-not { background: rgba(66, 66, 66, 0.5); color: #aaa; } /* Grey */
.status-gray { background: rgba(51, 51, 51, 0.5); color: #888; }

.info { padding: 0; flex-grow: 1; display: flex; flex-direction: column; }
.main-info { padding: 20px; }
.title { font-size: 1.25rem; font-weight: 800; margin: 0 0 8px 0; color: #fff; }
.title a { color: inherit; text-decoration: none; transition: color 0.2s; }
.date-loc-row { color: #888; font-size: 0.9rem; display: flex; flex-direction: column; gap: 4px; }

/* --- CARD FOOTER --- */
.card-footer {
    margin-top: auto;
    display: flex;
    border-top: 1px solid #2a2a2a;
    background: rgba(0,0,0,0.2);
    align-items: center;
}

.footer-split {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
}

.footer-split.left {
    flex: 1;
    justify-content: center;
    border-right: 1px solid #2a2a2a;
}

.footer-split.right {
    flex: 1;
    justify-content: center;
}

.ticket-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.price-tag {
    font-size: 0.65rem;
    color: #888;
    font-weight: 600;
    background: #111;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #333;
}

.travel-info {
    display: flex;
    gap: 15px;
}

.sonic-profile {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
}

.val-euphoria { background: rgba(244, 114, 182, 0.1); color: #f472b6; border: 1px solid rgba(244, 114, 182, 0.2); }
.val-groove   { background: rgba(34, 211, 238, 0.1); color: #22d3ee; border: 1px solid rgba(34, 211, 238, 0.2); }
.val-release  { background: rgba(248, 113, 113, 0.1); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.2); }
.val-mixed    { background: rgba(167, 139, 250, 0.1); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.2); }
.val-live     { background: rgba(136, 136, 136, 0.1); color: #888; border: 1px solid rgba(136, 136, 136, 0.2); font-style: italic; }

.dim { opacity: 0.1; filter: grayscale(100%); }
.icon-link { text-decoration: none; transition: transform 0.2s; display: inline-block; }
.icon-link:hover { transform: scale(1.2); }

/* Action Required Pulse */
.icon-alert {
    opacity: 0.5 !important; /* Greyed out */
    filter: grayscale(100%) !important;
    border: 2px solid #ff4444;
    border-radius: 50%;
    padding: 2px;
    animation: pulse-border 1.5s infinite;
    display: inline-block;
    text-decoration: none;
}
@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(255, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

/* Sticky Month Header */
.month-header {
    position: sticky; top: 10px; z-index: 10;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    padding: 8px 20px; border-radius: 20px; border: 1px solid #333;
    margin: 20px 0;
    font-family: 'Inter', sans-serif; font-weight: 300; letter-spacing: 4px;
    text-transform: uppercase; font-size: 0.9rem; color: #aaa;
    width: fit-content;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Weather */
.weather-info {
    font-size: 0.85rem; color: #ccc; display: flex; align-items: center; gap: 6px;
    margin-top: 6px;
}

/* Dropdown */
.dropdown-btn {
    background: transparent; border: none; color: #666; cursor: pointer;
    font-size: 0.8rem; padding: 0; margin-top: 5px; text-decoration: underline;
}
.dropdown-content {
    display: none; margin-top: 10px; padding: 10px; background: rgba(0,0,0,0.3);
    border-radius: 8px; font-size: 0.85rem; color: #ccc;
}
.dropdown-content.show { display: block; }

/* Venue Loyalty */
.venue-loyalty {
    font-size: 0.7rem; color: #666; margin-left: 6px;
    background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px;
}

/* GAP INDICATOR STYLING */
.gap-indicator {
    height: 60px; display: flex; align-items: center; justify-content: center;
    position: relative; width: 100%;
}
.gap-line { position: absolute; width: 2px; height: 100%; background: #222; left: 90px; }
.gap-text {
    background: var(--bg); padding: 4px 14px; border: 1px solid #222;
    border-radius: 20px; font-size: 0.7rem; color: #555; font-weight: 800; z-index: 2;
    text-transform: uppercase; letter-spacing: 1px;
    transition: all 0.3s ease;
}

/* Back to Back: Purple Accent, Fluid Pulse */
.b2b-indicator {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(187, 134, 252, 0.1);
    box-shadow: 0 0 10px rgba(187, 134, 252, 0.2);
    animation: fluidPulse 3s infinite ease-in-out;
}

/* Same Day: Teal Accent, Distinct Pulse */
.sameday-indicator {
    border-color: var(--sameday);
    color: var(--sameday);
    background: rgba(3, 218, 198, 0.1);
    box-shadow: 0 0 10px rgba(3, 218, 198, 0.2);
    animation: fluidPulse 2.5s infinite ease-in-out;
}

@keyframes fluidPulse {
    0% { opacity: 0.7; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.7; transform: scale(0.98); }
}

@media (max-width: 600px) {
    .card { flex-direction: column; }
    .poster-container { width: 100%; height: 200px; }
    .gap-line { left: 50%; }
    .footer-split.left { border-right: none; }
    .footer-split { justify-content: center; }
}

/* --- MAP VIEW --- */
#map-container { width: 100%; height: 600px; display: none; border-radius: 12px; border: 1px solid #333; overflow: hidden; position: relative; }
#map { width: 100%; height: 100%; }

#map-status {
    position: absolute; top: 10px; right: 10px; z-index: 1000;
    background: rgba(0,0,0,0.8); color: #fff; padding: 10px 15px;
    border-radius: 8px; font-size: 0.9rem; display: none;
    border: 1px solid #444; backdrop-filter: blur(4px);
}
.spinner { display: inline-block; width: 10px; height: 10px; border: 2px solid #fff; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin-right: 8px; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.leaflet-popup-content-wrapper { background: #2a2a2a; color: #fff; border-radius: 8px; }
.leaflet-popup-tip { background: #2a2a2a; }
.leaflet-popup-content b { color: var(--accent); }
.leaflet-container a { color: var(--accent); }

/* --- LOADING --- */
.skeleton { background: #1e1e1e; border: 1px solid #333; border-radius: 12px; height: 200px; width: 100%; margin-bottom: 20px; position: relative; overflow: hidden; }
.skeleton::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0.1) 60%, rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
}
.no-results { text-align: center; color: #666; font-style: italic; margin-top: 50px; width: 100%; }
