/* =====================================================================
   ENGLISHLAB — 4 TEMA AKSEN + DARK MODE HARMONIS + DYNAMIC ISLAND
   ===================================================================== */
:root, [data-theme="oxford"] {
  --accent: #4f46e5;
  --accent-strong: #2563eb;
  --accent-soft: rgba(79, 70, 229, 0.14);
  --accent-border: rgba(79, 70, 229, 0.35);
  --accent-glow: rgba(79, 70, 229, 0.28);
}
[data-theme="british"] {
  --accent: #059669;
  --accent-strong: #0d9488;
  --accent-soft: rgba(5, 150, 105, 0.14);
  --accent-border: rgba(5, 150, 105, 0.35);
  --accent-glow: rgba(5, 150, 105, 0.28);
}
[data-theme="sunset"] {
  --accent: #d97706;
  --accent-strong: #ea580c;
  --accent-soft: rgba(217, 119, 6, 0.15);
  --accent-border: rgba(217, 119, 6, 0.38);
  --accent-glow: rgba(217, 119, 6, 0.28);
}
[data-theme="plum"] {
  --accent: #7c3aed;
  --accent-strong: #db2777;
  --accent-soft: rgba(124, 58, 237, 0.14);
  --accent-border: rgba(124, 58, 237, 0.35);
  --accent-glow: rgba(124, 58, 237, 0.28);
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  background-image: radial-gradient(circle at top right, var(--accent-soft), transparent 42%);
}

.bg-accent-gradient { background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important; color: #ffffff !important; }
.bg-accent-soft { background-color: var(--accent-soft) !important; }
.text-accent { color: var(--accent) !important; }
.border-accent { border-color: var(--accent-border) !important; }
.shadow-accent { box-shadow: 0 10px 28px -6px var(--accent-glow); }

.glass-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
}
html.dark .glass-card {
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
}

/* Dark Mode Global Overrides agar seluruh kartu, teks, dan input konsisten */
html.dark body {
  background-color: #020617 !important;
  color: #f1f5f9 !important;
}
html.dark .bg-white {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
}
html.dark .bg-slate-50,
html.dark .bg-slate-100 {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700 {
  color: #f1f5f9 !important;
}
html.dark .text-slate-600,
html.dark .text-slate-500,
html.dark .text-slate-400 {
  color: #94a3b8 !important;
}
html.dark .border-slate-200,
html.dark .border-slate-300,
html.dark .border-slate-100,
html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: #1e293b !important;
}
html.dark input,
html.dark select,
html.dark textarea {
  background-color: #020617 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
html.dark .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.14) !important; border-color: rgba(16, 185, 129, 0.3) !important; }
html.dark .text-emerald-700, html.dark .text-emerald-800 { color: #6ee7b7 !important; }
html.dark .bg-amber-50 { background-color: rgba(245, 158, 11, 0.14) !important; border-color: rgba(245, 158, 11, 0.3) !important; }
html.dark .text-amber-800, html.dark .text-amber-900 { color: #fcd34d !important; }
html.dark .bg-indigo-50 { background-color: rgba(99, 102, 241, 0.16) !important; border-color: rgba(99, 102, 241, 0.32) !important; }
html.dark .text-indigo-700, html.dark .text-indigo-800, html.dark .text-indigo-900 { color: #a5b4fc !important; }
html.dark .bg-rose-50 { background-color: rgba(244, 63, 94, 0.14) !important; border-color: rgba(244, 63, 94, 0.3) !important; }
html.dark .text-rose-700, html.dark .text-rose-800 { color: #fda4af !important; }
html.dark .bg-sky-50 { background-color: rgba(14, 165, 233, 0.14) !important; border-color: rgba(14, 165, 233, 0.3) !important; }
html.dark .text-sky-700, html.dark .text-sky-900 { color: #7dd3fc !important; }
html.dark .bg-purple-50 { background-color: rgba(168, 85, 247, 0.14) !important; border-color: rgba(168, 85, 247, 0.3) !important; }
html.dark .text-purple-800 { color: #d8b4fe !important; }

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent-border);
  outline-offset: 1px;
}

/* Dynamic Island Notification */
#dynamic-island {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 9999;
  transform: translate(-50%, -140%) scale(0.84);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.52s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.32s ease;
}
#dynamic-island.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* 3D Flip Flashcard untuk Bank Kata (SRS) */
.flip-card { perspective: 1000px; }
.flip-inner {
  position: relative;
  width: 100%;
  min-height: 150px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-back { transform: rotateY(180deg); }

/* Transisi Halus */
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.view-enter {
  animation: viewFadeIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
