:root {
    --black-pine: #152026;
    --deep-ocean: #1B3D59;
    --windstorm: #6A97C0;
    --melting-ice: #B3D5F1;
    --avalanche: #D4EEF8;
    --sun-beam: #F3EED8;
}

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

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: white;

    background: linear-gradient(135deg,
            var(--black-pine),
            var(--deep-ocean));

    padding: 30px;
}

.navbar {
    max-width: 1400px;
    margin: 0 auto 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.logo {
    font-size: 32px;
    font-weight: bold;
}

.search-container {
    display: flex;
    gap: 10px;
}

.search-container input {
    width: 300px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    outline: none;
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-container button {
    padding: 12px 20px;
    border: none;
    border-radius: 30px;
    background: var(--sun-beam);
    color: var(--black-pine);
    font-weight: bold;
    cursor: pointer;
}

.location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

main {
    max-width: 1400px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* CURRENT WEATHER */

.current-weather {
    min-height: 500px;

    padding: 60px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 60px;

    border-radius: 32px;

    background:
        radial-gradient(circle at 80% 20%,
            rgba(243, 238, 216, 0.12),
            transparent 35%),
        linear-gradient(135deg,
            rgba(27, 61, 89, 0.9),
            rgba(21, 32, 38, 0.95));

    border: 1px solid rgba(255, 255, 255, 0.1);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4);

    overflow: hidden;
}

.weather-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#weatherCondition {
    color: var(--sun-beam);
    font-size: 24px;
    font-weight: 500;
}

#temperature {
    font-size: 150px;
    line-height: 0.9;
    font-weight: 600;
    letter-spacing: -8px;
}

.weather-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.weather-details span {
    padding: 12px 20px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--avalanche);
}

.weather-visual {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 40px;
}

.weather-icon {
    font-size: 180px;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
}

.extra-details {
    display: flex;
    gap: 20px;
}

.detail-card {
    min-width: 160px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
}

.detail-card span {
    color: rgba(255, 255, 255, 0.6);

    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-card strong {
    font-size: 32px;
}

.detail-card small {
    color: rgba(255, 255, 255, 0.5);
}

/* HOURLY FORECAST */

.hourly-forecast h2,
.weekly-forecast h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.hourly-container {
    display: flex;
    gap: 16px;

    overflow-x: auto;

    padding-bottom: 10px;
}

.hourly-container::-webkit-scrollbar {
    display: none;
}

.hourly-card {
    min-width: 120px;

    padding: 24px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.1);

    backdrop-filter: blur(15px);
}

.hourly-card.current {
    background: rgba(255, 255, 255, 0.1);

    border-color: rgba(243, 238, 216, 0.3);
}

.hourly-time {
    color: rgba(255, 255, 255, 0.55);

    font-size: 14px;
}

.hourly-card.current .hourly-time {
    color: var(--sun-beam);
}

.hourly-icon {
    font-size: 36px;
}

.hourly-temperature {
    font-size: 22px;
    font-weight: bold;
}

/* WEEKLY FORECAST */

.weekly-forecast {
    width: 100%;
}

#weeklyContainer {
    display: flex;
    flex-direction: column;
    gap: 2px;

    padding: 10px 24px;

    border-radius: 28px;

    background: rgba(255, 255, 255, 0.05);

    border: 1px solid rgba(255, 255, 255, 0.1);

    backdrop-filter: blur(15px);
}

.weekly-card {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;

    align-items: center;

    padding: 20px 10px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.weekly-card:last-child {
    border-bottom: none;
}

.weekly-day {
    font-size: 18px;
    font-weight: 500;
}

.weekly-condition {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;
}

.weekly-icon {
    font-size: 28px;
}

.weekly-rain {
    color: var(--melting-ice);

    font-size: 13px;
}

.weekly-temperature {
    text-align: right;
}

.weekly-high {
    font-size: 18px;
    font-weight: bold;

    margin-right: 10px;
}

.weekly-low {
    color: rgba(255, 255, 255, 0.45);
}

#statusMessage {
    margin-top: 10px;
    margin-bottom: 10px;

    color: var(--sun-beam);

    font-size: 14px;
    min-height: 20px;
}

.weekly-card {
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}

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

.weekly-card.today {
    transform: translateY(-3px);
    border-color: rgba(243, 238, 216, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.weekly-card.today .weekly-day {
    color: var(--sun-beam);
}

#statusMessage {
    min-height: 20px;
    margin-top: 10px;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

#statusMessage.loading {
    opacity: 0.7;
    animation: loadingPulse 1.2s ease-in-out infinite;
}

#statusMessage.error {
    opacity: 1;
    animation: none;
    color: var(--sun-beam);
}

/* ==========================================
   FINAL CARD POLISH
   ========================================== */

.detail-card,
.weekly-card,
.hourly-card {
    backdrop-filter: blur(10px);
}

.detail-card {
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}


/* ==========================================
   WEATHER ICON
   ========================================== */

#weatherIcon {
    display: inline-block;
    transition: transform 0.3s ease;
}

#weatherIcon:hover {
    transform: scale(1.08);
}


/* ==========================================
   SEARCH BUTTON
   ========================================== */

#searchButton {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#searchButton:hover {
    transform: translateY(-2px);
}

#searchButton:active {
    transform: translateY(0);
}


/* ==========================================
   INPUT
   ========================================== */

#cityInput {
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

#cityInput:focus {
    outline: none;
    border-color: var(--windstorm);
    box-shadow: 0 0 0 3px rgba(106, 151, 192, 0.18);
}

@keyframes loadingPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    main {
        padding: 0 20px;
    }

    .current-weather {
        padding: 40px;
        flex-direction: column;
        align-items: flex-start;
    }

    .weather-visual {
        width: 100%;
        align-items: flex-start;
    }

    .weather-icon {
        font-size: 120px;
    }

    #temperature {
        font-size: 100px;
    }

    .extra-details {
        width: 100%;
        flex-wrap: wrap;
    }

    .detail-card {
        flex: 1;
        min-width: 130px;
    }
}

@media (max-width: 600px) {
    main {
        padding: 0 14px;
    }

    .current-weather {
        padding: 28px 22px;
        border-radius: 24px;
    }

    #temperature {
        font-size: 76px;
        letter-spacing: -4px;
    }

    #weatherCondition {
        font-size: 20px;
    }

    .weather-icon {
        font-size: 90px;
    }

    .extra-details {
        gap: 10px;
    }

    .detail-card {
        min-width: 110px;
        padding: 18px;
    }

    .detail-card strong {
        font-size: 24px;
    }

    .hourly-card {
        min-width: 105px;
        padding: 20px 16px;
    }

    #weeklyContainer {
        padding: 8px 16px;
    }

    .weekly-card {
        grid-template-columns: 1fr 1fr 1fr;
        padding: 18px 4px;
    }
}