* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e5799, #207cca);
    color: #fff;
    min-height: 100vh;
    padding: 15px;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand {
    display: flex;
    align-items: center;
}

.brand i {
    font-size: 2rem;
    color: #1a3c6c;
    margin-right: 12px;
}

.brand-text h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    color: #1a3c6c;
    font-weight: 700;
    line-height: 1.2;
}

.brand-text p {
    font-size: 0.95rem;
    color: #4a6b9b;
}

.location-selector {
    display: flex;
    align-items: center;
    background: #eef4fd;
    border-radius: 50px;
    padding: 8px 15px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.location-selector i {
    font-size: 1.2rem;
    color: #4a90e2;
    margin-right: 8px;
}

#city-select {
    background: transparent;
    border: none;
    font-size: 1rem;
    color: #1a3c6c;
    font-weight: 500;
    padding: 5px 0;
    cursor: pointer;
    outline: none;
}

.weather-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.current-weather {
    display: flex;
    flex-wrap: wrap;
    padding: 25px;
    background: linear-gradient(to right, #4a90e2, #5fa3f0);
    color: white;
}

.main-info {
    flex: 1;
    min-width: 300px;
    padding: 15px;
}

.location-display {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.location-display i {
    font-size: 1.5rem;
    color: #ffdd40;
    margin-right: 10px;
}

.location-display h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

.date {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.weather-icon-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.weather-icon {
    width: 90px;
    height: 90px;
    margin-right: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.temperature {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
}

.description {
    font-size: 1.4rem;
    margin-top: 5px;
    text-transform: capitalize;
}

.tomorrow-btn {
    background: linear-gradient(to right, #ff9a3d, #ff6b6b);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.tomorrow-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.tomorrow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.5);
}

.tomorrow-btn:hover i {
    transform: translateX(4px);
}

.details {
    flex: 1;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 15px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    backdrop-filter: blur(5px);
    box-shadow: 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-3px);
}

.detail-card i {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #ffdd40;
}

.detail-label {
    font-size: 0.95rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.detail-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.forecast-section {
    padding: 20px;
}

.section-title {
    font-size: 1.5rem;
    color: #1a3c6c;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4e9f1;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: #4a90e2;
    font-size: 1.4rem;
}

.hourly-forecast {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 5px;
    margin-bottom: 25px;
}

.hour-card {
    flex: 0 0 auto;
    width: 100px;
    background: #f8fafd;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.hour-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.hour-time {
    font-size: 1rem;
    font-weight: 500;
    color: #4a6b9b;
    margin-bottom: 10px;
}

.hour-icon {
    width: 45px;
    height: 45px;
    margin: 0 auto 10px;
}

.hour-temp {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a3c6c;
}

.daily-forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.day-card {
    background: #f8fafd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.day-header {
    background: #4a90e2;
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
}

.day-content {
    padding: 12px;
    text-align: center;
}

.day-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
}

.day-temp {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a3c6c;
    margin-bottom: 5px;
}

.day-desc {
    font-size: 0.9rem;
    color: #5a7aa9;
    margin-bottom: 8px;
}

.day-details {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
    color: #6b85b0;
}

.day-details span {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.day-details i {
    margin-bottom: 3px;
    color: #4a90e2;
    font-size: 0.9rem;
}

footer {
    text-align: center;
    padding: 15px;
    color: white;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modal Rediseñado */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(180deg, #6b77a6, #000775);
    /*-- background: linear-gradient(135deg, #2a5a8a, #3a7aba); ---*/
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: modalOpen 0.4s ease;
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 10px;
}

.modal-header p {
    font-size: 1.1rem;
    color: #a8d0ff;
}

.modal-weather {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.modal-icon {
    width: 120px;
    height: 120px;
    margin: 15px 0;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

.modal-temperature {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin: 10px 0;
}

.modal-description {
    font-size: 1.6rem;
    color: #ffdd40;
    text-transform: capitalize;
    margin-bottom: 20px;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.modal-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.modal-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.modal-card i {
    font-size: 2.2rem;
    color: #ffdd40;
    margin-bottom: 12px;
}

.modal-card-label {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #a8d0ff;
}

.modal-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
}

.modal-range {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 10px;
}

.temp-range {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.range-label {
    font-size: 1rem;
    color: #a8d0ff;
    margin-bottom: 8px;
}

.range-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .brand {
        justify-content: center;
        margin-bottom: 10px;
    }

    .current-weather {
        flex-direction: column;
        padding: 20px;
    }

    .main-info,
    .details {
        min-width: 100%;
        padding: 10px;
    }

    .details {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .temperature {
        font-size: 2.8rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .daily-forecast {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .modal-content {
        padding: 20px 15px;
    }

    .modal-temperature {
        font-size: 3rem;
    }

    .modal-details {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar styling */
.hourly-forecast::-webkit-scrollbar {
    height: 6px;
}

.hourly-forecast::-webkit-scrollbar-track {
    background: #e4e9f1;
    border-radius: 10px;
}

.hourly-forecast::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 10px;
}


.search-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 10px;
    justify-content: center;
}

.search-bar input {
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    background: #eef4fd;
    border-radius: 50px;
    padding: 8px 15px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);



}

.search-bar button {
    padding: 6px 12px;
    font-size: 0.95rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: linear-gradient(to right, #ff9a3d, #ff6b6b);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 6px 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);

}
