/* استيراد الخطوط الفاخرة من Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;900&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  /* نظام الألوان الفخم - Obsidian & Emerald */
  --bg-gradient: radial-gradient(circle at 50% 50%, #0e1726 0%, #060a12 100%);
  --bg-darker: #04070c;
  --panel-bg: rgba(15, 23, 42, 0.45);
  --panel-border: rgba(16, 185, 129, 0.15);
  --panel-border-hover: rgba(16, 185, 129, 0.3);
  
  --primary: #10b981; /* زمردي مضيء */
  --primary-hover: #34d399;
  --primary-glow: rgba(16, 185, 129, 0.4);
  
  --accent: #f59e0b; /* ذهبي دافئ للكلمات والتقدم */
  --accent-glow: rgba(245, 158, 11, 0.5);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #4b5563;
  
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glow-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  
  --font-ui: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
  --font-quran: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* التصفير والتأسيس */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(0, 0, 0, 0.2);
}

body {
  font-family: var(--font-ui);
  background: var(--bg-darker);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  direction: rtl;
}

/* شريط التمرير المخصص */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* عناصر البناء العام */
header {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(4, 7, 12, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  transform: translateZ(0);
  will-change: transform;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary) 0%, #047857 100%);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  box-shadow: 0 0 15px var(--primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.header-nav {
  display: flex;
  gap: 15px;
}

.btn-nav {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-nav:hover, .btn-nav.active {
  color: var(--primary-hover);
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

/* الحاوية الرئيسية */
main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active {
  display: block;
}

/* شاشة الإعداد والتحضير */
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 30px;
}

@media (max-width: 992px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
}

.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 25px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, transform 0.3s ease;
  transform: translateZ(0);
  will-change: transform, border-color;
}

.glass-panel:hover {
  border-color: var(--panel-border-hover);
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

.panel-title i {
  color: var(--primary);
}

/* عناصر الإدخال والتحكم */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

select, input[type="text"], input[type="number"] {
  width: 100%;
  background: rgba(4, 7, 12, 0.5);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  padding: 12px 15px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 15px;
  outline: none;
  transition: var(--transition-smooth);
}

select:focus, input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* أزرار التكرار والإعداد */
.counter-control {
  display: flex;
  align-items: center;
  background: rgba(4, 7, 12, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  overflow: hidden;
  justify-content: space-between;
}

.counter-btn {
  background: rgba(16, 185, 129, 0.1);
  border: none;
  color: #fff;
  width: 45px;
  height: 45px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.counter-btn:hover {
  background: var(--primary);
  color: var(--bg-darker);
}

.counter-val {
  font-size: 16px;
  font-weight: 700;
  width: 50px;
  text-align: center;
}

/* أشرطة التمرير الأنيقة Sliders */
.slider-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 8px var(--primary-glow);
  transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* زر البدء الرئيسي */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
  border: none;
  color: #fff;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-ui);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, var(--primary-hover) 0%, #047857 100%);
}

.btn-primary:active {
  transform: translateY(0);
}

/* لوحة المعاينة للآيات */
.preview-container {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.preview-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.preview-placeholder i {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.3;
}

.preview-ayahs {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 5px;
}

.preview-ayah-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 15px;
  transition: var(--transition-smooth);
}

.preview-ayah-card:hover {
  background: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.1);
}

.ayah-num {
  font-size: 12px;
  color: var(--primary);
  font-weight: bold;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
}

.ayah-text-preview {
  font-family: var(--font-quran);
  font-size: 20px;
  line-height: 2;
  color: var(--text-main);
  display: inline;
}

/* شاشة الجلسة النشطة */
.session-container {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  min-height: calc(100vh - 160px);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* المخطط الزمني للخطوات (Timeline) */
.timeline-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(4, 7, 12, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 15px;
  padding: 15px 20px;
  overflow-x: auto;
  min-width: 0;
}

.timeline-step-dot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 70px;
  opacity: 0.4;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.timeline-step-dot.active {
  opacity: 1;
  transform: scale(1.08);
}

.timeline-step-dot.completed {
  opacity: 0.7;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-darker);
  transition: var(--transition-smooth);
}

.timeline-step-dot.active .step-circle {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-darker);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-step-dot.completed .step-circle {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary-hover);
}

.step-lbl {
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

/* شاشة عرض النص الكبرى */
.quran-display-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  min-height: 350px;
}

.active-step-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary-hover);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.quran-text-container {
  font-family: var(--font-quran);
  font-size: 38px;
  line-height: 2.2;
  max-width: 950px;
  margin: 30px auto;
  word-wrap: break-word;
  white-space: normal;
}

/* الكلمات المنفصلة لتفعيل التظليل */
.word-item {
  display: inline-block;
  margin: 0 4px;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* تظليل الكلمة النشطة حالياً */
.word-item.active {
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
  font-weight: bold;
  transform: scale(1.03);
}

/* إمكانية التقسيم اليدوي بالضغط */
.word-item.manual-split-mode:hover {
  background: rgba(245, 158, 11, 0.15);
}

.stop-sign-above {
  position: absolute;
  left: -8px;
  top: -10px;
  color: var(--primary);
  font-size: 20px;
  font-weight: bold;
  animation: pulseGlow 2s infinite;
}

/* خط فاصل مرئي للتقسيم بين الكلمات في شاشة الإعداد */
.word-item.split-border {
  border-left: 2px dashed rgba(16, 185, 129, 0.4);
  margin-left: 14px;
  padding-left: 8px;
}

/* الفاصل الزمني الذكي (مؤشر الترديد) */
.smart-pause-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
}

.smart-pause-container.active {
  display: flex;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pause-ring-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}

.pause-ring-svg {
  transform: rotate(-90deg);
  width: 100px;
  height: 100px;
}

.pause-ring-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 8;
}

.pause-ring-circle {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283; /* 2 * PI * r (r=45) */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.05s linear;
}

.pause-seconds {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-hover);
}

.pause-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  animation: pulseText 1.5s infinite;
}

/* أزرار التحكم بالتشغيل السفلى */
.player-controls-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(4, 7, 12, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: 15px;
  padding: 15px 30px;
}

@media (max-width: 768px) {
  .player-controls-panel {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-control {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.btn-control:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--primary);
  color: var(--primary-hover);
  transform: scale(1.05);
}

.btn-control.btn-play-pause {
  width: 65px;
  height: 65px;
  background: var(--primary);
  color: var(--bg-darker);
  border: none;
  font-size: 22px;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-control.btn-play-pause:hover {
  background: var(--primary-hover);
  color: var(--bg-darker);
  transform: scale(1.08);
}

.speed-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.speed-select {
  background: rgba(4, 7, 12, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  cursor: pointer;
}

/* شاشة لوحة التحكم والإحصائيات وجدول المراجعة */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
}

@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.stats-card-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.stat-item-box {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(16, 185, 129, 0.1);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition-smooth);
}

.stat-item-box:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.stat-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-hover);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon.accent-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
}

.stat-info-txt h3 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stat-info-txt p {
  font-size: 13px;
  color: var(--text-muted);
}

/* قائمة المراجعة المتباعدة */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.review-card-item {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.review-card-item:hover {
  background: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.2);
}

.review-info-section h4 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.review-info-section p {
  font-size: 13px;
  color: var(--text-muted);
}

.review-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  margin-top: 5px;
}

.review-badge.due {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.review-badge.waiting {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-hover);
  border: 1px solid var(--panel-border);
}

.review-actions {
  display: flex;
  gap: 10px;
}

.btn-review-now {
  background: var(--primary);
  border: none;
  color: var(--bg-darker);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-review-now:hover {
  background: var(--primary-hover);
  transform: scale(1.03);
}

.btn-delete-review {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-delete-review:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

/* شاشة ختام الجلسة والتقييم */
.completion-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 12, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.completion-modal.active {
  display: flex;
}

.modal-content-panel {
  background: #0b111e;
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 40px;
  max-width: 550px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.completion-icon {
  width: 80px;
  height: 80px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin: 0 auto 20px;
  border: 2px solid var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.modal-content-panel h2 {
  font-size: 24px;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 800;
}

.modal-content-panel p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 25px;
}

.rating-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 12px;
}

.rating-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
}

.rating-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  width: 70px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: var(--transition-smooth);
  color: #ffffff;
}

.rating-btn:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--accent);
}

.rating-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-darker);
  box-shadow: 0 0 15px var(--accent-glow);
}

.rating-btn .score-num {
  font-size: 18px;
  font-weight: bold;
}

.rating-btn .score-lbl {
  font-size: 9px;
  white-space: nowrap;
}

.modal-actions {
  display: flex;
  gap: 15px;
}

.modal-actions button {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-save-session {
  background: var(--primary);
  border: none;
  color: var(--bg-darker);
}

.btn-save-session:hover {
  background: var(--primary-hover);
}

.btn-close-modal {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* شاشة تقسيم الآيات اليدوي */
.split-instructions {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 25px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--primary-hover);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.split-words-panel {
  background: rgba(4, 7, 12, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 30px;
  min-height: 200px;
  margin-bottom: 25px;
}

.split-word-item {
  font-family: var(--font-quran);
  font-size: 28px;
  line-height: 2.2;
  display: inline-block;
  margin: 4px 6px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.split-word-item:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.split-word-item.split-active {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
  position: relative;
}

.split-word-item.split-active::after {
  content: "✂";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  background: var(--primary);
  color: var(--bg-darker);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.split-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* تأثيرات الحركة الرائعة (Animations) */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  0% { text-shadow: 0 0 10px rgba(16, 185, 129, 0.4); opacity: 0.8; }
  50% { text-shadow: 0 0 20px rgba(16, 185, 129, 0.8); opacity: 1; }
  100% { text-shadow: 0 0 10px rgba(16, 185, 129, 0.4); opacity: 0.8; }
}

@keyframes pulseText {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

/* حالة التحميل (Loading Spinner) */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 12, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(16, 185, 129, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  box-shadow: 0 0 15px var(--primary-glow);
}

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

.loading-status-text {
  font-size: 16px;
  font-weight: bold;
  color: var(--primary-hover);
}

/* عداد الجلسة التنازلي */
.session-countdown-badge {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 8px 15px;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.05);
  min-width: 90px;
  justify-content: center;
}

.session-countdown-badge.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}
