body {
  color: #777;
}

.pure-img-responsive {
  max-width: 100%;
  height: auto;
}

/*
Add transition to containers so they can push in and out.
*/
#layout,
#menu,
.menu-link {
  -webkit-transition: all 0.2s ease-out;
  -moz-transition: all 0.2s ease-out;
  -ms-transition: all 0.2s ease-out;
  -o-transition: all 0.2s ease-out;
  transition: all 0.2s ease-out;
}

/*
This is the parent `<div>` that contains the menu and the content area.
*/
#layout {
  position: relative;
  left: 0;
  padding-left: 0;
}

#layout.active #menu {
  left: 150px;
  width: 150px;
}

#layout.active .menu-link {
  left: 150px;
}

/*
The content `<div>` is where all your content goes.
*/
.content {
  margin: 0 auto;
  padding: 0 1em;
  max-width: 600px;
  margin-bottom: 50px;
  line-height: 1.6em;
}

.header {
  margin: 0;
  color: #333;
  text-align: center;
  padding: 2em 1em 0em 1em;
  border-bottom: 1px solid #eee;
}

a.add-vocab-icon {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
}

.header h1 {
  margin: 0.2em 0;
  font-weight: 300;
  font-size: clamp(2rem, 3vw, 6rem);
  display: flex;
  align-items: center;
  justify-content: center;

}

.header h2 {
  font-weight: 300;
  color: #ccc;
  padding: 0;
  margin-top: 0;
}

.content-subhead {
  margin: 50px 0 20px 0;
  font-weight: 300;
  color: #888;
}

#edit-form-header,
.edit-form-header,
#create-form-header {
  font-size: x-large;
}



/*
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
appears on the left side of the page.
*/

#menu {
  margin-left: -150px;
  /* "#menu" width */
  width: 150px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  /* so the menu or its navicon stays above all content */
  background: #191818;
  overflow-y: auto;
}

/*
  All anchors inside the menu should be styled like this.
  */
#menu a {
  color: #999;
  border: none;
  padding: 0.6em 0 0.6em 0.6em;
}

/*
  Remove all background/borders, since we are applying them to #menu.
  */
#menu .pure-menu,
#menu .pure-menu ul {
  border: none;
  background: transparent;
}

/*
  Add that light border to separate items into groups.
  */
#menu .pure-menu ul,
#menu .pure-menu .menu-item-divided {
  border-top: 1px solid #333;
}

/*
    Change color of the anchor links on hover/focus.
    */
#menu .pure-menu li a:hover,
#menu .pure-menu li a:focus {
  background: #333;
}

/*
  This styles the selected menu item `<li>`.
  */
#menu .pure-menu-selected,
#menu .pure-menu-heading {
  background: #1f8dd6;
}

/*
    This styles a link within a selected menu item `<li>`.
    */
#menu .pure-menu-selected a {
  color: #fff;
}

/*
  This styles the menu heading.
  */
#menu .pure-menu-heading {
  font-size: 110%;
  color: #fff;
  margin: 0;
}

.pure-menu-item {
  padding: 0;
  margin: 0;
  height: auto !important;
}

/* -- Dynamic Button For Responsive Menu -------------------------------------*/

/*
The button to open/close the Menu is custom-made and not part of Pure. Here's
how it works:
*/

/*
`.menu-link` represents the responsive menu toggle that shows/hides on
small screens.
*/
.menu-link {
  position: fixed;
  display: block;
  /* show this only on small screens */
  top: 0;
  left: 0;
  background: #000000b3;
  display: flex;
  font-size: 11px;
  height: 4em;
  justify-content: center;
  align-items: center;
  padding: 0px 10px;
  width: 4em;
  z-index: 20;
}

.menu-link:hover,
.menu-link:focus {
  background: #000;
}

.menu-link span {
  position: relative;
  display: block;
}

.menu-link span,
.menu-link span:before,
.menu-link span:after {
  background-color: #fff;
  pointer-events: none;
  width: 100%;
  height: 0.2em;
}

.menu-link span:before,
.menu-link span:after {
  position: absolute;
  margin-top: -0.6em;
  content: " ";
}

.menu-link span:after {
  margin-top: 0.6em;
}

.lw-select-list {
  height: 3em;
  border-radius: 4px;
  width: 100%;
}


/* -- Responsive Styles (Media Queries) ------------------------------------- */

/*
Hides the menu at `48em`, but modify this based on your app's needs.
*/
@media (min-width: 48em) {

  .header,
  .content {
    padding-left: 2em;
    padding-right: 2em;
  }

  #layout {
    padding-left: 150px;
    /* left col width "#menu" */
    left: 0;
  }

  #menu {
    left: 150px;
  }

  .menu-link {
    position: fixed;
    left: 150px;
    display: none;
  }

  #layout.active .menu-link {
    left: 150px;
  }
}

@media (max-width: 48em) {

  /* Only apply this when the window is small. Otherwise, the following
  case results in extra padding on the left:
    * Make the window small.
    * Tap the menu to trigger the active state.
    * Make the window large again.
  */
  #layout.active {
    position: relative;
    left: 150px;
  }
}

@media (max-width: 480px) {
  .submit-button {
    width: 90% !important;
  }

  .pure-forminput[type=date],
  .pure-form input[type=datetime-local],
  .pure-form input[type=datetime],
  .pure-form input[type=email],
  .pure-form input[type=month],
  .pure-form input[type=number],
  .pure-form input[type=password],
  .pure-form input[type=search],
  .pure-form input[type=tel],
  .pure-form input[type=text],
  .pure-form input[type=time],
  .pure-form input[type=url],
  .pure-form input[type=week],
  .pure-form select,
  .pure-form textarea {
    width: 100% !important;
  }

  .account-links>a {
    /* padding-left: 20px !important; */
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (min-width: 481px) {

  .pure-form input[type=email],
  .pure-form input[type=password],
  .submit-button {
    width: 90%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .account-links>a {
    /* padding-left: 20px !important; */
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

.button-success,
.button-error,
.button-warning,
.button-secondary {
  word-wrap: break-word;
  color: white;
  border-radius: 10px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  margin-top: 5px !important;
}


.button-success {
  background: rgb(28, 184, 65);
  /* this is a green */
}

.button-error {
  background: rgb(202, 60, 60);
  /* this is a maroon */
}

.button-warning {
  background: rgb(223, 117, 20);
  /* this is an orange */
}

.button-secondary {
  background: rgb(66, 184, 221);
  /* this is a light blue */
}

.answer-check-button,
.learn-next-button {
  background: rgb(19 115 29 / 60%);
  font-size: 22px;
}

.get-question-button {
  background: rgb(177 43 43 / 74%);
}

.exit-button {
  background: rgba(63, 56, 56, 0.292);
  font-size: 20px;
  position: relative;
  /* top: 30vh;
  transform: translateY(-250%); */
}

#exit-button {
  position: absolute;
  left: 155px;
  top: 50px;
}




.nav-block {
  display: block;
}

.answer-check-button,
.get-question-button,
.exit-button {
  color: white;
  border-radius: 10px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);

  height: 55px;
  width: 78%;
  margin-top: 21px !important;
  margin-left: auto;
  margin-right: auto;
}

.learn-next-button {
  width: 100% !important;

  color: white;
  border-radius: 10px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  height: 55px;
  margin-top: 21px !important;
  margin-left: auto;
  margin-right: auto;
}

.answer-check-button,
.get-question-button {
  width: 100% !important;
  font-size: x-large;
}


.new-words {
  height: 20% !important;
}

.answer-options {
  font-size: larger;
  width: 100%;
  display: grid;
  margin-left: auto;
  margin-right: auto;
  height: 45%;
}


.answer-option-button {
  /* width: 310px; */
  display: flex;
  overflow: hidden;
  font-size: clamp(22px, 2vw, 34px);
  height: 4em;
  text-align: center;
  text-wrap: balance;
  margin-top: auto;
  align-content: center;
  justify-content: center;
  align-items: center;
}

.match-button {
  height: 80px;
  width: 180px;
  white-space: normal;
  font-size: larger;
  transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
  ;
}

.match-button:disabled {
  opacity: 0.5;
  /* Visual indicator of a disabled button */
  cursor: not-allowed;
}


/*
  LEARN.htm CSS
*/
.score_block {
  display: flex;
}

.score_wrong {
  display: flex;
  margin-left: 10px;
  margin-right: auto;
}

.score_correct {
  display: flex;
  margin-right: 10px;
  margin-left: auto;
}

.score_value {
  padding-left: 5px;
}



/* vocabularies Page CSS */
.main-vocab-page-menu-icon {
  position: absolute;
  display: block;
  top: 5px;
  right: 5px;
}

/* Accordeon stuff */
.accordion-section {
  background-color: #eee;
  color: #444;
  cursor: pointer;
  padding: 10px 18px 10px 8px;
  width: 90% !important;
  border: none;
  text-align: left;
  outline: none;
  font-size: 15px;
  transition: 0.4s;
  margin-top: 10px;
  margin-bottom: 0px;
}

.accordion-section-active,
.accordion-section:hover {
  background-color: #ccc;
}

.accordion-section:after {
  content: '\002B';
  color: #777;
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

.accordion-section-active:after {
  content: "\2212";
}

.accordion-panel {
  padding: 0px 10px 0px 5px;
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  width: 100%;
}

.pure-form-input {
  width: 95%;
}

.contains-wrong-value {
  border-color: #e70000 !important;
  color: #e70000 !important;
}

.account-links {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
  max-width: 300px;
}

.page-not-found-text {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: max-content;
}

.form-buttons>button {
  width: 48%;
  margin-left: auto;
  line-height: 1.6em;
  margin-right: auto;
}

.form-buttons {
  width: 100%;
  padding-top: 10px;
}

.grecaptcha-badge {
  display: none !important;
}

.error-text,
#pass-err-elm {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-content: center;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hidden {
  display: none;
}

li.horizontal-tabs::before {
  border: 2px solid #71c2ea;
  background: #71c2ea;
  border-radius: 25%;
  content: attr(qty);
  color: white;
  position: absolute;
  left: 10px;
  top: 8px;
  /* bottom: 0; */
  /* right: 0px; */
  min-width: 25px;
  max-width: 50px;
  text-align: center;
  display: block;
  padding: 0px 2px;
  cursor: pointer;
}

.pure-menu-horizontal .pure-menu-list {
  display: inline-block;
  width: 100%;
}

.pure-menu-horizontal .pure-menu-heading,
.pure-menu-horizontal .pure-menu-item,
.pure-menu-horizontal .pure-menu-separator {
  display: inline-block;
  vertical-align: middle;
  width: 48%;
  align-content: center;
  text-align: center;
  font-weight: 600;
}

.pure-menu-selected {
  background-color: #eee;
}

/* Spinner styling */
.spinner {
  width: 64px;
  height: 64px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 200px;
  left: calc(50% - 31px);
  transform: translate(-50%, -50%);
  z-index: 1001;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Blurred page content */
.blurred {
  filter: blur(5px) brightness(60%);
  pointer-events: none;
  user-select: none;
}

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pure-menu-children {
  display: none;
  position: relative;
  left: 0px;
  top: 100%;
  margin: 0;
  padding: 0;
  z-index: 20;
  box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  background-color: #f5f5f5;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  /* Forces hardware acceleration */
  will-change: transform;
  /* Helps prevent rendering bugs */
}

.pure-menu-item {
  padding: 0;
  margin: 0;
  height: auto !important;
}

.pure-menu-link-dd {
  display: flex;
  width: max-content;
  width: max-content;
  margin: 5px 8px 5px 5px;
  font-size: large;
}

.pure-menu-link-dd>svg {
  margin-right: 5px;
  font-size: larger;
}

.pure-menu-header {
  font-size: larger;
  font-weight: 600;
  margin: 10px 20px 10px 20px;
  display: flex;

}

.pure-menu-header::after {
  content: "\000A";
  width: 90%;
  left: 10px;
  border-bottom: 1px solid #b5b5b5;
  position: absolute;
  top: 35px;
}


.word-hint-card {
  border: solid 1px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  width: 300px;
  min-height: 150px;
  max-height: 450px;
  position: absolute;
  top: 150px;
  left: calc(50% + 75px);
  transform: translate(-50%, -50%);
  right: auto;
  align-self: anchor-center;
  z-index: 200;
  background: #f3f5f5;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  color: #333;
}

.source {
  font-weight: 600;
  font-size: 1.4em;
  margin: 10px 20px;

}

.translation {
  font-weight: 500;
  font-size: 1.2em;
  margin: 0px 20px 10px 20px;
  border-top: 1px solid #3333;
  padding-top: 3px;
}

.secondary {
  font-weight: 400;
  font-size: 1em;
  margin: 5px 20px 10px 20px;
}

@media (max-width: 770px) {
  #exit-button {
    position: absolute;
    left: 5px;
    top: 50px;
  }

  .word-hint-card {
    left: 50%;
  }
}


/* ============================================
   VOCABULARY TREE DROPDOWN STYLES
   ============================================ */

.vocab-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.vocab-dropdown {
  position: relative;
  width: 100%;
}

.vocab-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.2s ease;
}

.vocab-selected:hover {
  border-color: #71c2e0;
}

.vocab-selected:focus {
  outline: 2px solid #71c2e0;
  outline-offset: 2px;
}

.vocab-selected-text {
  flex: 1;
  text-align: left;
  color: #333;
}

.vocab-dropdown-arrow {
  color: #666;
  transition: transform 0.2s ease;
  font-size: 0.8rem;
}

.vocab-dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 1000;
}

.vocab-dropdown-content.open {
  max-height: 300px;
  overflow-y: auto;
}

.vocab-tree {
  padding: 0.5rem 0;
}

.vocab-tree-level {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vocab-tree-item {
  margin: 0;
  padding: 0;
}

.vocab-item-content {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  transition: background-color 0.2s ease;
}

.vocab-item-content:hover {
  background-color: #f8f9fa;
}

.vocab-toggle-btn {
  background: none;
  border: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  font-weight: bold;
  margin-right: 0.5rem;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.vocab-toggle-btn:hover {
  background-color: #e9ecef;
}

.vocab-toggle-btn:focus {
  outline: 2px solid #71c2e0;
  outline-offset: 1px;
}

.vocab-spacer {
  width: 20px;
  margin-right: 0.5rem;
}

.vocab-name-btn {
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  flex: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: #333;
  transition: all 0.2s ease;
}

.vocab-name-btn:hover {
  background-color: #71c2e0;
  color: white;
}

.vocab-name-btn:focus {
  outline: 2px solid #71c2e0;
  outline-offset: 1px;
}

.vocab-name-btn.selected {
  background-color: #71c2e0 !important;
  color: white !important;
  font-weight: 500;
}

.vocab-name-btn.selected .vocab-meta {
  color: rgba(255, 255, 255, 0.8) !important;
}

.vocab-name-btn.selected .vocab-badge {
  border: 2px solid white;
}

.vocab-children {
  transition: max-height 0.3s ease, opacity 0.2s ease;
  overflow: hidden;
}

.vocab-children.collapsed {
  max-height: 0;
  opacity: 0;
}

.vocab-children.expanded {
  max-height: 500px;
  opacity: 1;
}

/* Indentation for nested levels */
.vocab-tree-level-1 .vocab-item-content {
  padding-left: 2rem;
}

.vocab-tree-level-2 .vocab-item-content {
  padding-left: 3.25rem;
}

.vocab-tree-level-3 .vocab-item-content {
  padding-left: 4.5rem;
}

.vocab-tree-level-4 .vocab-item-content {
  padding-left: 5.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .vocab-dropdown-content.open {
    max-height: 250px;
  }

  .vocab-tree-level-1 .vocab-item-content {
    padding-left: 1.5rem;
  }

  .vocab-tree-level-2 .vocab-item-content {
    padding-left: 2.5rem;
  }

  .vocab-tree-level-3 .vocab-item-content {
    padding-left: 3.5rem;
  }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {

  .vocab-dropdown-arrow,
  .vocab-dropdown-content,
  .vocab-children {
    transition: none;
  }
}