
/* Container tìm kiếm nâng cao */
#searchWordContainer {
  position: fixed;
  width: 400px;
  top: 50%;
  left: 32.5%;
  transform: translate(-50%, -50%);
  z-index: 1002;
}

.search-advanced {
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  /* z-index: 1000; */
  animation: slideIn 0.4s ease-out;
  transition: all 0.3s ease;
}

.search-advanced.hidden {
  display: none;
}
/* Lớp phủ */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Đảm bảo độ trong suốt */
  z-index: 1001; /* Cao hơn body nhưng thấp hơn #searchWordContainer */
  display: block; /* Đảm bảo hiển thị khi lớp hidden được gỡ */
}

.overlay.hidden {
  display: none;
}

/* Box phiên dịch */
.translation-box {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-left: 6px solid #16a34a;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.1);
  animation: fadeInUp 0.4s ease;
  transition: transform 0.3s ease;
}

.translation-box:hover{
    transform: translateY(-5px);
}
.translation-title {
  font-weight: 700;
  color: #15803d;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.translation-title i {
  font-size: 1.4rem;
  color: #15803d;
}

.translation-content {
  font-size: 16px;
  color: #1f2937;
  padding-left: 0.5rem;
  margin: 0.5rem 0;
  font-weight: 500;
}

/* Box phiên âm */
.phonetics-box {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-left: 6px solid #4f46e5;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.1);
  animation: fadeInUp 0.4s ease;
  transition: transform 0.3s ease;
}

.phonetics-box:hover {
  transform: translateY(-5px);
}

.phonetics-title {
  font-weight: 700;
  color: #4338ca;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.phonetics-title i {
  font-size: 1.4rem;
  color: #4338ca;
}

.phonetics-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.phonetic-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 10px 14px;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  font-size: 20px;
  color: #1e293b;
  font-family: 'Courier New', monospace;
  cursor: pointer;
  transition: all 0.3s ease;
}

.phonetic-btn:hover {
  background-color: #e0e7ff;
  transform: translateX(5px);
}

.phonetic-btn i {
  font-size: 1.3rem;
  color: #4338ca;
}

.phonetic-btn.playing i {
  font-size: 1.3rem;
  color: #4338ca;
  animation: spin 1s linear infinite; /* Hiệu ứng quay khi playing */
}

.phonetic-btn:not(.playing) i {
  font-size: 1.3rem;
  color: #4338ca;
}

.phonetic-btn.playing i {
  content: "\f110"; /* Unicode của fa-spinner, nhưng sẽ dùng class thay thế */
  /* Sử dụng class fa-spinner thay vì content */
}

.phonetic-btn:not(.playing) i {
  content: "\f028"; /* Unicode của fa-volume-high, nhưng sẽ dùng class thay thế */
}

#vocabWordType {
  font-size: 16px;
  color: #1e293b;
  padding-left: 0.5rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Hiệu ứng động */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-100px);
  }
  to {
    opacity: 1;
     transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}