/* S T Y L E S   R E S E T E R*/

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
  margin: 0;
}

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
button,
input,
label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* S T Y L E S   F O R   P R O J E C T*/

/* Fonts */
.poppins-regular {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.poppins-bold {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.unna-regular {
  font-family: "Unna", serif;
  font-weight: 400;
  font-style: normal;
}

.unna-bold {
  font-family: "Unna", serif;
  font-weight: 700;
  font-style: normal;
}

.unna-regular-italic {
  font-family: "Unna", serif;
  font-weight: 400;
  font-style: italic;
}

/* Body */
body {
  background-color: #e4e6f0;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  height: 100vh;
  height: 100dvh;
  padding: 20px 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* App */

.background-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  width: 300px;
  position: fixed;
  top: 0;
  right: 0;
  pointer-events: none;
}

#user-interface {
  border-radius: 20px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: calc(100vh - 40px);
  /* overflow: hidden; */
  overflow: auto;
  position: relative;
}

#user-interface::-webkit-scrollbar {
  width: 12px;
  background: transparent;
}

#user-interface::-webkit-scrollbar-thumb {
  background: #97b4fc;
  border-radius: 5px;
  border: 3px solid white;
}

.header {
  position: relative;
  height: 60px;
  display: flex;
  justify-content: space-between;
  /* padding: 0 10px; */
  align-items: center;
}

.logo {
  height: 40px;
  width: auto;
}

.search-input {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  max-width: 80%;

  outline: none;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #999;
  padding: 5px 20px;
}

.search-input:focus {
  padding: 5px 20px;
  border: 2px solid #c0cdfd;
}

.search-input::placeholder {
  color: #b8b8b8;
}

.menu-list {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-link {
  text-decoration: none;
  color: #3b4261;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
}

.menu-link:hover {
  text-decoration: underline;
}

/* under header */
.welcome-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.welcome-box > h1 {
  font-family: "Unna", serif;
  font-weight: 700;
  color: #3b4261;
  font-size: 42px;
  margin: 0;
}

.welcome-box > h2 {
  font-family: "Unna", serif;
  font-weight: 400;
  font-style: italic;
  color: #537cf7;
  font-size: 20px;
  letter-spacing: 1px;
  margin: 0;
}

.p-wrapper {
  max-width: 800px;
  background-color: #b1c2fe;
  padding: 30px 40px;
  border-radius: 20px;
  align-self: center;
}

.p-wrapper > p {
  color: #313340;
  text-align: justify;
  margin: 0;
  letter-spacing: 1%;
  line-height: auto;
}

.welcome-box button {
  background-color: #4e7df4;
  border-radius: 60px;
  padding: 20px 30px;
  outline: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-family: inherit;
  font-weight: inherit;
  color: white;
  align-self: center;
}

.main-content {
  position: relative;
  margin: auto;
}

.loader-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-content {
  text-align: center;
}

.main-content > h2 {
  font-family: "Unna", serif;
  font-weight: 700;
  color: #6586f8;
  font-size: 30px;
  margin: 0 0 30px;
}

.word-container {
  /* display: flex;
  width: 100%;
  margin: 0 auto;
   */
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
}

.right-wrapper {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 25px;
  width: 100%;
}

.right-wrapper h3 {
  font-family: "Unna", serif;
  font-weight: 700;
  font-size: 28px;
  color: #313340;
}

.pronunciation-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}

.pronunciation-wrapper > p {
  margin: 0;
}

.word-meaning-container {
  background-color: #b1c2fe;
  padding: 30px 40px;
  border-radius: 20px;
  text-align: left;
}

.word-img {
  width: 100%;
  max-height: 60vh;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.hidden-audio {
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  position: absolute;
}

.speaker-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.speaker-icon img {
  width: 24px;
  height: 24px;
  display: block;
}

.speaker-icon:hover img {
  filter: brightness(1.2);
}

.examples-list {
  /* height: 0; */
  /* opacity: 0; */
  display: flex;
  gap: 7px;
  flex-direction: column;
  align-items: start;
  transition: all 0.2s ease;
  /* overflow-y: hidden; */
}

.next-word-wrapper {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

#next-word-btn {
  background-color: #4e7df4;
  border-radius: 60px;
  padding: 20px 30px;
  outline: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-family: inherit;
  font-weight: inherit;
  color: white;
  align-self: right;
}

@media all and (max-width: 900px) {
  .word-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .word-img {
    object-fit: contain;
    width: 100%;
    max-height: 100%;
  }

  #user-interface::-webkit-scrollbar {
    width: 0;
  }

  .header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
  }

  .search-input {
    position: static;
    width: 100%;
    max-width: 100%;
    transform: none;
    order: 4;
    height: 40px;
  }
}

@media all and (max-width: 400px) {
  .header {
    justify-content: center;
  }
}
