:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 300; /* Aptos Light tarzı ince görünüm */
  letter-spacing: 0.01em;
}

/* Başlıklar çok ince olmasın, ama yine de hafif kalsın */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Tailwind'in kalın sınıflarını biraz inceltelim (Aptos Light hissi) */
.app-bg .font-bold {
  font-weight: 600 !important;
}
.app-bg .font-medium {
  font-weight: 400 !important;
}

/* === Arka plan teması: Koyu Bordo Gradient === */
.app-bg {
  background-color: #3a2630;
  background-image: linear-gradient(160deg, #3a2e3c 0%, #422a35 45%, #5a2730 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* === Kartlar: pudra-bordo zemin + belirgin bordo tonlu gölge === */
.app-bg .bg-white {
  background-color: #f7e9ec !important; /* pudra-bordo */
  box-shadow:
    0 10px 25px -5px rgba(58, 16, 30, 0.35),
    0 4px 10px -4px rgba(58, 16, 30, 0.25) !important;
  border-color: rgba(90, 39, 48, 0.1) !important;
}

/* Hover'da gölge biraz daha derinleşsin */
.app-bg .bg-white:hover {
  box-shadow:
    0 16px 35px -6px rgba(58, 16, 30, 0.45),
    0 6px 14px -4px rgba(58, 16, 30, 0.3) !important;
}

/* === Metin renkleri ===
   Kart İÇİNDEKİ griler okunur olsun (pudra zemin üzerinde koyulaştır) */
.app-bg .bg-white .text-slate-400 { color: #8a6b72 !important; }
.app-bg .bg-white .text-slate-500 { color: #6e5158 !important; }
.app-bg .bg-white .text-slate-300 { color: #b89aa1 !important; }
.app-bg .bg-white .text-slate-800 { color: #2e1f24 !important; }
.tr-line { color: #8a6b72 !important; }

/* Koyu bordo zemin ÜZERİNDEKİ serbest yazılar (kart dışı) için yardımcı sınıflar */
.on-dark { color: #f3e3e7 !important; }
.on-dark-sub { color: #d9bdc4 !important; }
.app-bg h2 { color: #fdf6f8; }

/* === Emoji / ikon rengi: Bordo-Gold === */
.icon-bordogold {
  color: #a8743a !important; /* bordo-gold */
}
/* İstatistik & kart ikonlarını tek bordo-gold tona zorla */
.app-bg .text-indigo-500,
.app-bg .text-indigo-600,
.app-bg .text-green-500,
.app-bg .text-blue-500,
.app-bg .text-purple-500,
.app-bg .text-amber-600 {
  color: #a8743a !important;
}
/* İkon kutucuğu zeminleri bordo-gold tonuna uysun */
.app-bg .bg-indigo-50,
.app-bg .bg-amber-100 {
  background-color: #f0e0cf !important;
}

/* Almanya bayrağı renkli gradient header */
.flag-gradient {
  background: linear-gradient(135deg, #1f2937 0%, #dc2626 50%, #f59e0b 100%);
}

.level-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.level-A1 { background: #dcfce7; color: #166534; }
.level-A2 { background: #d1fae5; color: #065f46; }
.level-B1 { background: #dbeafe; color: #1e40af; }
.level-B2 { background: #ede9fe; color: #5b21b6; }
.level-C1 { background: #fee2e2; color: #991b1b; }

.dialogue-line {
  transition: all 0.2s ease;
}
.dialogue-line:hover {
  transform: translateX(2px);
}

.speaking {
  background: #fef3c7 !important;
  box-shadow: 0 0 0 2px #f59e0b inset;
}

/* Sürükle-bırak sıralama */
.sortable-item {
  cursor: grab;
  transition: all 0.15s ease;
}
.sortable-item:active {
  cursor: grabbing;
}
.sortable-item.dragging {
  opacity: 0.4;
}
.sortable-item.drag-over {
  border-color: var(--brand);
  background: #eef2ff;
}

/* Chat balonları */
.chat-bubble {
  max-width: 85%;
  word-wrap: break-word;
  animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.typing-dot {
  animation: blink 1.4s infinite both;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

.tab-active {
  color: var(--brand);
  border-color: var(--brand);
}

/* === AI sohbet öneri çipleri === */
.suggestion-chip {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid rgba(232, 197, 160, 0.6);
  background: rgba(255, 255, 255, 0.08);
  color: #f3e3e7;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.suggestion-chip:hover {
  transform: scale(1.04);
  background: linear-gradient(135deg, #a8743a 0%, #8a3a45 100%);
  border-color: #c79055;
  color: #fff;
}

/* AI sohbet gönder butonu */
.btn-send {
  background: linear-gradient(135deg, #a8743a 0%, #8a3a45 100%);
  color: #fff;
  padding: 0 1.25rem;
  border-radius: 0.75rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.btn-send:hover { filter: brightness(1.1); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* === Boşluk doldurma şık butonları === */
.gap-option {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid #e2cdd3;
  background: #faf3f5;
  color: #6e5158;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gap-option:hover {
  border-color: #a8743a;
  background: #f3e6d6;
  transform: translateY(-1px);
}
.gap-option-selected {
  background: linear-gradient(135deg, #a8743a 0%, #8a3a45 100%);
  border-color: #c79055;
  color: #fff;
  box-shadow: 0 3px 8px -2px rgba(168, 116, 58, 0.5);
}

/* === Kontrol Et / Sıfırla butonları === */
.btn-check, .btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  border: 1px solid transparent;
}
.btn-check {
  background: linear-gradient(135deg, #a8743a 0%, #8a3a45 100%);
  color: #fff;
  box-shadow: 0 4px 12px -3px rgba(168, 116, 58, 0.55);
}
.btn-check:hover { transform: scale(1.05); box-shadow: 0 6px 16px -3px rgba(168, 116, 58, 0.7); }
.btn-reset {
  background: rgba(255, 255, 255, 0.06);
  color: #f3e3e7;
  border-color: rgba(243, 227, 231, 0.4);
}
.btn-reset:hover { transform: scale(1.05); background: rgba(255, 255, 255, 0.14); border-color: rgba(232, 197, 160, 0.85); }

/* === Oku & Dinle: Tümünü Dinle / Durdur butonları === */
.btn-play, .btn-stop {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  border: 1px solid transparent;
}
/* Tümünü Dinle: dolu bordo-gold gradyan */
.btn-play {
  background: linear-gradient(135deg, #a8743a 0%, #8a3a45 100%);
  color: #fff;
  box-shadow: 0 4px 12px -3px rgba(168, 116, 58, 0.55);
}
.btn-play:hover {
  transform: scale(1.06);
  background: linear-gradient(135deg, #b9824a 0%, #9c4450 100%);
  box-shadow: 0 6px 16px -3px rgba(168, 116, 58, 0.7);
}
/* Durdur: ince çerçeveli şeffaf (koyu zeminde) */
.btn-stop {
  background: rgba(255, 255, 255, 0.06);
  color: #f3e3e7;
  border-color: rgba(243, 227, 231, 0.4);
}
.btn-stop:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(232, 197, 160, 0.85);
}
.btn-play:active, .btn-stop:active { transform: scale(1.0); }

/* === Pill sekme butonları (ince çerçeve + hover şişme efekti) === */
.pill-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 9999px;
  border: 1px solid rgba(243, 227, 231, 0.35); /* ince açık çerçeve */
  color: #f3e3e7;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  backdrop-filter: blur(2px);
}

/* Üzerine gelince: hafifçe şişer + parlak çerçeve + yumuşak gölge */
.pill-tab:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(232, 197, 160, 0.8); /* bordo-gold çerçeve */
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.45);
}

.pill-tab:active {
  transform: scale(1.02);
}

/* Aktif sekme: dolu bordo-gold zemin */
.pill-tab-active {
  background: linear-gradient(135deg, #a8743a 0%, #8a3a45 100%);
  border-color: #c79055;
  color: #fff;
  box-shadow: 0 6px 18px -4px rgba(168, 116, 58, 0.6);
}
.pill-tab-active:hover {
  background: linear-gradient(135deg, #b9824a 0%, #9c4450 100%);
  border-color: #d9a96a;
}

/* Geçiş animasyonu */
.view-enter {
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* HD ses rozeti */
.hd-audio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a8743a 0%, #c79055 100%);
  color: #fff;
  letter-spacing: 0.3px;
}
