@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Vollkorn:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
  font-size: 100%; /* This sets the base font size to 16px */
  /* Light Mode Colors */
  --light-page-background: #e4f9f5;
  --light-container-background: #d0f0ec;
  --light-text: #333333;
  --light-header: #98ddca;
  --light-border-shadow: #cccccc;
  --light-play-icon: #333333;

  /* Dark Mode Colors */
  --dark-page-background: #2c786c;
  --dark-container-background: #264e48;
  --dark-text: #dddddd;
  --dark-header: #46a292;
  --dark-border-shadow: #1a1a1a;
  --dark-play-icon: #dddddd;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: "Vollkorn", serif;
  line-height: 1.3;
  text-transform: lowercase;
  background-color: var(--light-page-background);
  color: var(--light-text);
  overflow: hidden;
}

body.dark-mode {
  background-color: var(--dark-page-background);
  color: var(--dark-text);
}

header,
footer {
  width: 100%;
  padding: 1rem;
  background-color: var(--dark-header);
  color: var(--dark-text);
  text-align: center;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1000;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 2rem;
  width: 100%;
  box-sizing: border-box;
}

.container {
  max-width: 90%;
  padding: 2rem;
  margin: 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.light-mode .container {
  background-color: var(--light-container-background);
  box-shadow: 0 0 30px var(--light-border-shadow);
}

.dark-mode .container {
  background-color: var(--dark-container-background);
  box-shadow: 0 0 30px var(--dark-border-shadow);
}

hr.solid {
  border-top: 3px solid currentcolor;
  border-radius: 5px;
}

ul {
  max-width: 80rem;
}

.pronunciation {
  font-style: italic;
  font-size: 1.4rem;
  margin-right: 0;
}

.partOfSpeech {
  font-size: 1rem;
  margin-right: 0.5rem;
}

.definition {
  margin-top: 1rem;
}

.label {
  font-size: 1.1rem;
  font-weight: 600;
  margin-right: 0.25rem;
  cursor: pointer;
  text-decoration: underline currentcolor 1px;
  transition: color 0.3s ease;
}

.label:hover {
  color: var(--dark-header);
}

.noteContainer {
  margin: auto;
  padding: 1rem;
  font-size: 0.8rem;
  max-width: 40rem;
  border-radius: 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--dark-header);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dark-mode .noteContainer {
  background-color: var(--light-container-background);
  color: var(--light-text);
}

.light-mode .noteContainer {
  background-color: var(--dark-container-background);
  color: var(--dark-text);
}

#noteLabel {
  font-size: 0.8rem;
  text-decoration: none;
}

.audio {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s;
}

.audio:hover {
  transform: scale(1.1);
}

#play-icon {
  font-size: 2.5rem;
  cursor: pointer;
}

.light-mode #play-icon {
  color: var(--light-play-icon);
}

.dark-mode #play-icon {
  color: var(--dark-play-icon);
}

.hiddenContent {
  display: none;
  margin-top: 0.5rem;
  font-style: italic;
}

.word {
  font-size: 3rem;
  font-weight: bold;
  margin-right: 0.5rem;
  color: currentColor;
  transition: color 0.3s ease, transform 0.2s ease;
}

#sqweeWord:hover {
  transform: scale(1.1);
  animation: wiggle 0.3s ease;
  color: var(--dark-header);
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

.mode-toggle-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  position: relative;
  width: 100%;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.875rem;
  margin: 0 1rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e4f9f5;
  transition: 0.4s;
  border-radius: 2rem;
  box-shadow: 0 0 6px var(--light-border-shadow);
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.5rem;
  width: 1.5rem;
  left: 0.1875rem;
  bottom: 0.1875rem;
  background-color: #d0f0ec;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #264e48;
  box-shadow: 0 0 6px var(--dark-border-shadow);
}

input:checked + .slider:before {
  transform: translateX(1.125rem);
}

.sqweeLogo svg {
  fill: currentColor;
  width: 120px;
  max-width: 120px;
  transition: fill 0.3s ease;
}

.sqweeLogo:hover svg {
  fill: var(--dark-header);
}

.never {
  text-decoration: double underline;
}

@media screen and (max-width: 420px) {
  body {
    overflow-y: auto;
  }
  .main {
    top: 0;
  }

  .container {
    padding: 1rem;
    margin: 0.5rem;
  }

  header {
    height: 30px;
    align-items: center;
    justify-content: center;
  }

  .word {
    font-size: 2rem;
  }

  .noteContainer {
    margin: auto;
    padding: 0.5rem;
    font-size: 0.8rem;
    max-width: 20rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    background-color: var(--dark-header);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

  .toggle-container {
    margin: 0.3rem 0;
  }

  .switch {
    width: 2.5rem;
    height: 1.25rem;
  }

  .slider {
    height: 1.25rem;
    width: 2.5rem;
  }

  .slider:before {
    height: 1rem;
    width: 1rem;
    left: 0.125rem;
    bottom: 0.125rem;
  }

  .sqweeLogo {
    display: flex;
    margin: 10px auto;
    max-width: 120px;
  }

  .sqweeLogo svg {
    width: 80px;
  }

  footer {
    padding: 5px;
    height: 50px;
  }
}
