@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@600;700;800&family=Noto+Kufi+Arabic:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #0b0b0f;
}

.font-display {
  font-family: 'Sora', 'Inter', sans-serif;
}

:lang(ar) { font-family: 'Noto Kufi Arabic', 'Inter', sans-serif; }
:lang(ar) .font-display { font-family: 'Noto Kufi Arabic', 'Sora', sans-serif; }

:lang(hi) { font-family: 'Noto Sans Devanagari', 'Inter', sans-serif; }
:lang(hi) .font-display { font-family: 'Noto Sans Devanagari', 'Sora', sans-serif; }

:lang(zh) { font-family: 'Noto Sans SC', 'Inter', sans-serif; }
:lang(zh) .font-display { font-family: 'Noto Sans SC', 'Sora', sans-serif; }

/* ===================== RTL (Arabic) ===================== */
[dir="rtl"] .option-btn {
  text-align: right;
}
[dir="rtl"] .option-btn:hover {
  transform: translateX(-4px);
}
[dir="rtl"] .text-left {
  text-align: right;
}
[dir="rtl"] #start-btn svg,
[dir="rtl"] #view-quiz svg {
  transform: scaleX(-1);
}
[dir="rtl"] #lang-menu {
  right: auto;
  left: 0;
}
[dir="ltr"] #lang-menu {
  left: auto;
  right: 0;
}

/* ===================== Language switcher ===================== */
.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #c9c9d4;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
[dir="rtl"] .lang-option {
  text-align: right;
}
.lang-option:hover {
  background: #1c1c26;
  color: #f5f5fa;
}
.lang-option--active {
  color: #ec4899;
  font-weight: 700;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0b0b0f;
}
::-webkit-scrollbar-thumb {
  background: #2a2a37;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a4a;
}

.hidden {
  display: none !important;
}

.gradient-text {
  background: linear-gradient(90deg, #a855f7, #ec4899, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  background: #14141b;
  border: 1px solid #2a2a37;
  border-radius: 14px;
  color: #e9e9f0;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}

.option-btn:hover {
  border-color: #a855f7;
  background: #1c1c26;
  transform: translateX(4px);
}

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

#view-result {
  --accent: #a855f7;
}

.calc-ring {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 4px solid #2a2a37;
  border-top-color: #ec4899;
  animation: calc-spin 0.9s linear infinite;
}

@keyframes calc-spin {
  to { transform: rotate(360deg); }
}

.result-glow {
  box-shadow: 0 0 0 1px var(--accent), 0 30px 80px -30px var(--accent);
}

.ad-slot {
  min-height: 100px;
  border: 1px dashed #2a2a37;
  border-radius: 16px;
  background: rgba(20, 20, 27, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot--inline {
  min-height: 60px;
  margin: 4px 0 2px;
}

.ad-slot__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6b7b;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fade-up .5s cubic-bezier(.2,.8,.2,1) both;
}
