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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #2d2d2d;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#status {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: #aaa;
}

#status span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#map {
    flex: 1;
    position: relative;
    z-index: 1;
}

#event-list {
    position: fixed;
    right: 0;
    top: 100px;
    bottom: 0;
    width: 350px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

#event-list h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.event-card {
    background: rgba(45, 45, 45, 0.9);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 3px solid #4CAF50;
}

.event-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.event-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #4CAF50;
}

.event-card p {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 0.3rem;
}

.event-card .distance {
    color: #888;
    font-size: 0.8rem;
}

#event-detail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#event-detail.hidden {
    display: none;
}

.detail-content {
    background: #2d2d2d;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

#close-detail {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

#close-detail:hover {
    color: #4CAF50;
}

.detail-content h2 {
    margin-bottom: 1rem;
    color: #4CAF50;
}

.detail-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

#detail-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

#detail-link {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.2s;
}

#detail-link:hover {
    background: #45a049;
}

/* Leaflet customization */
.leaflet-popup-content-wrapper {
    background: #2d2d2d;
    color: white;
}

.leaflet-popup-tip {
    background: #2d2d2d;
}

/* Custom marker */
.event-marker {
    background: #4CAF50;
    border: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

@media (max-width: 768px) {
    #event-list {
        width: 100%;
        top: auto;
        bottom: 0;
        height: 40vh;
    }
    
    #map {
        height: 60vh;
    }
}
