/* Base layout & typography */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: #f0f4f9;
  background-image: 
    radial-gradient(at 10% 15%, #e0edff 0px, transparent 55%),
    radial-gradient(at 90% 85%, #e8f8f0 0px, transparent 50%),
    radial-gradient(at 50% 50%, #f0f4f9 0px, transparent 100%);
  background-attachment: fixed;
}

/* Top Navbar Frosted Glass */
.top-navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}

/* Category Cards */
.category-card {
  background-color: #ffffff;
  border-width: 0;
  border-left-width: 4px;
  border-left-style: solid;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -6px rgba(15, 23, 42, 0.12), 0 6px 10px -2px rgba(15, 23, 42, 0.04);
}

.category-card[data-cat="all"] {
  border-left-color: #0284c7;
}

.category-card[data-cat="vocab"] {
  border-left-color: #10b981;
}

.category-card[data-cat="grammar"] {
  border-left-color: #6366f1;
}

.category-card[data-cat="extra"] {
  border-left-color: #f59e0b;
}

/* Card Icon Sizing: 64px, 20px squircle radius, subtle inner glow */
.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.category-card[data-cat="all"] .card-icon {
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.4), 0 8px 16px -4px rgba(2, 132, 199, 0.35);
}

.category-card[data-cat="vocab"] .card-icon {
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.4), 0 8px 16px -4px rgba(16, 185, 129, 0.35);
}

.category-card[data-cat="grammar"] .card-icon {
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.4), 0 8px 16px -4px rgba(99, 102, 241, 0.35);
}

.category-card[data-cat="extra"] .card-icon {
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.4), 0 8px 16px -4px rgba(245, 158, 11, 0.35);
}

/* Learning Tip Banner */
.tip-banner {
  background-color: #fefce8;
  border: 1px solid #fef08a;
  color: #78350f;
}

.tip-badge {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
}

.font-sans, [dir="ltr"] {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Animations */
@keyframes popIn {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
  0% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes subtleShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.animate-pop {
  animation: popIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-shake {
  animation: subtleShake 0.25s ease-in-out;
}

/* Option Button Styles */
.option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.875rem;
  border-radius: 1rem;
  border-width: 2px;
  border-style: solid;
  border-color: #E2E8F0;
  background-color: #FFFFFF;
  color: #1E293B;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  transition: all 0.18s ease-in-out;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.option-btn:hover:not(:disabled) {
  border-color: #38BDF8;
  background-color: #F0F9FF;
  transform: translateY(-1px);
}

.option-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.option-btn.correct {
  border-color: #10B981 !important;
  background-color: #ECFDF5 !important;
  color: #065F46 !important;
  box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.25);
}

.option-btn.wrong {
  border-color: #F43F5E !important;
  background-color: #FFF1F2 !important;
  color: #9F1239 !important;
  box-shadow: 0 4px 12px -2px rgba(244, 63, 94, 0.2);
}

.option-btn:disabled {
  cursor: default;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Vector Art SVGs inside illustrations */
.illustration-svg {
  width: 100%;
  height: 100%;
  max-height: 180px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.06));
  transition: transform 0.3s ease;
}

.illustration-svg:hover {
  transform: scale(1.02);
}