body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    margin-bottom: 20px;
}


/* New styles for input grid */

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.input-grid label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    color: #555;
}

.input-grid input[type="text"],
.input-grid input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    /* Ensures padding doesn't affect overall width */
    font-size: 0.95rem;
}

#callsignInput {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

#fetchTrackButton {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

#fetchTrackButton:hover {
    background-color: #2980b9;
}


/* Style for the new Fetch Flights button */

#fetchFlightsButton {
    display: block;
    width: 100%;
    padding: 12px 15px;
    background-color: #27ae60;
    /* A green color */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.05rem;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
}

#fetchFlightsButton:hover {
    background-color: #229954;
}

#messageArea {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #d6d8db;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-info {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

#flightInfo,
#waypointsArea {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

#flightInfo h2,
#waypointsArea h2 {
    margin-top: 0;
    color: #34495e;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#waypointsList {
    list-style-type: none;
    padding-left: 0;
}

#waypointsList li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.9rem;
}

#waypointsList li:last-child {
    border-bottom: none;
}


/* Styles for the found flights list */

#foundFlightsArea {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

#foundFlightsArea h2 {
    margin-top: 0;
    color: #34495e;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#foundFlightsList {
    list-style-type: none;
    padding-left: 0;
}

#foundFlightsList li {
    padding: 10px;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

#foundFlightsList li:last-child {
    border-bottom: none;
}

#foundFlightsList button {
    padding: 5px 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

#foundFlightsList button:hover {
    background-color: #2980b9;
}


/* Responsive adjustments */

@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
    }
    #callsignInput {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    #fetchTrackButton {
        border-radius: 4px;
        width: 100%;
    }
    /* Adjust input grid for smaller screens */
    .input-grid {
        grid-template-columns: 1fr;
        /* Stack inputs vertically */
    }
    #fetchFlightsButton {
        font-size: 1rem;
    }
    #foundFlightsList li {
        flex-direction: column;
        align-items: flex-start;
    }
    #foundFlightsList button {
        margin-top: 8px;
        width: 100%;
    }
    body {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }
}