:root {
  --background-color: #dad7cd;
  --cart-background-color: #adc7a988;
  --text-color2: #f0f8ff;
  --text-color1: black;
  --text-color3: #083a18;
  --text-color4: gray;
  --headr-bar-color: #3a5a45;
  --helper-color: #578164;
  --helper-color-1: #57816473;
  --nav-color: linear-gradient(
    to right,
    var(--helper-color),
    var(--headr-bar-color),
    var(--helper-color-1)
  );
}
.dark-mod {
  --background-color: #121212;
  --cart-background-color: #2b2e3188;
  --text-color1: #e0e7e0;
  --text-color2: #ffffff;
  --text-color3: #22ee63;
  --text-color4: rgb(221, 221, 221);
  --headr-bar-color: #0f1414;
  --helper-color: #000000;
  --helper-color-1: #242424;
  --nav-color: linear-gradient(
    to right,
    var(--helper-color),
    var(--headr-bar-color),
    var(--helper-color-1)
    );
  }
  * {
    padding: 0;
    margin: 0;
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  li {
    list-style: none;
  }
  
  #active {
    border-bottom: 2px solid white;
    border-width: fit-content;
  }
  .nav-bar {
    background-color: var(--headr-bar-color);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 90%;
    margin-left: 5%;
    margin-right: 5%;
    border-radius: 15px;
    margin-top: 15px;
    background-image: var(--nav-color);
    justify-content: space-between;
    gap: 8vw;
    padding: 0 2rem;
  }
  .logo {
    padding: 1.1rem;
    font-size: 32px;
    font-weight: bolder;
    color: var(--text-color2);
    justify-items: flex-start;
    flex: 1;
    text-align: canter;
  }
  .nav-list {
    color: var(--text-color2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-right: auto;
    justify-items: center;
  }
  .home {
    color: var(--text-color2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-right: auto;
    justify-items: center;
    margin-right: 16vw;
  }
  .list-item {
    padding: 2rem;
    font-size: large;
    font-weight: bold;
    display: inline-block;
    transition: all 0.5s ease;
  }
  
  .list-item:hover {
    transform: translateY(-4px);
    color: var(--text-color3);
  }
  .icons {
    display: flex;
    align-items: center;
    gap: 2vw;
    flex: 1;
    margin-right: 4vw;
  }
  .icons svg {
    fill: var(--text-color2) !important;
    transition: all 0.5s;
    display: flex;
    justify-content: flex-end;
    width: 24px;
    height: 24px;
  }
  .icons svg:hover {
    transition: 0.5s;
    transform: translateY(-4px);
    fill: var(--text-color3) !important;
  }
  .icons a {
    text-decoration: none;
    display: flex;
    justify-content: center;
  }
  #faq-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 0 10px;
    transition: 0.3s;
  }
  
  #faq-link:hover {
    color: var(--text-color3);
    opacity: 0.8;
  }
body {
  background-color: var(--background-color);
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text-color1);
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}
/* ── Them switch button ── */
#theme-switch {
  height: 50px;
  width: 50px;
  padding: 0;
  border: 50%;
  border-radius: 100px;
  background-color: var(--helper-color);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  top: 10px;
  right: 20px;
  flex-shrink: 0;
}
#theme-switch img {
  fill: var(--background-color);
}
#theme-switch img:last-child {
  display: none;
}
.dark-mod #theme-switch img:first-child {
  display: none;
}
.dark-mod #theme-switch img:last-child {
  display: block;
}
/* ── Flip container ── */
#flip-container {
  perspective: 1200px;
  width: clamp(300px, 80%, 380px);
  margin-top: 100px;
  margin-bottom: 60px;
}

#flip-inner {
  position: relative;
  width: 100%;
  min-height: 420px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

#flip-container.flipped #flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background-color: var(--cart-background-color);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 5px 9px var(--text-color1);
  text-align: center;
  box-sizing: border-box;
}

.flip-back {
  transform: rotateY(180deg);
}

/* keep container tall enough for the taller side (signup has 4 fields) */
#flip-container.flipped #flip-inner {
  transform: rotateY(180deg);
}

/* ── Typography ── */
#title {
  color: var(--text-color1);
  font-size: 28px;
  margin-bottom: 10px;
}

p {
  color: var(--text-color1);
  font-size: 16px;
  padding: 2px;
  margin: 2px;
}

/* ── Input groups ── */
#input-field {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
  border-radius: 20px;
  padding: 20px;
}

.field {
  padding: 10px;
  border-radius: 10px;
  background-color: #ffffff;
  border: 2px solid transparent;
  transition: 0.2s;
}

.field::placeholder {
  color: black;
  text-align: center;
  opacity: 0.5;
}

.field:focus {
  border-color: var(--text-color3);
  background-color: #fff;
  outline: none;
  color: var(--text-color3);
  transform: scale(1.02);
  transition: 0.2s;
}
.field:focus::placeholder {
  color: transparent;
}

/* ── Button ── */
#login-btn {
  background-color: var(--helper-color);
  color: var(--text-color2);
  border-radius: 10px;
  font-size: 16px;
  border: 2px solid var(--text-color3);
  box-shadow: 0 0 16px var(--text-color1);
  cursor: pointer;
  margin: 20px;
  padding: 10px;
  min-width: 100px;
  transition: 0.2s;
}

#login-btn:hover {
  background-color: var(--text-color3);
  color: var(--text-color2);
  transform: scale(1.1);
  transition: 0.2s;
}

/* ── Icons ── */
.iconss {
  color: var(--text-color1);
  text-decoration: none;
  font-size: 15px;
  transition: 0.2s;
}

.iconss:hover {
  scale: 1.2;
  transition: 0.2s;
}

/* ── Links ── */
#sign-up-link {
  color: var(--text-color3);
  cursor: pointer;
}
.incorrect.field {
  border-color: rgb(196, 84, 84);
}
#error-message,
#error-message-signup {
  color: rgb(196, 84, 84);
  font-size: 14px;
  min-height: 18px;
  margin-top: 10px;
  font-weight: bold;
}
