body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1 {
    color: #0056b3;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 2.2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    text-align: center;
    padding: 0 10px;
    width: 100%;
}

#filter-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px 10px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    margin-bottom: 0;
}

#filter-controls label {
    font-weight: bold;
    color: #0056b3;
    white-space: nowrap;
}

#filter-controls input[type="radio"] {
    margin-right: 5px;
}

#countdown-timer {
    text-align: right;
    font-size: 0.95em;
    color: #34495e;
    background-color: #ecf0f1;
    padding: 8px 15px;
    border-bottom: 1px solid #bdc3c7;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-weight: 500;
}

#countdown-timer span {
    font-weight: bold;
    color: #2c3e50;
}

#map {
    height: 600px;
    width: 100%;
    max-width: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    flex-grow: 1;
}

@media (max-width: 768px) {
    #map {
        height: 400px;
        width: 100%;
        border-radius: 0;
    }
    h1 {
        font-size: 1.8em;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    #vlak-info {
        position: static !important;
        width: 90%;
        max-width: none;
        margin: 20px auto;
        padding: 15px 20px;
        border-radius: 8px;
        transform: none !important;
        background-color: white;
        border: 1px solid #ddd;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        animation: none !important;
        max-height: none !important;
        overflow-y: visible !important;
        display: block !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        z-index: auto !important;
    }

    #vlak-info .close-button {
        display: none !important;
    }

    #filter-controls {
        flex-direction: column; 
        align-items: center; 
        padding: 10px;
        gap: 8px;
    }

    #filter-controls label {
        margin-bottom: 0;
        text-align: center; 
    }

    #filter-controls input[type="radio"] + label {
        margin-left: 5px;
        margin-right: 15px;
    }

    .menu-container {
        padding: 15px;
        margin: 10px;
    }

    .menu-button {
        padding: 12px 20px;
        font-size: 1.1em;
    }
}

#vlak-info {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    width: 300px; 
    position: fixed;
    top: 20px;
    left: 20px; 
    right: auto;
    transform: none;
    z-index: 1000;
    box-sizing: border-box;
    animation: fadeInScale 0.3s ease-out;
    max-height: 45vh; 
    overflow-y: auto;
    display: none; 
}

#vlak-info:not(.hidden) {
    display: block;
}


@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-button {
    position: absolute;
    top: 10px;
    right: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    color: #a0a0a0;
    background: none;
    border: none;
    padding: 5px;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.close-button:hover {
    color: #d9534f;
    transform: rotate(90deg);
}

#vlak-info h2 {
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

#vlak-info p {
    margin-bottom: 5px;
    line-height: 1.4;
    font-size: 0.9em;
}

#vlak-info strong {
    color: #666;
}

.vlak-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid black;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 1;
    font-size: 0.7em;
    text-transform: uppercase;
    overflow: hidden;
}

.vlak-icon-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    gap: 2px;
}

.train-direction-arrow {
    font-size: 10px;
    line-height: 1;
    color: black;
    margin-left: 2px;
    transform-origin: 50% 50%;
}

.vlak-icon.delay-0-5 .vlak-icon-inner {
    background-color: #28a745;
}
.vlak-icon.delay-6-30 .vlak-icon-inner {
    background-color: #ffc107;
}
.vlak-icon.delay-30-plus .vlak-icon-inner {
    background-color: #dc3545;
}

.past-route {
    stroke: #007bff;
    stroke-width: 5;
    opacity: 0.8;
}

.future-route-animated {
    stroke: #006400;
    stroke-width: 4;
    opacity: 1;
}

.future-route-static {
    stroke: #006400;
    stroke-width: 4;
    opacity: 1;
}


#disclaimer-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 20px 0;
}

#disclaimer {
    background-color: #f8f9fa; 
    border: 1px solid #e2e6ea; 
    border-radius: 8px;
    padding: 15px; 
    margin-top: 30px;
    margin-bottom: 30px;
    width: 90%;
    max-width: 800px;
    box-shadow: none; 
    color: #495057; 
    font-size: 0.9em;
    line-height: 1.5;
    text-align: center;
}

#disclaimer h3 {
    color: #343a40; 
    margin-top: 0;
    margin-bottom: 10px; 
    font-size: 1.1em; 
    font-weight: bold;
}

#disclaimer h4 {
    color: #343a40; 
    margin-top: 15px; 
    margin-bottom: 8px; 
    font-size: 1em; 
    font-weight: bold;
}

#disclaimer p {
    margin-bottom: 8px; 
}

#disclaimer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#disclaimer ul li {
    margin-bottom: 3px; 
}

#disclaimer a {
    color: #007bff;
    text-decoration: underline;
}

#disclaimer a:hover {
    color: #0056b3;
}

.menu-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 40px);
    padding: 20px;
    text-align: center;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.menu-button {
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: inline-block;
    width: 250px;
    text-align: center;
}

.menu-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.menu-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
