* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0f0f0f;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Navbar */
.navbar {
    background: linear-gradient(180deg, rgba(15,15,15,0.98) 0%, rgba(20,20,20,0.95) 100%);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.red { 
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239,68,68,0.5);
}

.subtitle { 
    font-weight: 400; 
    font-size: 0.8rem; 
    color: rgba(255,255,255,0.4);
    margin-left: 8px;
}

.nav-links { display: flex; gap: 8px; }
.nav-links a { 
    color: rgba(255,255,255,0.7); 
    text-decoration: none; 
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.05);
}
.nav-links a:hover { 
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Main Layout */
.main-container { 
    display: flex; 
    flex: 1; 
    height: calc(100vh - 56px);
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 380px;
    background: linear-gradient(180deg, rgba(18,18,18,0.98) 0%, rgba(12,12,12,0.98) 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    z-index: 999;
    backdrop-filter: blur(20px);
}

/* Filters */
.filters { 
    padding: 16px 20px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.years { 
    display: flex; 
    gap: 8px;
    margin-bottom: 12px;
}

.years button { 
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.years button:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.years button.active { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(239,68,68,0.3);
}

.months { 
    display: flex; 
    gap: 12px;
    flex-wrap: wrap;
}

.months span { 
    font-size: 0.75rem; 
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.months span:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Results Header */
.results-header { 
    padding: 16px 20px;
    font-size: 0.9rem;
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-header::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Event List */
.event-list { 
    flex: 1; 
    overflow-y: auto;
    padding: 8px;
}

.event-list::-webkit-scrollbar {
    width: 6px;
}

.event-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

.event-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.event-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* Event Items */
.event-item { 
    padding: 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-item:hover { 
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(4px);
}

.event-header { 
    display: flex; 
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.faction-badge { 
    padding: 4px 10px;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-date { 
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
}

.event-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 6px;
}

.event-desc { 
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.6);
}

/* Faction Colors */
.faction-sdf { 
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #000;
}

.faction-taf { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.faction-stg { 
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* Map Container */
#map-container { 
    flex: 1;
    background-color: #0a0a0a;
}

/* Custom Markers */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

.marker-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
    border: 3px solid rgba(255,255,255,0.9);
}

.marker-circle i {
    color: white;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.marker-pin {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -16px 0 0 -16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.3);
}

.marker-pin i {
    transform: rotate(45deg);
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Leaflet Popup */
.leaflet-popup-content-wrapper {
    background: rgba(18,18,18,0.95);
    color: #fff;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.leaflet-popup-tip {
    background: rgba(18,18,18,0.95);
    border: 1px solid rgba(255,255,255,0.1);
}

.leaflet-popup-content {
    margin: 14px 16px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.leaflet-popup-close-button {
    color: rgba(255,255,255,0.5) !important;
    font-size: 20px !important;
    padding: 8px !important;
}

.leaflet-popup-close-button:hover {
    color: #fff !important;
}

/* Leaflet Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}

.leaflet-control-zoom a {
    background: rgba(18,18,18,0.9) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(30,30,30,0.95) !important;
}

.leaflet-control-zoom-in {
    border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 8px 8px !important;
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(0,0,0,0.6) !important;
    color: rgba(255,255,255,0.4) !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    border-radius: 4px 0 0 0 !important;
}

.leaflet-control-attribution a {
    color: rgba(255,255,255,0.6) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 40%;
        position: absolute;
        bottom: 0;
        border-right: none;
        border-top: 1px solid rgba(255,255,255,0.1);
        border-radius: 20px 20px 0 0;
    }
    
    #map-container {
        height: 60%;
    }
    
    .navbar {
        padding: 0 16px;
    }
    
    .subtitle {
        display: none;
    }
}


/* Event Links */
.event-links {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.twitter-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.twitter-link:hover {
    background: rgba(29,161,242,0.2);
    border-color: rgba(29,161,242,0.4);
    color: #1da1f2;
}

.twitter-link i {
    font-size: 14px;
}
