* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: #202020;
  height: 100%;
  width: 100%;
  font-family: 'Arial', sans-serif;
  color: white;
  overflow-x: hidden;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}




h3 {
  margin-top: 5px;
}




.change-class {
  color: #f75b40 !important;
  box-shadow: 12px #f75b40;
  border-radius: 0px 4px 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.change-class__default {
  color: #AAAAAA;
  vertical-align: middle;
  margin: 10px;

}


/*  Strelkali error belgi uchun*/

.popup-container {
  position: relative;
  /* muhim: popup shunga nisbatan joylashadi */
  display: inline-block;
  /* tugma bilan bir qatorda */
}


.popup {
  width: 150px;
  margin: 0 auto;
  position: absolute;
  /* ← bu fixed Emas! */
  text-align: center;
  z-index: 999;
}

.popup:before {
  content: "";
  width: 20px;
  height: 20px;
  background: #fff;
  position: absolute;
  transform: translateX(-50%) rotate(45deg);
  bottom: -10px;
  /* ← pastga tushadi */
  left: 50%;
  z-index: 998;
  box-shadow: 0 1px 14px rgba(0, 0, 0, 0.2);
}


.popup-wrapper {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  position: relative;
  z-index: 998;
  color: red;
  font-weight: bold;
  font-size: 16px;
  line-height: 1.4;

}








/* Tugashi */

.navbar {
  padding: 0;
  margin-top: 50px;
  /* ortiqcha bo‘sh joy yo‘q */
  margin-bottom: 20px;
  /* navbardan keyingi element bilan bo‘shliq */
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  /* input va tugmalar orasida 10px */
}

.search-bar {
  flex: 1;
  min-width: 180px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
}









/* script edit uchun */

.word-item {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  /* ❗ Hech qachon pastga tushmasin */
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
  overflow-x: auto;
}

.edit-input {
  flex: 1 1 auto;
  min-width: 0;
  /* ✅ Sozlangan! input siqilsa ham */
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
  box-sizing: border-box;
}

.edit-button {
  width: 36px;
  height: 36px;
  background-color: #444444;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

}


.edit-button:hover {
  background-color: #666666;
}

.edit-button svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}









#wordListContainer {
  max-height: 40vh;
  /* yoki kerakli balandlik */
  overflow-y: auto;
  scroll-behavior: smooth;

}


.highlight-word {
  background-color: #fcd914;
  border-radius: 4px;
  padding: 2px 4px;
}


.manual-word-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
  width: 100%;
  overflow-x: auto;
}

.manual-word-item .edit-input {
  flex: 1 1 auto;
  min-width: 0;
}

.edit-input {
  text-align: left;
  direction: ltr;
  caret-color: auto;
  overflow-x: auto;
}


.manual-word-item .edit-button {
  width: 36px;
  height: 36px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.manual-word-item .edit-button:hover {
  background-color: #0056b3;
}

.manual-word-item svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}



.saved-word-card {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  transition: all 0.2s ease-in-out;
}

.saved-word-card:hover {
  background-color: #f0f0f0;
  transform: scale(1.01);
}

.word-english {
  font-weight: bold;
  color: #333;
}

.word-translation {
  color: #666;
}



.word-item {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  align-items: center;
}

.word-item input {
  padding: 4px;
  width: 120px;
}

.word-item button {
  padding: 3px 6px;
  font-size: 14px;
}




.responsive-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
  /* markazga joylashish uchun */
  border-radius: 10px;
  /* ixtiyoriy: yumaloqlik */
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  /* ixtiyoriy: soyabon effekt */
}


.guide-container {
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  background-color: #202020;
  border-left: 5px solid #FF4500;
  border-radius: 8px;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.guide-list-left {
  list-style-position: outside;
  padding-left: 20px;
  margin: 0;
}

.guide-list-left li {
  margin-bottom: 10px;
  line-height: 1.5;
  text-align: left;
}


.height100 {
  height: 1000px;
}

.title {
  background-color: #FF4500;
  padding: 10px;
  font-size: 2em;
  margin-bottom: 20px;

}

.spanmargin {
  margin-top: 10px;
}


.input_container {
  display: inline-block;
  border: 1px solid #e5e5e5;
  border-radius: 5px;
  overflow: hidden;
}

#fileInput {
  display: none;
}

.custom-file-button {
  background-color: #fff;
  color: #000;
  border: none;
  padding: 10px 15px;
  display: inline-block;
  cursor: pointer;
  transition: 0.3s;
  border-right: 1px solid #e5e5e5;
}

.custom-file-button:hover {
  background-color: #eee;
}

.file-name {
  display: inline-block;
  padding: 10px;
  color: #888;
}




.scale-wrapper {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.pad10 {
  padding: 10px;
  padding-top: 0;
}

.container {
  text-align: center;
  width: 100%;
}

h1 {
  color: #FFA500;
  font-size: 2em;
  margin-bottom: 20px;
  margin-top: 0;
}

.text-display {
  background: #333;
  padding: 10px;
  border-radius: 10px;
  margin: 20px 0;
}




.setting-display {
  background: #333;
  padding: 1px 20px 30px 20px;
  border-radius: 10px;
  margin: 20px 0;
}



.button,
.big_button {
  background: #FF4500;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px;
  font-size: 1rem;
  text-align: center;
  /* Tugmalar markazlashadi */
  display: inline-block;
  text-decoration: none;
  box-sizing: border-box;
  /* O‘lchamni to‘liq hisoblash */
}

.big_button {
  padding: 20px;
  font-size: 1.2rem;
  width: calc(33% - 12px);
  /* 3ta tugma bir qatorda */
  margin-right: 5px;
  /* Tugmalar orasidagi masofa */
}

.button:hover,
.big_button:hover {
  background: #FF6347;
}

.blurred {
  filter: blur(5px);
}

a.button {
  text-decoration: none;
  font-size: 1.1rem;
  display: inline-block;
  /* Agar havola bo‘lsa, uni tugma kabi qilish */
}


.button-2 {
  background: #FF4500;
  color: white;
  padding: 10px 80px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px;
  font-size: 1rem;
  text-align: center;
  /* Tugmalar markazlashadi */
  display: inline-block;
  text-decoration: none;
  box-sizing: border-box;
  /* O‘lchamni to‘liq hisoblash */
}

.button-2:hover {
  background: #f75b40;
}







/* From Uiverse.io by Na3ar-17 */
.container-player {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
}

.switch {
  font-size: 0.875rem;
  position: relative;
  display: inline-block;
  width: 9em;
  height: 2.6em;
}

.switch input {
  display: none;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch input:checked+.slider .ball {
  box-shadow: 10px 10px 100px #7f8996;
}

.switch input:checked+.slider .title {
  left: 40%;
}

.switch input:checked+.slider {
  background-color: #FF4500;
}

.switch input:focus+.slider {
  box-shadow: 10px 10px 100px #7f8996;
}

.switch input:checked+.slider .ball {
  left: 72%;
  transform: rotate(360deg);
  box-shadow: none;
  outline: 6px solid rgba(255, 255, 255, 0.278);
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #313033;
  transition: all 0.4s;
  border-radius: 30px;
}

.switch .slider .title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  transition: all 0.4s;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.switch .slider .ball {
  background-color: #fff;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  position: absolute;
  left: -1px;
  transition: 0.4s;
}

.switch .slider .ball .icon {
  position: absolute;
  top: 58%;
  left: 53%;
  transform: translate(-50%, -50%);
  color: #313033;
  font-size: 12px;
}



.custom-alert {
  position: fixed;
  top: 30px;
  left: 10px;
  right: 10px;
  max-width: 800px;
  margin: 0 auto;

  background-color: #fcd914;
  color: black;
  padding: 16px 24px;
  border: 1px solid white;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 9999;
  font-size: 16px;
  text-align: center;
  line-height: 24px;
  animation: fadeSlide 0.3s ease;

  word-break: keep-all;
  /* ✅ So‘zlar to‘liq bo‘lib qoladi */
  white-space: normal;
  /* ✅ Joy yetmasa qatorga o‘tadi */
}







#rateRange,
#autoDelayRange,
#wordProgress {
  width: 100%;
  max-width: 400px;
  height: 10px;
  appearance: none;
  background: #ddd;
  border-radius: 5px;
  outline: none;
  margin-top: 10px;
}

#rateRange::-webkit-slider-thumb,
#autoDelayRange::-webkit-slider-thumb,
#wordProgress::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FF4500;
  cursor: pointer;
  transition: background 0.3s ease;
}

#rateRange::-moz-range-thumb,
#wordProgress::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FF4500;
  cursor: pointer;
}


#wordCountDisplay {
  font-size: 1.2rem;
  font-weight: bold;
  margin-left: 10px;
  vertical-align: middle;
  color: #fff;
}

#rateValue {
  font-size: 1.2rem;
  font-weight: bold;
  margin-left: 10px;
  vertical-align: middle;
  color: #fff;
}

#autoDelayValue {
  font-size: 1.2rem;
  font-weight: bold;
  margin-left: 10px;
  vertical-align: middle;
  color: #fff;
}





/* Responsive for phones */
@media screen and (max-width: 300px) {
  h1 {
    font-size: 1.5em;
  }

  .big_button {
    display: block;
    width: 100%;
    margin: 10px auto;
    padding: 16px;
    font-size: 1rem;
  }

  .button {
    display: block;
    width: 100%;
    margin: 8px auto;
    font-size: 0.95rem;
    padding: 12px;
  }

  #rateRange,
  #wordProgress {
    width: 100%;
  }

  #rateValue,
  #wordCountDisplay {
    display: inline-block;
    margin-top: 10px;
  }

  .text-display {
    padding: 15px;
  }

  .container {
    padding: 0 10px;
  }
}



/* Footer */

#siteFooter {
  background-color: #202020;
  color: white;
  padding: 30px 15px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid #444;
  margin-top: 50px;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.footer-text {
  margin-bottom: 12px;
  opacity: 0.8;
}

.footer-links a {
  color: #f0f0f0;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #f75b40;
}