body {
    font-family: Arial, sans-serif;
    background-color: #1c1c1c; /* Dark background */
    color: #f2f2f2; /* Light text color */
    margin: 0;
    padding: 0;
}
.station-name,a {
    color: white;         /* Set the text color to white */
    font-weight: bold;    /* Make the text bold */
    text-decoration: none; /* Remove underline */
    width: 120px;
    text-align: center;
    border-radius: 16px;
    background-color: white;
    color: black;
    padding: 2px 5px;
}
.station-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a:hover, a:active, a:visited {
    color: black;         /* Keep the text color white in all states (hover, active, visited) */
    text-decoration: none; /* Ensure no underline in any state */
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    color: #f2f2f2; /* Light text color */
}

th, td {
    padding: 10px;
    border: 1px solid #333; /* Darker border */
    text-align: left;
}

th {
    background-color: #333; /* Dark header background */
    color: #f2f2f2;
}

td {
    background-color: #2c2c2c; /* Darker cell background */
}
/* Modal styling */
#trainModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}
#trainModal > div {
    background-color: #333;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    color: #f2f2f2; /* Light modal text */
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 9px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-form input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-form input[type="text"]:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74,144,226,0.2);
}

.search-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.search-form button {
    padding: 8px 20px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #357abd;
}

/* Responsive design */
@media (max-width: 768px) {
    th:nth-child(2), th:nth-child(3), th:nth-child(4), td:nth-child(3) {
        display: none; /* Hide the 'Trasa' column on mobile */
    }
    table {
        width: 100%;
        overflow-x: auto; /* Allow horizontal scroll */
    }
    .search-form {
        flex-direction: column;
        padding: 10px;
    }
    td:not(:first-child),th {
        border: none;
    }
    td:not(:first-child) {
        padding-bottom:70px;      
    }
    #train_badge {
        margin-top: -50px;
    }
    tr {
        padding-top: 30px;
        width:20px;
    }
    tr:nth-child(4) {
        width: -30px;
    }
    .search-form select {
        width: 100%;
    }
    #station_from, #station_to {
        display: block;
        margin-top: 50px;
        margin-left: -170px; 
        z-index: 1000;
        position: absolute;
        margin-bottom: 5px;
    }
    #station_to {
        margin-left: -90px;
    }
    #delay_1,#delay_2 {
        margin-left: -120px;
    }
    #delay_2 {
        max-width: 10px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
}

