* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #0A1828 0%, #178582 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

header {
    background: #0A1828;
    color: #BFA181;
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 25px 0;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    border: 1px solid rgba(191, 161, 129, 0.3);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 1px;
}

main {
    width: 100%;
    max-width: 800px;
    background: #fff;
    color: #0A1828;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    border: 1px solid rgba(191, 161, 129, 0.3);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #178582;
    font-weight: 600;
}

.search-section {
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    gap: 15px;
}

.search-bar input {
    flex: 1;
    padding: 15px;
    border: 2px solid #BFA181;
    border-radius: 12px;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.05);
    color: #0A1828;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #178582;
    box-shadow: 0 0 0 3px rgba(23, 133, 130, 0.3);
}

.search-bar button {
    padding: 15px 30px;
    background: #178582;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-bar button:hover {
    background: #145E5B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 133, 130, 0.4);
}

.results-section {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.results-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.results-container {
    display: grid;
    gap: 15px;
    padding: 15px;
    background: #F9F9F9;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.results-container button {
    padding: 10px;
    background: linear-gradient(135deg, #178582, #0A1828);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.results-container button:hover {
    background: linear-gradient(135deg, #145E5B, #0A1828);
}

.history-section {
    margin-top: 30px;
}

.history-container {
    background: #F9F9F9;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#toggleHistoryButton {
    margin-left: 15px;
    padding: 8px 16px;
    background: #BFA181;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#toggleHistoryButton:hover {
    background: #9F8A6E;
    transform: translateY(-2px);
}

#history {
    margin-top: 15px;
    list-style: none;
}

#history li {
    padding: 12px 15px;
    background: #fff;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: #0A1828;
    cursor: pointer;
}

#history li:hover {
    background: rgba(23, 133, 130, 0.1);
    transform: translateX(5px);
}

footer {
    margin-top: 30px;
    text-align: center;
    color: #BFA181;
    font-size: 1rem;
}

.hidden {
    display: none;
}

#pagination {
    margin-top: 10px;
    text-align: center;
}

.pagination-button {
    margin: 0 5px;
    padding: 5px 10px;
    background-color: #178582;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.pagination-button.active {
    background-color: #0A1828;
    color: #BFA181;
    font-weight: bold;
}

.pagination-button:hover {
    background-color: #145E5B;
}

#backButton {
    padding: 12px 25px;
    border: none;
    background: #178582;
    color: #fff;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 20px;
    display: block;
    width: 100%;
    text-align: center;
    transition: background 0.3s ease;
}

#backButton:hover {
    background: #145E5B;
}

#map {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.weather-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.weather-icon img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}
.weather-details {
    flex: 1;
    padding-left: 15px;
}

.weather-details p {
    font-size: 1.1rem;
    margin: 5px 0;
    color: #333;
}

.weather-details .temperature {
    font-size: 1.3rem;
    font-weight: bold;
    color: #BFA181;
}

.weather-details .description {
    font-style: italic;
    color: #777;
}

.result-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 500px;
    margin: 20px auto;
    transition: transform 0.3s ease;
}
.result-card:hover {
    transform: translateY(-5px);
}
.result-title {
    font-size: 2rem;
    font-weight: 600;
    color: #178582;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-container > * {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar button {
        width: 100%;
        justify-content: center;
    }
    .result-card {
        padding: 15px;
    }
    .weather-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .weather-details {
        padding-left: 0;
    }

    .weather-icon img {
        width: 80px;
        height: 80px;
    }
}
