/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateY(8px);
  transition: transform 0.2s;
}

.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}

.modal-header h3 { font-size: 0.9rem; font-weight: 600; }

.modal-close {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mid);
}

.modal-close:hover { background: var(--bg); }

.modal-body { padding: 1.25rem; }

.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.detail-word { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.detail-phonetic { font-size: 0.8rem; color: var(--text-light); margin-top: 0.15rem; }
.detail-meta { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }

/* Kelime detayı modalındaki seviye rozeti kenarlarını daha keskin yap */
.detail-meta .word-level-pill {
  border-radius: 4px;          /* pill formunu daha kareye yaklaştırır */
  border: 1px solid currentColor; /* seviye renklerini border rengi olarak kullanır */
  background-clip: padding-box;
}

.detail-play-icon {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  color: var(--text-mid);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}

.detail-play-icon .detail-ico {
  width: 14px;
  height: 14px;
  display: block;
}

.detail-play-icon:hover { background: var(--bg); color: var(--text); }

.detail-section { margin-bottom: 1.1rem; }

.detail-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0.35rem;
}

.detail-tr {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.detail-example {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.7rem 0.85rem;
  margin-top: 0.5rem;
  /* Soldaki kahverengi şerit kaldırıldı. */
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.detail-example-en { font-size: 0.88rem; color: var(--text); line-height: 1.4; }

.detail-actions-mini {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-end;
}

.detail-actions-mini .btn-icon {
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-actions-mini .btn-icon .detail-ico {
  width: 14px;
  height: 14px;
  display: block;
}

.detail-actions-mini .btn-icon:hover { background: var(--bg); }

.meaning-list { display: flex; flex-direction: column; gap: 0.5rem; }

.meaning-item {
  padding: 0.6rem 0.75rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.meaning-pos {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0.25rem;
}

.meaning-def { font-size: 0.85rem; color: var(--text); line-height: 1.4; }

.meaning-tr-link {
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.2rem;
  display: inline-block;
}

.meaning-tr-link:hover { text-decoration: underline; }

.detail-footer {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.detail-footer .btn { flex: 1; padding: 0.5rem 0.75rem; font-size: 0.8rem; }

.gt-link {
  display: block;
  text-align: center;
  padding: 0.5rem;
  background: var(--bg);
  color: var(--text-mid);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.1s;
}

.gt-link:hover { background: var(--border); }

.detail-loading {
  text-align: center;
  padding: 1rem;
  color: var(--text-light);
  font-size: 0.8rem;
}

.detail-empty { font-size: 0.8rem; color: var(--text-light); }

@media (max-width: 640px) {
  .modal-content { max-height: 90vh; }
  .detail-word { font-size: 1.4rem; }
  .detail-actions-mini { justify-content: center; }
}

@media (max-width: 480px) {
  .modal-header {
    padding: 0.75rem 1rem;
  }

  .modal-header h3 {
    font-size: 0.85rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .detail-word {
    font-size: 1.25rem;
  }

  .detail-phonetic {
    font-size: 0.7rem;
  }

  .detail-meta {
    flex-wrap: wrap;
    justify-content: center;
  }

  .detail-play-icon {
    width: 26px;
    height: 26px;
  }

  .detail-tr {
    font-size: 1rem;
  }

  .detail-example {
    padding: 0.6rem 0.7rem;
  }

  .detail-example-en {
    font-size: 0.8rem;
  }

  .meaning-item {
    padding: 0.5rem 0.6rem;
  }

  .meaning-pos {
    font-size: 0.65rem;
  }

  .meaning-def {
    font-size: 0.8rem;
  }

  .detail-footer {
    flex-direction: column;
  }

  .detail-footer .btn {
    width: 100%;
  }
}
