body {
    background-color: rgba(253, 246, 229);
    font-family: "DynaPuff", system-ui;
    padding: 30px;
    position: relative;
}

body.change-theme {
    background-color: black;
    color: rgba(253, 246, 229);
}

body.change-theme .second-box,
body.change-theme .third-box,
body.change-theme .fourth-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

body.change-theme .second-box .weather-grid {
    backdrop-filter: none !important;
}

body.change-theme .second-box .weather-grid > div {
    background: transparent !important;
    backdrop-filter: none !important;
}

body.change-theme .temp-detail,
body.change-theme .humidity,
body.change-theme .wind,
body.change-theme .pressure,
body.change-theme .card,
body.change-theme .daily-card {
    border-color: rgba(253, 246, 229, 0.2) !important;
}


.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle .theme-icon-sun,
.theme-toggle .theme-icon-moon {
    position: absolute;
    display: block;
    padding: 6px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}


.theme-toggle .theme-icon-sun {
    color: #b78e47;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .theme-icon-moon {
    color: #cdd6f4;
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
    pointer-events: none;
}

/* Dark mode: moon visible, sun hidden */
body.change-theme .theme-toggle .theme-icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
    pointer-events: none;
}

body.change-theme .theme-toggle .theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    pointer-events: none;
}


body,
.first-box,
.first-box .content,
.second-box,
.third-box,
.fourth-box,
.second-box .weather-grid > div,
.temp-detail,
.humidity,
.wind,
.pressure,
.card,
.daily-card {
    transition: background-color 0.4s ease,
                background 0.4s ease,
                border-color 0.4s ease,
                color 0.4s ease,
                box-shadow 0.4s ease;
}

* {
    box-sizing: border-box;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 30px;
    flex-shrink: 0;
}

header {
    margin-bottom: 50px;
}

.nav-links {
    margin-left: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.location {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-picture {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.first-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-image: url(./assets/scenery1.jpg);
    opacity: 0.9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    border-style: solid;
    border-width: 1px;
    border-color: black;
    min-height: 320px;
}

.temperature-detail {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.content {
    margin-left: 90px;
    margin-top: 140px;
    padding: 0px;
    display: grid;
    gap: 20px;
    background-color: white;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 20px;
    max-width: 100%;
}

.detail {
    display: inline-flex;
    flex-direction: column;
}

.highlight {
    border-radius: 10px;
}

.highlight1 {
    font-size: 20px;
}

.highlight2 {
    font-size: 40px;
}

.highlight3 {
    font-size: 55px;
}

.calendar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sun {
    color: #f2b575;
    font-size: 30px;
}

.four-boxes {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    grid-template-rows: 2fr 1fr;
    min-height: 100vh;
    gap: 20px;
}

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    justify-content: center;
    backdrop-filter: blur(1px);
}

.temp-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.temp-detail1 {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.humidity {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.humidity1 {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wind {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.wind1 {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pressure {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.pressure1 {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.second-box {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    border-radius: 20px;
    border-style: solid;
    border-width: 1px;
    border-color: black;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.cherry-blossom {
    position: absolute;
    top: -20px;
    left: -300px;
    width: 800px;
    height: 1000px;
    background-image: url(./assets/cherrytree.png);
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

.second-box>span,
.weather-grid {
    position: relative;
    z-index: 1;
}

.hourly-cards {
    display: flex;
    margin-top: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
}

.icon {
    width: 40px
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    padding: 23px;
    gap: 15px;
    font-size: 16px;
    flex: 0 0 auto;
}

.third-box {
    border: 1px solid black;
    padding: 15px;
    border-radius: 20px;
    min-width: 0;
}

.last-card {
    border: none;
}

.daily-cards {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin-top: 10px;
    gap: 12px;
}

.daily-card {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    gap: 70px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 12px;
}

.daily-card img {
    width: 45px;
    display: block;
    transform: translateY(8px);
}

.fourth-box {
    border: 1px solid black;
    padding: 15px;
    border-radius: 20px;
    min-width: 0;
}

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

.today {
    border: 2px solid #e4c999;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    position: relative;
}

.today::after {
    content: "";
    width: 6px;
    height: 6px;
    background-color: #b78e47;
    border-radius: 50%;
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
}

.today:hover {
    cursor: pointer;
}

.today:active {
    box-shadow: 0 2px 4px rgba(247, 232, 207, 0.5);
    transform: translateY(1px);
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

.lucide {
    width: 40px;
    display: flex;
    color: rgb(206, 162, 17);
}

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */

/* Large tablets / small laptops */
@media (max-width: 1100px) {
    .four-boxes {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        min-height: auto;
    }

    .content {
        margin-left: 40px;
        margin-top: 60px;
    }

    .first-box {
        min-height: 280px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    header {
        margin-bottom: 30px;
    }

    .nav-links {
        order: 3;
        flex-basis: 100%;
        margin-left: 0;
    }

    .nav-links ul {
        justify-content: flex-start;
        gap: 20px;
    }

    .location {
        gap: 6px;
    }

    .location span {
        font-size: 14px;
    }

    .content {
        margin-left: 20px;
        margin-top: 30px;
    }

    .highlight3 {
        font-size: 42px;
    }

    .highlight2 {
        font-size: 30px;
    }

    .weather-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .temp-detail,
    .wind {
        border-right: none;
    }

    .temp-detail,
    .humidity,
    .wind {
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    }

    .cherry-blossom {
        width: 500px;
        height: 620px;
        left: -220px;
        opacity: 0.5;
    }

    .card {
        padding: 16px;
        font-size: 14px;
    }
}

/* Phones */
@media (max-width: 480px) {
    body {
        padding: 14px;
    }

    .logo-group {
        font-size: 22px;
    }

    .logo-group svg {
        width: 32px;
        height: 32px;
    }

    header {
        gap: 10px;
    }

    .location span {
        display: none;
    }

   .lucide-navigation {
    display: none;
   }

    .location .profile-picture,
    .location .theme-toggle {
        display: flex;
    }

    .content {
        margin-left: 0;
        margin-top: 20px;
        padding: 16px;
    }

    .highlight3 {
        font-size: 34px;
    }

    .highlight2 {
        font-size: 24px;
    }

    .highlight1 {
        font-size: 16px;
    }

    .temperature-detail {
        gap: 12px;
    }

    .calendar span {
        font-size: 14px;
    }

    .cherry-blossom {
        display: none;
    }

    .weather-grid span {
        font-size: 14px;
    }

    .temp-detail1 span:nth-child(2),
    .humidity1 span:nth-child(2),
    .wind1 span:nth-child(2),
    .pressure1 span:nth-child(2) {
        font-size: 26px !important;
    }

    .third-box,
    .fourth-box {
        padding: 12px;
    }

    .daily-card {
        gap: 30px;
        max-width: 100%;
    }
}