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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

#search-box {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

#search-box:focus {
    outline: none;
    border-color: #4CAF50;
}

#line-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.line-filter {
    padding: 6px 12px;
    border: 2px solid;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
    user-select: none;
}

.line-filter:hover {
    transform: scale(1.05);
}

.line-filter.inactive {
    opacity: 0.3;
    filter: grayscale(100%);
}

#map {
    flex: 1;
    width: 100%;
}

.info-panel {
    position: fixed;
    right: 20px;
    top: 120px;
    width: 350px;
    max-height: 70vh;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 20px;
    overflow-y: auto;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.info-panel.hidden {
    transform: translateX(400px);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

#info-content h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

#info-content .codes {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#info-content .code-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

#info-content .info-row {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

#info-content .info-row:last-child {
    border-bottom: none;
}

#info-content .info-label {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

#info-content .info-value {
    color: #333;
    font-size: 14px;
}

.leaflet-popup-content {
    margin: 10px;
    min-width: 200px;
}

.leaflet-popup-content h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.leaflet-popup-content .station-codes {
    margin-bottom: 8px;
    font-weight: 600;
    color: #666;
}

.leaflet-popup-content .station-info {
    font-size: 13px;
    color: #666;
}

/* Custom marker styles */
.station-marker {
    background-color: white;
    border: 3px solid;
    border-radius: 50%;
    width: 16px;
    height: 16px;
}

.station-marker.interchange {
    width: 20px;
    height: 20px;
    border-width: 4px;
}

/* Responsive design */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    #search-box {
        max-width: 100%;
    }

    .info-panel {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        max-height: 50vh;
    }

    h1 {
        font-size: 20px;
    }
}
