/* ============================================ */
/* ============ متغیرهای رنگ ============ */
/* ============================================ */
:root {
  --bg: #0f0f13;
  --bg-card: #1a1a24;
  --bg-card-hover: #22222e;
  --text: #f0f0f5;
  --text-muted: #9a9ab0;
  --accent: #a855f7;
  --accent-hover: #9333ea;
  --accent-soft: rgba(168, 85, 247, 0.15);
  --border: #2a2a38;
  --shadow: rgba(168, 85, 247, 0.2);
  --success: #22c55e;
  --danger: #ef4444;
  --font-scale: 1;
}

body.light {
  --bg: #f5f5fa;
  --bg-card: #ffffff;
  --bg-card-hover: #faf8ff;
  --text: #1a1a2e;
  --text-muted: #6b6b80;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-soft: rgba(139, 92, 246, 0.1);
  --border: #e5e0f0;
  --shadow: rgba(139, 92, 246, 0.15);
}

body.color-blue  { --accent: #3b82f6; --accent-hover: #2563eb; --accent-soft: rgba(59,130,246,0.15); --shadow: rgba(59,130,246,0.25); }
body.color-green { --accent: #22c55e; --accent-hover: #16a34a; --accent-soft: rgba(34,197,94,0.15);  --shadow: rgba(34,197,94,0.25); }
body.color-pink  { --accent: #ec4899; --accent-hover: #db2777; --accent-soft: rgba(236,72,153,0.15); --shadow: rgba(236,72,153,0.25); }
body.color-orange{ --accent: #f97316; --accent-hover: #ea580c; --accent-soft: rgba(249,115,22,0.15); --shadow: rgba(249,115,22,0.25); }
body.color-red   { --accent: #ef4444; --accent-hover: #dc2626; --accent-soft: rgba(239,68,68,0.15);  --shadow: rgba(239,68,68,0.25); }

body.font-small  { --font-scale: 0.9; }
body.font-medium { --font-scale: 1;   }
body.font-large  { --font-scale: 1.15; }

/* ============================================ */
/* ============ ریست پایه ============ */
/* ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: calc(16px * var(--font-scale));
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* ============================================ */
/* ============ اسپلش اسکرین ============ */
/* ============================================ */
.splash-screen {
  display: none;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #000;
  position: fixed;
  inset: 0;
  z-index: 999;
  transition: opacity 0.8s ease;
}
.splash-screen.active { display: flex; }
.splash-screen.fade-out { opacity: 0; }

.splash-content { text-align: center; animation: splashFadeIn 1.5s ease forwards; }

.splash-title {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(48px, 9vw, 110px);
  letter-spacing: 6px;
  color: #a855f7;
  margin-bottom: 30px;
  text-shadow: 0 0 10px #a855f7, 0 0 30px #a855f7, 0 0 60px #9333ea, 0 0 90px #7c3aed;
  animation: splashGlow 2.5s ease-in-out infinite alternate;
}

.splash-hint {
  font-size: 14px;
  color: #a855f7;
  letter-spacing: 2px;
  opacity: 0;
  animation: hintFadeIn 1s ease 1.8s forwards, hintBlink 1.6s ease-in-out 2.8s infinite;
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: scale(0.9); filter: blur(20px); }
  to   { opacity: 1; transform: scale(1);   filter: blur(0); }
}
@keyframes splashGlow {
  from { text-shadow: 0 0 10px #a855f7, 0 0 30px #a855f7, 0 0 60px #9333ea, 0 0 90px #7c3aed; }
  to   { text-shadow: 0 0 15px #c084fc, 0 0 40px #a855f7, 0 0 80px #a855f7, 0 0 120px #9333ea; }
}
@keyframes hintFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 0.85; transform: translateY(0); }
}
@keyframes hintBlink {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 0.35; }
}

/* ============================================ */
/* ============ منو ============ */
/* ============================================ */
.menu-screen {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  min-height: 100vh;
}
.menu-screen.active { display: flex; }

.menu-box {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 50px 60px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 480px;
  width: 100%;
}
.app-title { font-size: calc(38px * var(--font-scale)); color: var(--accent); margin-bottom: 12px; }
.app-subtitle { color: var(--text-muted); margin-bottom: 36px; font-size: calc(14px * var(--font-scale)); }
.menu-actions { display: flex; flex-direction: column; gap: 14px; }
.btn-large { padding: 16px 24px; font-size: calc(16px * var(--font-scale)); }

/* ============================================ */
/* ============ نوار بالا ============ */
/* ============================================ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { font-size: calc(20px * var(--font-scale)); color: var(--accent); }

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ============================================ */
/* ============ دکمهها ============ */
/* ============================================ */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: calc(14px * var(--font-scale));
  font-weight: 600;
  transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 20px var(--shadow); }

.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-2px); }

.btn-icon {
  background: transparent;
  color: var(--text);
  font-size: calc(20px * var(--font-scale));
  padding: 8px 14px;
  border-radius: 10px;
  min-width: 44px;
}
.btn-icon:hover { background: var(--bg-card-hover); }

/* ============================================ */
/* ============ کانتینر ============ */
/* ============================================ */
.container { padding: 32px; max-width: 1200px; margin: 0 auto; }

/* ============================================ */
/* ============ جستجو ============ */
/* ============================================ */
.search-bar { margin-bottom: 24px; }
.search-bar input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: calc(14px * var(--font-scale));
  transition: border 0.2s, box-shadow 0.2s;
}
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-bar input::placeholder { color: var(--text-muted); }

/* ============================================ */
/* ============ حالت خالی ============ */
/* ============================================ */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state p { margin: 8px 0; font-size: calc(16px * var(--font-scale)); }
.empty-state p:first-child { font-size: calc(22px * var(--font-scale)); color: var(--text); margin-bottom: 12px; }

/* ============================================ */
/* ============ صفحه انتخاب حالت ============ */
/* ============================================ */
.mode-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.mode-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 22px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--text);
  transition: all 0.3s;
  cursor: pointer;
}

.mode-card:hover {
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: 0 20px 50px var(--shadow);
}

.mode-icon { font-size: calc(52px * var(--font-scale)); }
.mode-title { font-size: calc(20px * var(--font-scale)); font-weight: 800; color: var(--accent); }
.mode-desc { font-size: calc(13px * var(--font-scale)); color: var(--text-muted); text-align: center; line-height: 1.7; }

/* ============================================ */
/* ============ انتخاب بخش ============ */
/* ============================================ */
.section-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.choice-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text);
  transition: all 0.25s;
}
.choice-card:hover { border-color: var(--accent); transform: translateY(-6px); box-shadow: 0 15px 40px var(--shadow); }
.choice-icon { font-size: calc(40px * var(--font-scale)); }
.choice-title { font-size: calc(16px * var(--font-scale)); font-weight: 700; }
.choice-count {
  font-size: calc(13px * var(--font-scale));
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 14px;
  border-radius: 20px;
}

/* دکمههای پاک کردن لیست */
.clear-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}
.clear-actions button {
  padding: 12px 22px;
  font-size: calc(13px * var(--font-scale));
  border-radius: 12px;
}
.clear-actions button:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ============================================ */
/* ============ گرید کارتها ============ */
/* ============================================ */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.card-wrapper { display: flex; flex-direction: column; gap: 10px; }

/* ============================================ */
/* ============ کارت فلش (اصلی) ============ */
/* ============================================ */
.card {
  perspective: 1200px;
  -webkit-perspective: 1200px;
  height: 200px;
  cursor: pointer;
  position: relative;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  box-sizing: border-box;
  overflow: hidden;
}

.card-front {
  transform: rotateY(0deg);
  -webkit-transform: rotateY(0deg);
}

.card-back {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  border-color: var(--accent);
  overflow-y: auto;
  justify-content: center;
}

.card-front:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px var(--shadow);
}

.card-word { font-size: calc(26px * var(--font-scale)); font-weight: 700; margin-bottom: 8px; }
.card-hint { font-size: calc(12px * var(--font-scale)); color: var(--text-muted); margin-top: 10px; }
.card-meaning { font-size: calc(20px * var(--font-scale)); color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.card-type {
  font-size: calc(12px * var(--font-scale));
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent);
  color: white;
  margin-bottom: 10px;
}
.card-example { font-size: calc(13px * var(--font-scale)); font-style: italic; margin: 6px 0; line-height: 1.6; }
.card-example-fa { font-size: calc(12px * var(--font-scale)); color: var(--text-muted); margin-top: 4px; }

.card-actions { display: flex; gap: 8px; }
.card-actions button { flex: 1; padding: 8px 10px; font-size: calc(12px * var(--font-scale)); border-radius: 10px; }
.btn-know { background: var(--success); color: white; }
.btn-know:hover { background: #16a34a; transform: translateY(-2px); }
.btn-dontknow { background: var(--danger); color: white; }
.btn-dontknow:hover { background: #dc2626; transform: translateY(-2px); }

.badge-status { font-size: calc(11px * var(--font-scale)); padding: 2px 10px; border-radius: 20px; display: inline-block; margin-bottom: 6px; }
.badge-known { background: var(--success); color: white; }
.badge-unknown { background: var(--danger); color: white; }

/* ============================================ */
/* ============ دکمه بلندگو ============ */
/* ============================================ */
.speak-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 5;
  padding: 0;
}
.speak-btn:hover { background: var(--accent-hover); transform: scale(1.15); }
.speak-btn:active { transform: scale(0.95); }

/* ============================================ */
/* ============ حالت مطالعه ============ */
/* ============================================ */
.study-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px;
  padding-top: 20px;
}
.study-container.hidden { display: none; }

.study-progress {
  font-size: calc(13px * var(--font-scale));
  color: var(--text-muted);
  background: var(--accent-soft);
  padding: 6px 16px;
  border-radius: 20px;
}

.study-card {
  perspective: 1500px;
  -webkit-perspective: 1500px;
  height: 340px;
  min-height: 340px;
  margin-bottom: 28px;
  cursor: pointer;
  position: relative;
}

.study-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.study-card.flipped .study-card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.study-card-front,
.study-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  box-sizing: border-box;
  overflow: hidden;
}

.study-card-front {
  border-color: var(--accent);
  box-shadow: 0 10px 50px var(--shadow);
  transform: rotateY(0deg);
  -webkit-transform: rotateY(0deg);
}

.study-card-back {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  border-color: var(--accent);
  overflow-y: auto;
  justify-content: center;
}

.study-word {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.study-hint { font-size: 14px; color: var(--text-muted); }

.study-type {
  font-size: 13px;
  padding: 5px 16px;
  border-radius: 20px;
  background: var(--accent);
  color: white;
  margin-bottom: 18px;
}
.study-meaning {
  font-size: clamp(24px, 4vw, 36px);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 24px;
}
.study-example {
  font-size: calc(16px * var(--font-scale));
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 8px;
  color: var(--text);
}
.study-example-fa {
  font-size: calc(14px * var(--font-scale));
  color: var(--text-muted);
  line-height: 1.8;
}

.study-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.btn-know-large, .btn-dontknow-large, .btn-flip-large {
  padding: 14px 16px;
  font-size: calc(14px * var(--font-scale));
  border-radius: 12px;
}
.btn-know-large { background: var(--success); color: white; }
.btn-know-large:hover { background: #16a34a; transform: translateY(-2px); }
.btn-dontknow-large { background: var(--danger); color: white; }
.btn-dontknow-large:hover { background: #dc2626; transform: translateY(-2px); }
.btn-flip-large { background: var(--accent); color: white; }
.btn-flip-large:hover { background: var(--accent-hover); transform: translateY(-2px); }

.study-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

#studySpeakBtn {
  font-size: 22px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  transition: all 0.2s;
}
#studySpeakBtn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

/* ============================================ */
/* ============ پایان مطالعه ============ */
/* ============================================ */
.study-end-box {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 20px 60px var(--shadow);
}
.study-end-icon { font-size: 64px; margin-bottom: 16px; }
.study-end-box h2 {
  font-size: calc(28px * var(--font-scale));
  color: var(--accent);
  margin-bottom: 8px;
}
.study-end-text {
  color: var(--text-muted);
  font-size: calc(14px * var(--font-scale));
  margin-bottom: 28px;
}
.study-end-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-num {
  font-size: calc(24px * var(--font-scale));
  font-weight: 800;
  color: var(--accent);
}
.stat-label { font-size: calc(12px * var(--font-scale)); color: var(--text-muted); }

.study-end-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================ */
/* ============ تنظیمات کوییز ============ */
/* ============================================ */
.quiz-setup-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 600px;
  margin: 40px auto;
}
.setup-group { margin-bottom: 28px; }
.setup-group h3 {
  color: var(--accent);
  font-size: calc(15px * var(--font-scale));
  margin-bottom: 14px;
}
.setup-options { display: flex; flex-wrap: wrap; gap: 10px; }
.setup-btn {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
  transition: all 0.2s;
}
.setup-btn small {
  font-size: 0.8em;
  opacity: 0.7;
  font-weight: 500;
}
.setup-btn:hover { border-color: var(--accent); color: var(--accent); }
.setup-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 8px 20px var(--shadow);
}
#startQuizBtn { width: 100%; margin-top: 20px; }

/* ============================================ */
/* ============ صفحه کوییز ============ */
/* ============================================ */
.quiz-progress {
  font-size: calc(13px * var(--font-scale));
  color: var(--text-muted);
  background: var(--accent-soft);
  padding: 6px 16px;
  border-radius: 20px;
}
.quiz-container { max-width: 700px; margin: 0 auto; padding: 32px 24px; }

.timer-bar-wrapper {
  width: 100%;
  height: 10px;
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.timer-bar {
  height: 100%;
  background: var(--accent);
  width: 100%;
  transition: width 1s linear, background 0.3s;
  border-radius: 10px;
}
.timer-bar.warning { background: #f59e0b; }
.timer-bar.danger {
  background: var(--danger);
  animation: pulse 0.6s infinite alternate;
}
@keyframes pulse {
  from { opacity: 1; }
  to   { opacity: 0.6; }
}
.timer-text {
  text-align: center;
  font-size: calc(22px * var(--font-scale));
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 28px;
  font-variant-numeric: tabular-nums;
}
.timer-text.danger { color: var(--danger); }

.quiz-question-box {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 10px 40px var(--shadow);
}
.quiz-question-label {
  font-size: calc(13px * var(--font-scale));
  color: var(--text-muted);
  margin-bottom: 12px;
}
.quiz-question-word {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
}

.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  color: var(--text);
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: inherit;
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--shadow);
}
.quiz-option:disabled { cursor: default; }
.quiz-option.correct { background: var(--success); color: white; border-color: var(--success); }
.quiz-option.wrong { background: var(--danger); color: white; border-color: var(--danger); }

/* دکمه تکرار صدا توی کوییز */
.quiz-speak-btn {
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  margin: 0 auto 16px;
}
.quiz-speak-btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 10px 30px var(--shadow);
}
.quiz-speak-btn:active { transform: scale(0.95); }
.quiz-speak-btn.playing { animation: soundPulse 0.8s ease-in-out infinite; }

@keyframes soundPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50%      { box-shadow: 0 0 0 20px transparent; }
}

/* ============================================ */
/* ============ نتیجه کوییز ============ */
/* ============================================ */
.quiz-result-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
}
.quiz-result-box {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 26px;
  padding: 48px 32px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 25px 70px var(--shadow);
}
.result-icon { font-size: 72px; margin-bottom: 16px; }
.result-title {
  font-size: calc(28px * var(--font-scale));
  color: var(--accent);
  margin-bottom: 32px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.result-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result-num {
  font-size: calc(28px * var(--font-scale));
  font-weight: 800;
  color: var(--accent);
}
.result-num.result-correct { color: var(--success); }
.result-num.result-wrong { color: var(--danger); }
.result-label { font-size: calc(12px * var(--font-scale)); color: var(--text-muted); }
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.result-actions button { flex: 1; min-width: 140px; }

/* ============================================ */
/* ============ تنظیمات ============ */
/* ============================================ */
.settings-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
}
.settings-group h3 {
  color: var(--accent);
  font-size: calc(15px * var(--font-scale));
  margin-bottom: 16px;
}
.settings-group.danger { border-color: rgba(239,68,68,0.4); }
.settings-group.danger h3 { color: var(--danger); }

.color-options, .font-options, .theme-options { display: flex; flex-wrap: wrap; gap: 12px; }
.color-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: all 0.2s;
  padding: 0;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.active {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 5px var(--accent);
}
.font-btn, .theme-btn {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 20px;
}
.font-btn:hover, .theme-btn:hover { border-color: var(--accent); }
.font-btn.active, .theme-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* تاگلهای تنظیمات */
.toggle-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  user-select: none;
}
.toggle-row:hover { border-color: var(--accent); }
.toggle-row > span:first-child {
  font-size: calc(14px * var(--font-scale));
  color: var(--text);
  font-weight: 600;
}
.toggle-input { display: none; }
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--border);
  border-radius: 20px;
  transition: background 0.3s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s, right 0.3s;
}
.toggle-input:checked ~ .toggle-switch { background: var(--accent); }
.toggle-input:checked ~ .toggle-switch::after { transform: translateX(-22px); }

/* ============================================ */
/* ============ مودال ============ */
/* ============================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(6px);
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-box.small { max-width: 380px; }
.modal-box h2 {
  color: var(--accent);
  margin-bottom: 20px;
  font-size: calc(20px * var(--font-scale));
}
.confirm-message {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.7;
}
.modal-box label {
  display: block;
  margin-bottom: 14px;
  font-size: calc(13px * var(--font-scale));
  color: var(--text-muted);
}
.modal-box textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: calc(14px * var(--font-scale));
  resize: vertical;
  min-height: 60px;
}
.modal-box textarea:focus { outline: none; border-color: var(--accent); }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ============================================ */
/* ============ اسکرولبار ============ */
/* ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ============================================ */
/* ============ تم گاثیک 🦇 ============ */
/* ============================================ */
body.gothic {
  --bg: #0a0505;
  --bg-card: #140a0a;
  --bg-card-hover: #1e0f0f;
  --text: #d4c5a0;
  --text-muted: #8a7a5a;
  --accent: #8b0000;
  --accent-hover: #a80000;
  --accent-soft: rgba(139, 0, 0, 0.2);
  --border: #3a1f1f;
  --shadow: rgba(139, 0, 0, 0.4);
  --success: #4a7c4a;
  --danger: #a80000;
}

body.gothic {
  font-family: 'Cinzel', 'Segoe UI', serif;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(139, 0, 0, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 70%, rgba(139, 0, 0, 0.12) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 90%, rgba(90, 0, 0, 0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 10% 80%, rgba(139, 0, 0, 0.1) 0%, transparent 30%),
    radial-gradient(ellipse at center, #1a0a0a 0%, #0a0505 60%, #000000 100%);
  background-attachment: fixed;
  position: relative;
}

body.gothic::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

body.gothic > * { position: relative; z-index: 1; }

body.gothic .app-title,
body.gothic .topbar h1 {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(139, 0, 0, 0.8), 0 0 20px rgba(139, 0, 0, 0.5), 2px 2px 0 rgba(0, 0, 0, 0.8);
}

body.gothic .app-title { font-size: calc(42px * var(--font-scale)); }

body.gothic .menu-box,
body.gothic .card-front,
body.gothic .card-back,
body.gothic .choice-card,
body.gothic .mode-card,
body.gothic .study-card-front,
body.gothic .study-card-back,
body.gothic .quiz-setup-box,
body.gothic .quiz-question-box,
body.gothic .quiz-result-box,
body.gothic .settings-group,
body.gothic .modal-box,
body.gothic .study-end-box {
  background: linear-gradient(135deg, rgba(20, 10, 10, 0.95) 0%, rgba(10, 5, 5, 0.98) 100%);
  border: 2px solid #3a1f1f;
  box-shadow: inset 0 0 30px rgba(139, 0, 0, 0.15), 0 10px 40px rgba(0, 0, 0, 0.7);
  position: relative;
}

body.gothic .menu-box::before,
body.gothic .quiz-result-box::before,
body.gothic .study-end-box::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(139, 0, 0, 0.3);
  border-radius: inherit;
  pointer-events: none;
}

body.gothic .btn-primary {
  background: linear-gradient(180deg, #8b0000 0%, #5c0000 100%);
  border: 1px solid #a80000;
  color: #f0e0c0;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
body.gothic .btn-primary:hover {
  background: linear-gradient(180deg, #a80000 0%, #8b0000 100%);
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.6), 0 0 40px rgba(139, 0, 0, 0.3);
}

body.gothic .btn-secondary {
  background: transparent;
  border: 1px solid #5c1f1f;
  color: #d4c5a0;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
}
body.gothic .btn-secondary:hover {
  border-color: #8b0000;
  background: rgba(139, 0, 0, 0.15);
  color: #f0e0c0;
}

body.gothic .topbar {
  background: linear-gradient(180deg, #140a0a 0%, #0a0505 100%);
  border-bottom: 1px solid #3a1f1f;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.gothic .card-front,
body.gothic .card-back {
  border: 2px solid #4a2a2a;
  background: radial-gradient(ellipse at center, rgba(20, 10, 10, 0.95) 0%, rgba(8, 4, 4, 0.98) 100%);
}
body.gothic .card-front:hover {
  border-color: #8b0000;
  box-shadow: 0 0 25px rgba(139, 0, 0, 0.5), inset 0 0 30px rgba(139, 0, 0, 0.1);
}
body.gothic .card-back { border-color: #8b0000; }

body.gothic .card-word {
  font-family: 'Cinzel', serif;
  color: #d4c5a0;
  text-shadow: 0 0 10px rgba(139, 0, 0, 0.6), 0 0 20px rgba(139, 0, 0, 0.3);
  letter-spacing: 2px;
}
body.gothic .card-meaning { color: #c9a870; text-shadow: 0 0 8px rgba(139, 0, 0, 0.5); }
body.gothic .card-type {
  background: linear-gradient(180deg, #8b0000, #5c0000);
  color: #f0e0c0;
  letter-spacing: 2px;
  border: 1px solid #a80000;
}

body.gothic .speak-btn {
  background: linear-gradient(180deg, #5c0000, #3a0000);
  border: 1px solid #8b0000;
  color: #f0e0c0;
}
body.gothic .speak-btn:hover {
  background: linear-gradient(180deg, #8b0000, #5c0000);
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.7);
}

body.gothic .modal { background: rgba(0, 0, 0, 0.9); }
body.gothic .modal-box { border: 2px solid #5c1f1f; }
body.gothic .modal-box h2 { color: #c9a870; text-shadow: 0 0 10px rgba(139, 0, 0, 0.6); letter-spacing: 2px; }
body.gothic .modal-box textarea {
  background: #0a0505;
  border: 1px solid #3a1f1f;
  color: #d4c5a0;
  font-family: 'Cinzel', serif;
}
body.gothic .modal-box textarea:focus { border-color: #8b0000; box-shadow: 0 0 15px rgba(139, 0, 0, 0.4); }
body.gothic .modal-box label { color: #8a7a5a; font-family: 'Cinzel', serif; letter-spacing: 1px; }

body.gothic .quiz-question-word {
  font-family: 'Cinzel', serif;
  color: #d4c5a0;
  text-shadow: 0 0 15px rgba(139, 0, 0, 0.7), 0 0 30px rgba(139, 0, 0, 0.4);
  letter-spacing: 4px;
}
body.gothic .quiz-option {
  background: linear-gradient(135deg, #140a0a 0%, #0a0505 100%);
  border: 2px solid #3a1f1f;
  color: #d4c5a0;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
}
body.gothic .quiz-option:hover:not(:disabled) {
  border-color: #8b0000;
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.5), inset 0 0 20px rgba(139, 0, 0, 0.1);
}
body.gothic .quiz-option.correct {
  background: linear-gradient(180deg, #4a7c4a 0%, #2a4a2a 100%);
  border-color: #6aa86a;
  color: #f0e0c0;
}
body.gothic .quiz-option.wrong {
  background: linear-gradient(180deg, #8b0000 0%, #5c0000 100%);
  border-color: #a80000;
  color: #f0e0c0;
}

body.gothic .timer-bar-wrapper { background: #0a0505; border: 1px solid #3a1f1f; height: 14px; }
body.gothic .timer-bar {
  background: linear-gradient(90deg, #8b0000 0%, #c40000 50%, #8b0000 100%);
  box-shadow: 0 0 15px rgba(200, 0, 0, 0.6), inset 0 0 10px rgba(255, 0, 0, 0.3);
}
body.gothic .timer-bar.warning { background: linear-gradient(90deg, #8b5a00 0%, #c48000 50%, #8b5a00 100%); }
body.gothic .timer-bar.danger {
  background: linear-gradient(90deg, #c40000 0%, #ff0000 50%, #c40000 100%);
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.8);
}
body.gothic .timer-text {
  color: #c9a870;
  text-shadow: 0 0 15px rgba(139, 0, 0, 0.7);
  font-family: 'Cinzel', serif;
  font-weight: 900;
}
body.gothic .timer-text.danger {
  color: #ff2020;
  text-shadow: 0 0 20px rgba(255, 0, 0, 0.9);
  animation: bloodPulse 0.6s infinite alternate;
}
@keyframes bloodPulse {
  from { text-shadow: 0 0 20px rgba(255, 0, 0, 0.9); }
  to   { text-shadow: 0 0 35px rgba(255, 0, 0, 1), 0 0 50px rgba(200, 0, 0, 0.8); }
}

body.gothic .quiz-speak-btn {
  background: radial-gradient(circle, #5c0000 0%, #0a0505 100%);
  border: 2px solid #8b0000;
  color: #d4c5a0;
  box-shadow: 0 0 30px rgba(139, 0, 0, 0.5), inset 0 0 20px rgba(139, 0, 0, 0.3);
}
body.gothic .quiz-speak-btn:hover {
  background: radial-gradient(circle, #8b0000 0%, #3a0000 100%);
  box-shadow: 0 0 40px rgba(200, 0, 0, 0.8), inset 0 0 30px rgba(200, 0, 0, 0.4);
}

body.gothic .font-btn,
body.gothic .theme-btn {
  background: linear-gradient(180deg, #140a0a 0%, #0a0505 100%);
  border: 1px solid #3a1f1f;
  color: #d4c5a0;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
}
body.gothic .font-btn.active,
body.gothic .theme-btn.active {
  background: linear-gradient(180deg, #8b0000 0%, #5c0000 100%);
  color: #f0e0c0;
  border-color: #a80000;
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
}

body.gothic .toggle-row {
  background: linear-gradient(180deg, #140a0a 0%, #0a0505 100%);
  border: 1px solid #3a1f1f;
}
body.gothic .toggle-row:hover { border-color: #8b0000; }
body.gothic .toggle-switch { background: #3a1f1f; }
body.gothic .toggle-input:checked ~ .toggle-switch {
  background: #8b0000;
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.6);
}

body.gothic .splash-screen {
  background: radial-gradient(ellipse at center, #1a0a0a 0%, #0a0505 60%, #000000 100%);
}
body.gothic .splash-title {
  font-family: 'Cinzel', serif;
  color: #8b0000;
  text-shadow: 0 0 15px #8b0000, 0 0 40px #5c0000, 0 0 80px #3a0000;
  letter-spacing: 8px;
}
body.gothic .splash-hint { color: #8a7a5a; font-family: 'Cinzel', serif; letter-spacing: 4px; }

body.gothic .choice-card:hover,
body.gothic .mode-card:hover {
  border-color: #8b0000;
  box-shadow: 0 0 30px rgba(139, 0, 0, 0.5), inset 0 0 30px rgba(139, 0, 0, 0.1);
}
body.gothic .mode-title { color: #c9a870; font-family: 'Cinzel', serif; letter-spacing: 2px; }
body.gothic .choice-title { color: #d4c5a0; font-family: 'Cinzel', serif; letter-spacing: 1px; }
body.gothic .choice-count {
  color: #c9a870;
  background: rgba(139, 0, 0, 0.2);
  border: 1px solid rgba(139, 0, 0, 0.4);
}

body.gothic .study-word {
  font-family: 'Cinzel', serif;
  color: #d4c5a0;
  text-shadow: 0 0 20px rgba(139, 0, 0, 0.8), 0 0 40px rgba(139, 0, 0, 0.5);
  letter-spacing: 3px;
}
body.gothic .study-meaning { color: #c9a870; text-shadow: 0 0 15px rgba(139, 0, 0, 0.6); }
body.gothic .study-type {
  background: linear-gradient(180deg, #8b0000, #5c0000);
  color: #f0e0c0;
  border: 1px solid #a80000;
  letter-spacing: 2px;
}

body.gothic .result-title {
  font-family: 'Cinzel', serif;
  color: #c9a870;
  text-shadow: 0 0 20px rgba(139, 0, 0, 0.7);
  letter-spacing: 2px;
}
body.gothic .result-num { font-family: 'Cinzel', serif; font-weight: 900; }

body.gothic ::-webkit-scrollbar { width: 10px; }
body.gothic ::-webkit-scrollbar-track { background: #0a0505; }
body.gothic ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5c0000 0%, #3a0000 100%);
  border-radius: 10px;
  border: 1px solid #8b0000;
}
body.gothic ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #8b0000 0%, #5c0000 100%);
}

body.gothic .clear-actions button:hover {
  border-color: #a80000;
  color: #ff4040;
  background: rgba(139, 0, 0, 0.15);
}

/* ============================================ */
/* ============ فیکس نهایی چرخش کارتها ============ */
/* ============================================ */

.card {
  position: relative !important;
  width: 100% !important;
  height: 200px !important;
  perspective: 1200px !important;
  -webkit-perspective: 1200px !important;
}

.card-inner {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  transform-style: preserve-3d !important;
  -webkit-transform-style: preserve-3d !important;
  transition: transform 0.6s !important;
}

.card.flipped .card-inner {
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
}

.card-front,
.card-back {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  border-radius: 16px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
  overflow: hidden !important;
}

.card-front {
  transform: rotateY(0deg) !important;
  -webkit-transform: rotateY(0deg) !important;
}

.card-back {
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
  border-color: var(--accent) !important;
}

.study-card {
  position: relative !important;
  width: 100% !important;
  height: 340px !important;
  min-height: 340px !important;
  perspective: 1500px !important;
  -webkit-perspective: 1500px !important;
}

.study-card-inner {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  transform-style: preserve-3d !important;
  -webkit-transform-style: preserve-3d !important;
  transition: transform 0.7s !important;
}

.study-card.flipped .study-card-inner {
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
}

.study-card-front,
.study-card-back {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 40px !important;
  box-sizing: border-box !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  border-radius: 24px !important;
  background: var(--bg-card) !important;
  border: 2px solid var(--border) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25) !important;
  overflow: hidden !important;
}

.study-card-front {
  transform: rotateY(0deg) !important;
  -webkit-transform: rotateY(0deg) !important;
  border-color: var(--accent) !important;
}

.study-card-back {
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
  border-color: var(--accent) !important;
}

/* ============================================ */
/* ============ کلمهی روز ============ */
/* ============================================ */
.word-of-day {
  margin-top: 30px;
  padding: 24px 20px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 100%);
  border: 2px solid var(--accent);
  border-radius: 18px;
  position: relative;
  transition: all 0.3s;
  cursor: pointer;
}

.word-of-day:hover {
  box-shadow: 0 10px 40px var(--shadow);
  transform: translateY(-3px);
}

.wod-title {
  font-size: calc(13px * var(--font-scale));
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.wod-word {
  font-size: calc(30px * var(--font-scale));
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.wod-meaning {
  font-size: calc(18px * var(--font-scale));
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.wod-example,
.wod-example-fa {
  font-size: calc(12px * var(--font-scale));
  color: var(--text-muted);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
}

.wod-example { font-style: italic; color: var(--text); }

.word-of-day.expanded .wod-example,
.word-of-day.expanded .wod-example-fa {
  max-height: 200px;
  opacity: 1;
  margin-top: 6px;
}

.word-of-day.expanded .wod-example { margin-top: 16px; }

.wod-speak {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.wod-speak:hover {
  background: var(--accent-hover);
  transform: scale(1.15);
}

.wod-speak:active {
  transform: scale(0.95);
}

/* گاثیک */
body.gothic .word-of-day {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.15) 0%, rgba(10, 5, 5, 0.95) 100%);
  border-color: #8b0000;
}

body.gothic .word-of-day:hover {
  box-shadow: 0 10px 40px rgba(139, 0, 0, 0.5), inset 0 0 20px rgba(139, 0, 0, 0.2);
}

body.gothic .wod-title {
  font-family: 'Cinzel', serif;
  color: #c9a870;
  letter-spacing: 3px;
}

body.gothic .wod-word {
  font-family: 'Cinzel', serif;
  color: #d4c5a0;
  text-shadow: 0 0 15px rgba(139, 0, 0, 0.6);
  letter-spacing: 3px;
}

body.gothic .wod-meaning {
  color: #c9a870;
  text-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

body.gothic .wod-example {
  color: #d4c5a0;
}

body.gothic .wod-example-fa {
  color: #8a7a5a;
}

body.gothic .wod-speak {
  background: linear-gradient(180deg, #8b0000, #5c0000);
  border: 1px solid #a80000;
}

body.gothic .wod-speak:hover {
  background: linear-gradient(180deg, #a80000, #8b0000);
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.7);
}

/* ============================================ */
/* ============ جفتکلمههای گیجکننده ============ */
/* ============================================ */

.confusables-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.confusable-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
}

.confusable-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 35px var(--shadow);
}

.confusable-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.confusable-word {
  font-size: calc(20px * var(--font-scale));
  font-weight: 800;
  color: var(--accent);
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: 10px;
  letter-spacing: 1px;
}

.confusable-vs {
  font-size: calc(16px * var(--font-scale));
  color: var(--text-muted);
  font-weight: 700;
}

.confusable-preview {
  text-align: center;
  font-size: calc(13px * var(--font-scale));
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.7;
}

.confusable-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding-top: 0;
}

.confusable-card.expanded .confusable-details {
  max-height: 800px;
  opacity: 1;
  margin-top: 16px;
  padding-top: 16px;
}

.confusable-detail-item {
  margin-bottom: 18px;
}

.confusable-detail-item:last-child {
  margin-bottom: 0;
}

.confusable-detail-word {
  font-size: calc(16px * var(--font-scale));
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.confusable-detail-type {
  font-size: calc(11px * var(--font-scale));
  background: var(--accent);
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  margin-right: 8px;
  display: inline-block;
}

.confusable-detail-meaning {
  font-size: calc(14px * var(--font-scale));
  color: var(--text);
  font-weight: 700;
  margin-bottom: 8px;
}

.confusable-detail-example {
  font-size: calc(13px * var(--font-scale));
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 4px;
}

.confusable-detail-example-fa {
  font-size: calc(12px * var(--font-scale));
  color: var(--text-muted);
  line-height: 1.7;
}

.confusable-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.confusable-actions button {
  flex: 1;
  padding: 8px 10px;
  font-size: calc(12px * var(--font-scale));
  border-radius: 10px;
}

/* بج وضعیت روی کارت */
.confusable-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: calc(11px * var(--font-scale));
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
}

.confusable-status-badge.known {
  background: var(--success);
  color: white;
}

.confusable-status-badge.unknown {
  background: var(--danger);
  color: white;
}

/* گاثیک */
body.gothic .confusable-card {
  background: linear-gradient(135deg, rgba(20, 10, 10, 0.95) 0%, rgba(10, 5, 5, 0.98) 100%);
  border-color: #3a1f1f;
}

body.gothic .confusable-card:hover {
  border-color: #8b0000;
  box-shadow: 0 12px 35px rgba(139, 0, 0, 0.5), inset 0 0 30px rgba(139, 0, 0, 0.1);
}

body.gothic .confusable-word {
  background: rgba(139, 0, 0, 0.2);
  border: 1px solid rgba(139, 0, 0, 0.4);
  color: #c9a870;
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
}

body.gothic .confusable-detail-word {
  color: #c9a870;
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
}

body.gothic .confusable-detail-type {
  background: linear-gradient(180deg, #8b0000, #5c0000);
  border: 1px solid #a80000;
}

body.gothic .confusable-detail-example-fa {
  color: #8a7a5a;
}

/* موبایل */
@media (max-width: 600px) {
  .confusables-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================ */
/* ============ دکمه تلفظ جفتکلمه ============ */
/* ============================================ */
.conf-speak-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  margin-left: 6px;
  vertical-align: middle;
}

.conf-speak-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.15);
}

.conf-speak-btn:active {
  transform: scale(0.95);
}

body.gothic .conf-speak-btn {
  background: linear-gradient(180deg, #5c0000, #3a0000);
  border: 1px solid #8b0000;
  color: #f0e0c0;
}

body.gothic .conf-speak-btn:hover {
  background: linear-gradient(180deg, #8b0000, #5c0000);
  box-shadow: 0 0 15px rgba(139, 0, 0, 0.6);
}

/* ============================================ */
/* ============ امضای Sayzare ============ */
/* ============================================ */

/* امضای پایین منو */
.menu-footer {
  margin-top: 24px;
  font-size: calc(12px * var(--font-scale));
  color: var(--text-muted);
  letter-spacing: 2px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.menu-footer:hover {
  opacity: 1;
  color: var(--accent);
}

/* امضای اسپلش */
.splash-credit {
  font-size: 12px;
  color: #a855f7;
  letter-spacing: 3px;
  margin-top: 40px;
  opacity: 0;
  animation: hintFadeIn 1s ease 2.5s forwards;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

body.gothic .splash-credit {
  color: #8b0000;
  font-family: 'Cinzel', serif;
  letter-spacing: 4px;
  text-shadow: 0 0 15px rgba(139, 0, 0, 0.8);
}

/* ============================================ */
/* ============ درباره برنامه ============ */
/* ============================================ */
.about-group {
  text-align: center;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

.about-logo {
  font-size: calc(48px * var(--font-scale));
  margin-bottom: 8px;
  filter: drop-shadow(0 0 15px var(--accent-soft));
}

.about-name {
  font-size: calc(24px * var(--font-scale));
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 3px;
  text-shadow: 0 0 15px var(--accent-soft);
}

.about-version {
  font-size: calc(13px * var(--font-scale));
  color: var(--text-muted);
  letter-spacing: 1px;
}

.about-credit {
  margin-top: 12px;
  font-size: calc(14px * var(--font-scale));
  color: var(--text);
  letter-spacing: 2px;
  padding: 6px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* گاثیک */
body.gothic .about-name {
  font-family: 'Cinzel', serif;
  color: #c9a870;
  text-shadow: 0 0 20px rgba(139, 0, 0, 0.8);
}

body.gothic .about-credit {
  color: #d4c5a0;
  border-color: #3a1f1f;
  letter-spacing: 3px;
}

body.gothic .menu-footer {
  color: #8a7a5a;
  font-family: 'Cinzel', serif;
  letter-spacing: 3px;
}

body.gothic .menu-footer:hover {
  color: #c9a870;
}

/* دکمه ورود اسپلش */
.splash-btn {
  margin-top: 30px;
  padding: 16px 50px;
  font-size: 18px;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 14px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  border: none;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.5);
  transition: all 0.3s;
}

.splash-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(168, 85, 247, 0.7);
}

.splash-btn:active {
  transform: translateY(0);
}

body.gothic .splash-btn {
  background: linear-gradient(135deg, #8b0000, #5c0000);
  box-shadow: 0 10px 30px rgba(139, 0, 0, 0.6);
  font-family: 'Cinzel', serif;
}