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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    --base-color: #430d56;
    --background-color: #585858;
    --base-color-tr: oklch(from var(--base-color) calc(l *0.8) c h/0.6);
    --surface-color: oklch(from var(--base-color) calc(l * 1.2) c h);
    --background-tr:  oklch(from var(--text-color) l c h /0.1);
    --brand-color: oklch(from var(--base-color) calc(l * 3) calc(c * 2) h);
    --brand-color-dark: oklch(from var(--base-color) calc(l * 1.5) calc(c * 2.5) h/0.8);
    --weather-box-color: oklch(from var(--base-color) calc(l * 2.5) calc(c *0.9) h/0.4);
    --text-shadow: rgba(54, 54, 54, 0.593);
    --text-color: #f0f0f0;
    --box-background: oklch(from var(--text-color) l c h /0.4);
     --secondary-text-color: oklch(from var(--text-color) l c h /0.6);
     --complementary-color: oklch(from var(--brand-color) calc(l*1.2) c calc(h - 180));
     --complementary-color-shadow: oklch(from var(--brand-color) calc(l*1.2) c calc(h - 180)/0.4);
     --complementary-color-light: oklch(from var(--complementary-color) calc(l * 5) calc(c * 0.7) calc(h + 5));
     --shadows: rgba(0, 0, 0, 0.6);
     --shadows-night: rgba(255, 255, 255, 0.6);         
    color: var(--text-color);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.875rem;  /*14px */
    max-width: 768px;
    min-height: 100vh;
    margin: auto;
    padding: 0rem;
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/cloudy.webp);
    background-blend-mode: hard-light;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;   
}

body.sunny {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
     url(img/sunny.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top left; 
    background-blend-mode: multiply; 
}

body.cloudy {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/cloudy.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
    background-blend-mode: hard-light; 
}

body.overcast,
body.overcast-night {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/overcast.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-blend-mode: hard-light;    
}

body.rainy,
body.rainy-night {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/rain.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-blend-mode: hard-light; 
}

body.fog {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/fog.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center; 
    background-blend-mode: darken; 
}

body.storm {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/storm1.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
        background-blend-mode: hard-light;
}

body.snow,
body.snow-night {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/snow.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-blend-mode: screen;
}


body.clear-night {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/clear-night.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
    background-blend-mode: hard-light;
}

body.storm-night {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/storm-night.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
    background-blend-mode: hue;
}

body.cloudy-night {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/cloudy-night.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
    background-blend-mode: hard-light;
}

body.fog-night {
    background: linear-gradient(var(--base-color-tr), var(--base-color-tr)),
        url(img/fog-night.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center; 
    background-blend-mode: hue;
}

body.clear-night h2,
body.storm-night h2,
body.cloudy-night h2,
body.fog-night h2 {
    text-shadow: 0px 0px 5px var(--shadows);
}

header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.171);
    padding: 2.5rem 1rem;
}

.current-time {
    font-size: clamp(1.2rem, 2.2vw, 1.625rem);
    line-height: 1.2;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    color: var(--text-color);
    margin-right: 1rem;
}

.color-label {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 180px;
    padding: 0rem 2rem;
    margin-left: 1rem;
    color: var(--text-color);
    cursor: pointer;
    font-size: clamp(1rem, 1.1vw, 1.625rem);
    line-height: 1.2;
    transition: all 0.4s ease-out;
}

.watch-color-label {
    display: none;
}

.color-label svg:hover {
    filter: brightness(1.5);
    font-weight: 800;
    transform: scale(1.1);
    color: var(--complementary-color);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

input[type="color"] {
    all: unset;
    width: 2rem;
    height: 2rem;
    background-color: transparent;
    border: 0;
    border-radius: 100%;
    overflow: hidden;
    cursor: pointer;
}

input[type="color" i] {
    width: 2.5rem;
    height: 2.5rem;
    background-color: transparent;
    cursor: default;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(169, 169, 169);
    border-image: initial;
    padding: 1px 2px;
}

#primary_color,
#primary_color_watch{
    position: absolute;
    right: 0;
    top: 2rem;
    border-radius: 50%;
    height: 2.5rem;
    width: 2.5rem;
    border: none;
    outline: none;
    margin: 0 0 0 0.5rem;
    visibility: hidden;
}

.color-picker {
    all: unset;
    outline: none;
    padding: 0;
    margin: 0 0.5rem;
    appearance: none;
    -webkit-appearance: none;
    padding-inline: 0px;
    overflow: hidden;
    cursor: pointer;
}

 .icon {
    height: clamp(1.7rem, 3vw, 3rem);
    width: auto;
    color: var(--text-color);
    filter: none;
    cursor: pointer;
}

.reset {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    filter:none;
    opacity: 0.8;
    padding-left: 0.5rem;
}

.reset i {
    width: 30px;
    height: auto;
    font-size: clamp(1.7rem, 3vw, 3rem);
    cursor: pointer;
}

.reset:hover {
    filter: brightness(1.5);
    font-weight: 800;
    transform: scale(1.1);
    opacity: 1;
    color: var(--complementary-color);
}

main {
    min-height: 60vh;
    margin: 0;
    padding: 2rem 1rem 0rem;
    border-radius: 0.5rem;
}

h1 {
    color: var(--text-color);
    font-size: clamp(1.2rem, 2.2vw, 1.625rem);
    line-height: 1.2;
    text-align: center;
    text-shadow: 0x 0px 4px var(--base-color);
}

h2 {
    color: var(--brand-color);
    text-align: center;
    font-size: 1.5rem;
    text-transform: uppercase;
    text-shadow: 1px 1px 5px var(--text-shadow);
}

a {
    color: var(--complementary-color);
    transition: all 0.4s ease-out;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--complementary-color-light);
}

.scroll-left,
.scroll-right {
    padding: 0.5rem;
    font-size: 26px;
    background-color: transparent;
    text-shadow: 0px 0px 10px var(--base-color);
    border: none;
    color: var(--complementary-color);
    }

.current-weather {
    padding-top: 1rem;
}

.current-weather,
.git-hub-widget {
    position: relative;
    margin-top: 1rem;
    min-height: 40vh;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    font-size: 14px; 
    background-color: var(--weather-box-color);
    border: 1px solid var(--weather-box-color);
    backdrop-filter: 
        blur(5px)
        drop-shadow(4px 4px 10px var(--base-color-tr));
    filter: drop-shadow(4px 4px 10px var(--background));
    border-radius: 0.5rem;
}

.current-weather img.main-icon {
    height: 9rem;
    width: auto;
    filter: 
    saturate(1.1) 
    contrast(1.1)
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.258));
}

.current-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex:  2;
}

.weather-details {
    width: calc(100% - 1rem);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    position: relative;
    bottom: 0rem;
    background-color: #0000001c;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin: 0.3rem 0.5rem;
}

.weather-details p {
    display: inline-flex;
    padding: 0.2rem 0.3rem;
    margin: 0rem 0.5rem;
    border-radius: 0.5rem;
    line-height: 1.4;
    align-items: center;
}

.weather-details p.uv-index {
    margin-left: 0.35rem;
}

.weather-details p i,
.weather-icon2,
.weather-icon img {
    font-size: clamp(18px, 2.5vw, 24px);
    height: clamp(21px, 2.9vw, 28px); /* 28/24 ≈ 1.166 */
    margin: 0 0.5rem;
    color: var(--text-color);
}

.weather-details p.sunset,
.weather-details p.sunrise {
    padding: 0.2rem 0.3rem 0.2rem 0rem;
}

.current-temp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 18rem;
    height: 100%;
    background-color: transparent;
    padding: 1rem 0.5rem;
    font-size: 40px;
    text-align: center;
}

 .current-temp .weather-icon {
    width: 100%;
    height: auto;
    font-size: clamp(3.5rem, 10vw, 6.5rem);
    height: clamp(3rem, 30vw, 7rem);
 }

 .weather-icon {
    position: relative;
 }

 .weather-value {
    margin-top: 1rem;
    text-shadow: 0 0 4px var(--base-color-tr);
    position: relative;
 }

.forecast-5-day-wrapper,
.forecast-24h-wrapper {
    margin-top: 2rem;
    position: relative;
}

.forecast-5-day,
.forecast-24h {
    position: relative;
    overflow-x: auto;
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;
    margin-top: 1rem;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    background-color: var(--weather-box-color);
    border: 1px solid var(--weather-box-color);
    backdrop-filter: 
        blur(5px) 
        drop-shadow(4px 4px 10px var(--base-color-tr));
    filter: drop-shadow(4px 4px 10px var(--base-color));
    border-radius: 0.5rem;   
    gap: 0.5rem;
    padding: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.forecast-5-day {
    min-height: 8vh;
}

.forecast-item {
    width: auto;
    max-height: 110px;
    flex: 1 1 calc(100% / 5 - 1rem);
    min-width: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--box-background);
    backdrop-filter: 
        blur(5px)
        drop-shadow(4px 4px 10px var(--base-color-tr));
    filter: drop-shadow(3px 3px 5px var(--base-color));
    font-size: 14px;
    transition:  filter 0.6s ease-out;    
}

.forecast-item:hover {
    filter: brightness(1.02) saturate(1.1);
}

.forecast-24h {
    min-height: 12vh;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    justify-content: flex-start;
    scroll-padding-left: 0.5rem;

}

.forecast-5-day::-webkit-scrollbar ,
.forecast-24h::-webkit-scrollbar {
    display: none;
}

.scroll-left i,
.scroll-right i {
    display: inline-block;
    transition: transform 0.2s ease-out, filter 0.3s ease;
    will-change: transform;
    vertical-align: middle;
    line-height: 1;
}

.scroll-left:hover i,
.scroll-right:hover i {
    transform: scale(1.2);
}

.scroll-left {
    position: absolute;
    top: calc(50% + 1.1rem);
    left: 0rem;
    transform: translateY(-50%);
    z-index: 900;
}

.scroll-right {
    position: absolute;
    top: calc(50% + 1.2rem);
    right: 0rem;
    transform: translateY(-50%);
    z-index: 900;

}

.forecast-hour {
    width: auto;
    height: fit-content;
    flex: 1 1 calc(100% / 12 - 1rem);
    min-width: 60px;
    max-width: 70px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 0.3rem;
    border-radius: 0.5rem;
    background-color: var(--box-background);
    backdrop-filter: 
        blur(5px)
        drop-shadow(4px 4px 10px var(--base-color-tr));
    filter: drop-shadow(3px 3px 5px var(--base-color));
    font-size: 14px; 
    transition: filter 0.6s ease-out;
    scroll-snap-align: start;
}

.forecast-hour:hover {
    filter: brightness(1.2) saturate(1.1);
}

.forecast-icon {
    margin: auto;
}

.forecast-icon,
.hour-icon,
.forecast-hour img {
    font-size: 26px;
    width: auto;
    height: 38px;
    filter: 
        drop-shadow(0 0 2px rgba(0, 0, 0, 0.2));
    transition: all 0.6s ease-out;
}

.forecast-icon img {
    height: 38px;
    width: auto;
}

.forecast-icon:hover,
.hour-icon:hover {
    transform: scale(1.07);
    filter: 
    brightness(1.02) 
    saturate(1.1)
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.458));
}

.forecast-item p,
.forecast-hour p {
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5) ;
}

hr.basic {
    margin: 1.5rem 0rem;
    border: none;
}

.git-hub-widget {
    border: none;
    min-height: 30vh;
    background: none;
    backdrop-filter: none;
    gap: 1.5rem;
    padding: 1.5rem;
}

.git-hub-widget h2 {
        color: var(--text-color);
        text-align: left;
        margin: 1rem;
    }

.game {
    border-radius: 0.5rem;
    padding: 1rem 1rem 0rem 1rem;
    /* background-color: var(--box-background); */
    /* backdrop-filter: blur(5px) drop-shadow(4px 4px 10px var(--base-color-tr)); */
    filter: drop-shadow(3px 3px 5px var(--base-color));
}

.game-img {
    background: url(img/rabbitb.webp);
    background-size: contain;
    background-position: bottom center;
    width: 100%;
    min-width: 14rem;
    height: 14rem;
    border-radius: 0.5rem; 
    animation: none;
    -webkit-box-reflect: below -4rem
    linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 40%);
    /* animation-play-state: paused !important; */
    transition: all 0.6s ease-out;
          
}

.game-img:hover {
    background: url(img/rabbitb.webp);
    background-size: contain;
    background-position: center center;
    transform:scale(1.02) ;
    /* filter: brightness(1.1); */
    animation: animate 0.5s ease-out infinite alternate;
    animation-play-state: running !important;
    -webkit-box-reflect: below -4rem
    linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 40%);
}

.game-description {
    margin-top: -2rem;
}

.game-description p {
    margin: 1rem;
    font-size: 14px;
    line-height: 1.4;
}

.game-description p.contact {
    margin-bottom: 0;
}

hr.inside {
    border: 1px solid var(--complementary-color);
}

.social-media {
    padding: 0rem 0.5rem 0.5rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
}

.social-media a {
    padding: 0.5rem;
    font-size: 1rem;
}

.social-media i {
    margin-right: 0.5rem;
    transition: all 0.6s ease-out;
}

.social-media a:hover i {
    transform: scale(1.1);
}

footer {
    background-color: rgba(0, 0, 0, 0.171);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 1rem;
}

footer .source {
    display: flex;
    text-align: left;
    padding-left: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media screen and (min-width: 768px) {
    
    body {
        max-width: 950px;
    }

    header {
        padding: 2rem 1rem 0.5rem;
    }
    
    .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin: 0 auto;
    }

    .current-weather-wrapper {
        height: calc(100% - 2.5rem);
    }

    .current-weather,
    .git-hub-widget {
        height:  100%;
        margin-top: 0.5rem;
    }

    .current-box {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex: 1;
    }

    /* .weather-details {
        display: flex;
        flex: 1;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-content: flex-start;
    } */

    .forecast-5-day-wrapper {
        margin-top: 0rem;
    }

    .forecast-5-day, 
    .forecast-24h {

        flex-wrap: wrap;
        flex-wrap: balance;
        justify-content: space-evenly;
        margin-top: 0.5rem;
    }
    
    .forecast-5-day {
        margin-top: 1rem;
    }

    .forecast-item {
        padding: 0.3rem 0.3rem;
    }

    .scroll-left,
    .scroll-right {
        display: none;
    }

    .forecast-hour {
        padding: 0.3rem 0.3rem;
    }

    section.git-hub-widget {
        display: grid;
        align-items: center;
        /* gap: 1.5rem; */
        grid-template-columns: 1fr 2fr;
        grid-template-rows: 1fr;
        gap: 1.5rem;
        margin-top: 0rem;
        padding:  2rem;
    }

    /* .git-hub-widget h2 {
        color: #cc0000;
    } */

    .game {
            padding: 1rem 1rem 1rem 1rem,
    }

    .game img {
        border-radius: 0.5rem;
        width: 100%;
    }

    .game-description {
       margin-top: 0rem; 
    }

    .game-description p {
        margin: 1rem;
        font-size: 14px;
        line-height: 1.4;
    }
}

@media screen and (max-width: 434px) {
    .scroll-left,
    .scroll-right {
        display: none;
    }
    
}


@media screen and (max-width: 368px) {
    .weather-details {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
    }
    
}

/**WATCH*/
@media screen and (max-width: 400px) and (max-height: 500px) {
    header {
        display: none;
    }

    main {
        padding: 0.5rem;
    }

    .watch-color-label {
        display: flex;
        position: absolute;
        top: 2rem;
        right: 2rem;
        z-index: 900;
        opacity: 0.4;
    }

   .watch-color-label:hovrt,
      .watch-color-label:active {
        opacity: 1;
      }

    .icon {
        height: 5rem;
        width: auto;
        filter: drop-shadow(2px 4px 4px var(--shadows));
        backdrop-filter: drop-shadow(2px 4px 6px black);
        border-radius: 50%;
    }

    .watch-color-label .reset {
        display: none;
    }

    .reset i {
        height: 5rem;
        font-size: 5rem;
        width: auto;
        filter: drop-shadow(2px 4px 6px var(--shadows));
    }

    .container {
        padding: 0rem 1rem;
    }

    h2 {
        display: none;
    }

    .current-temp {
        font-size: 4rem;
    }

    .weather-details p {
            padding: 0.2rem 0.3rem 2.2rem 0rem;
            font-size: 1rem;
    }

    .forecast-5-day-wrapper, .forecast-24h-wrapper {
        margin-top: 1rem;
    }

    .forecast-item p {
        font-size: 1rem;
    }

    footer {
        display: none;
    }
    
}

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .current-temp .weather-icon {
        animation: pulse 4.5s ease-in-out infinite;
    }
}

@keyframes pulse {
  0% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
  }
  70% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
  }
  100% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
  }
}


@keyframes animate {
    0% {
        background-image: url(img/rabbitb.webp);
    }
    50% {
        background-image: url(img/rabbit1.webp);
        /* rotate: 7deg; */
    }

}