/* === GLOBAL DARK MODE === */
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background: #121212;        /* full dark background */
    color: #e0e0e0;             /* soft, readable white */
}

/* === HEADER === */
header {
    background-color: #1c1f26;   /* dark navy/charcoal */
    padding: 20px;
    text-align: center;
    color: #e8e8e8;
    border-bottom: 1px solid #2a2d35;
}

header h1 {
    margin: 0;
}

/* === LAYOUT === */
#layout-container {
    display: flex;
    padding: 20px;
    gap: 30px;
    align-items: flex-start;
}

/* === LEFT COLUMN === */
#left-column {
    width: 250px;
}

/* Search Section */
#searchSection {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#city-input {
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #1e1e1e;
    color: #e0e0e0;
}

#city-input::placeholder {
    color: #888;
}

#search-button {
    padding: 10px;
    background: #3a67d8;    /* blue accent */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#search-button:hover {
    background: #5a84ff;
}

/* Search history container */
#search-history {
    margin-top: 20px;
}

.history-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    background: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
}

.history-btn:hover {
    background: #2a2a2a;
}

/* Toggle button (mobile only) */
#history-toggle {
    display: none; /* so that it only appears in mobile */
}

/* === RIGHT COLUMN === */
#right-column {
    flex: 1;
}

/* === CURRENT WEATHER CARD === */
#current-weather {
    background: #1c1c1c;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    margin-bottom: 20px;
    text-align: center;
}

#current-weather img {
    display: block;
    margin: 10px auto;
}

/* === 5-DAY CARDS === */
#five-day-forecast {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.forecast-card {
    background: #242424;
    color: #e0e0e0;
    padding: 15px;
    border-radius: 6px;
    width: 140px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    border: 1px solid #333;
}

.forecast-card img {
    width: 60px;
    height: 60px;
}

/* === MOBILE LAYOUT === */
@media (max-width: 768px) {

    #layout-container {
        flex-direction: column;
        gap: 20px;
    }

    #left-column {
        width: 100%;
    }

    /* show mobile toggle button */
    #history-toggle {
        display: block;
        margin-top: 15px;
        padding: 10px;
        background: #3a67d8;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        width: 100%;
    }

    /* hide history by default */
    #search-history {
        display: none;
    }

    /* active history */
    #search-history.active {
        display: block;
    }
}

#clear-history {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: #8b0000; /* dark red */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#clear-history:hover {
    background: #b30000;
}
