/* BODY */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 20px;

    /* Taustakuva */
    background-image: url('/static/images/yökuva.jpg');
    background-size: cover;           /* täyttää koko ruudun */
    background-position: center;      /* keskitetään */
    background-repeat: no-repeat;     /* ei monistu */
    background-attachment: fixed;     /* pysyy paikallaan scrollatessa */
}

body.white-mode {
  background-image: url('/static/images/kuva1.jpg');
}
/* FORM WRAPPER */
.input-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;          /* väli inputin ja napin välillä */
    margin-top: 20px;
    flex-wrap: wrap;     /* pienemmillä näytöillä input ja nappi voivat mennä päällekkäin */
}
 
.input {
  border: 2px solid transparent;
  width: 200px;
  height: 40px;
  padding-left: 0.8em;
  outline: none;
  overflow: hidden;
  background-color: #f3f7fe;
  border-radius: 10px;
  transition: all 0.5s;

}

.input:hover,
.input:focus {
  border: 2px solid #4A9DEC;
  box-shadow: 0px 0px 0px 7px rgb(74, 157, 236, 20%);
  background-color: white;
  align-items: center;
}

/* BUTTON */
button {
  background-color: #f3f7fe;
  color: #8b8b8b;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  width: 100px;
  height: 45px;
  transition: 0.3s;
  margin-left: 10px;
  z-index: 10;
}

button:hover {
  background-color: #3b82f6;
  box-shadow: 0 0 0 5px #3b83f65f;
  color: #fff;
}

/* Kaupungin nimi */
h2 {
    font-size: 2em;
    font-weight: bold;
    color: #000000;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    font-family: 'Arial', sans-serif;
}

/* Sää- ja tuulitekstit */
p {
    font-size: 1.2em;
    margin: 8px 0;
    color: #111827;
    font-family: 'Arial', sans-serif;
}
/* Theme Switch */
/* The switch - the box around the slider */
.switch {
  font-size: 17px;
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-block;
  width: 4em;
  height: 2.2em;
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2a2a2a;
  transition: 0.4s;
  border-radius: 30px;
  overflow: hidden;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.2em;
  width: 1.2em;
  border-radius: 20px;
  left: 0.5em;
  bottom: 0.5em;
  transition: 0.4s;
  transition-timing-function: cubic-bezier(0.81, -0.04, 0.38, 1.5);
  box-shadow: inset 8px -4px 0px 0px #fff;
}

.switch input:checked + .slider {
  background-color: #00a6ff;
}

.switch input:checked + .slider:before {
  transform: translateX(1.8em);
  box-shadow: inset 15px -4px 0px 15px #ffcf48;
}

.star {
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  width: 5px;
  transition: all 0.4s;
  height: 5px;
}

.star_1 {
  left: 2.5em;
  top: 0.5em;
}

.star_2 {
  left: 2.2em;
  top: 1.2em;
}

.star_3 {
  left: 3em;
  top: 0.9em;
}

.switch input:checked ~ .slider .star {
  opacity: 0;
}

.cloud {
  width: 3.5em;
  position: absolute;
  bottom: -1.4em;
  left: -1.1em;
  opacity: 0;
  transition: all 0.4s;
}

.switch input:checked ~ .slider .cloud {
  opacity: 1;
}

.cardContainer {
  width: fit-content;
  position: fixed;
  top: 290px;              /* kiinteä etäisyys ylhäältä */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  position: relative;
  width: 220px;
  height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 10px;
  border-radius: 10px;
  backdrop-filter: blur(30px);
  background-color: rgba(65, 65, 65, 0.308);
  border: 1px solid rgba(255, 255, 255, 0.089);
  cursor: pointer;
}

.city {
  font-weight: 700;
  font-size: 1.4em;
  letter-spacing: 1.2px;
  color: white;
}

.weather {
  font-weight: 500;
  font-size: 0.9em;
  letter-spacing: 1.2px;
  color: rgb(255, 255, 255);
}

.temp {
  font-weight: 700;
  font-size: 1.9em;
  letter-spacing: 1.2px;
  color: white;
}

.minmaxContainer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.min,
.max {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0px 20px;
  gap: 4px;
}

.max {
  align-items: flex-start;
  border-left: 2px solid white;
}

.maxHeading,
.minHeading {
  font-size: 0.7em;
  font-weight: 600;
  color: white;
}

.maxTemp,
.minTemp {
  font-size: 0.6em;
  font-weight: 500;
  color: rgb(197, 197, 197);
}

.cardContainer::before {
  width: 100px;
  height: 100px;
  content: "";
  position: absolute;
  background-color: rgb(0, 255, 251);
  z-index: -1;
  border-radius: 50%;
  left: 100px;
  top: 50px;
  transition: all 1s;
}

.cardContainer:hover::before {
  transform: translate(-50px, 50px);
}

.content {
  position: fixed;
  top: 240px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  padding: 10px 20px;
  border-radius: 10px;
  backdrop-filter: blur(30px);
  background-color: rgba(65, 65, 65, 0.308);
  border: 1px solid rgba(255, 255, 255, 0.089);

  display: flex;          
  justify-content: center;
  align-items: center;     
  text-align: center;   
}
.glass {
  position: fixed;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3,7px);
  border: 2px solid rgba(255, 255, 255, 0.17);
  height: 700px;
  width: 50%;
  right: 25%;
  top: -50px;
  z-index: -1;
}
