@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

/* ============================================================
   owo.css — الستايلات الرئيسية للموقع
   يعتمد على متغيرات theme.css، لا تحط أرقام ألوان هنا مباشرة
   ============================================================ */

@import url('theme.css');

/* ===== إعادة ضبط عامة ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--void-deep);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: var(--font-size-md);
  /* لا padding-top — الهيدر شفاف عائم */
}

/* ============================================================
   HEADER — الشريط العلوي الثابت
   ============================================================ */
.main-header {
  position: fixed;
  top: var(--gap-md);   /* يطفو بعيد عن الحافة */
  left: 0;
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 var(--gap-md);
  background: transparent;   /* بدون خلفية */
  border: none;
  z-index: 999;
  pointer-events: none;      /* ما يعيق الكليك خلف الأزرار */
}
/* الأزرار نفسها تستقبل الكليك */
.main-header .header-right {
  pointer-events: auto;
}

.header-right {
  display: flex;
  gap: var(--gap-sm);
  align-items: center;
}

/* --- زر اللغات --- */
.lang-btn {
  background: var(--void-card);
  color: var(--text-main);
  border: 1px solid var(--void-border);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--trans-fast);
}
.lang-btn:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

/* --- DropDown اللغات --- */
.lang-wrapper {
  position: relative;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;         /* يفتح لليمين - يبقى داخل الشاشة */
  left: auto;
  width: 220px;
  display: none;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--void-border);
  z-index: 5000;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.lang-wrapper.active .lang-dropdown {
  display: flex;
}

.lang-item {
  position: relative;
  height: 55px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background-size: cover;
  background-position: center;
  color: var(--text-main);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--trans-fast);
}

/* طبقة تغميق فوق صورة خلفية اللغة */
.lang-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  transition: var(--trans-fast);
}
.lang-item:hover::before {
  background: rgba(0,0,0,0.3); /* يصبح أخف عند الهوفر */
}

.lang-item img {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  position: relative;
  z-index: 1;
}
.lang-item span {
  position: relative;
  z-index: 1;
}
.lang-item:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* --- زر Linktree --- */
.linktree-btn {
  background: var(--void-card);
  color: var(--text-main);
  border: 1px solid var(--void-border);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: var(--trans-fast);
}
.linktree-btn:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

/* ============================================================
   SIDEBAR — القائمة الجانبية
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: #000000;       /* أسود غامق   */
  position: fixed;
  left: 0; top: 0;
  padding: var(--gap-lg) 15px;
  transition: var(--trans-med);
  z-index: 2000;
  border-right: 1px solid rgba(245,200,66,0.15);
  overflow: hidden;           /* لازم عشان صور الزهور */
}

/* صورة الزهور — يسار وأطراف */
.sidebar::before,
.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  width: 44px;
  height: 100%;
  background-repeat: repeat-y;
  background-size: 44px auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}
.sidebar::before {
  left: 0;
  background-image: url('flowers.gif');   /* صورة الزهور اليسار */
}
.sidebar::after {
  right: 0;
  background-image: url('flowers.gif');   /* صورة الزهور اليمين */
  transform: scaleX(-1);
}

/* كل محتوى السايدبار فوق الصور */
.sidebar > * { position: relative; z-index: 1; }

.sidebar h2 {
  color: var(--aqua);
  margin-bottom: var(--gap-md);
  text-align: center;
  font-family: var(--font-main);
  font-size: 20px;
  text-shadow: 0 0 12px var(--aqua-glow);
}

.sidebar a {
  display: block;
  color: var(--text-main);
  padding: 14px 16px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--trans-fast);
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-main);
}
.sidebar a:hover {
  background: var(--aqua-subtle);
  color: var(--aqua);
  padding-right: 22px;
  text-shadow: 0 0 10px var(--aqua-glow);
}

/* زر إغلاق داخل السايدبار */
.close-btn {
  display: none; /* مخفي على الديسكتوب */
  text-align: right;
  margin-bottom: var(--gap-md);
  cursor: pointer;
  font-size: 22px;
  color: var(--text-muted);
}

/* زر ☰ الجوال */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 15px;
  font-size: 22px;
  background: var(--void-card);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  z-index: 3000;
  border: 1px solid var(--void-border);
  color: var(--text-main);
}

/* ============================================================
   CONTENT — الهيكل الرئيسي للصفحة
   ============================================================ */
.main {
  margin-left: var(--sidebar-w); /* مسافة بسبب السايدبار */
}

.page {
  padding: var(--gap-xl);
}

/* ============================================================
   HERO BOX — الصناديق العلوية (سلايدر + ساعة + أسفل)
   ============================================================ */
.hero-box {
  background: var(--void-glass);
  padding: var(--gap-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--void-border);
  margin-bottom: var(--gap-lg);
}

/* --- الصفوف --- */
.top-row,
.bottom-row {
  display: flex;
  gap: var(--gap-md);
  margin-bottom: var(--gap-md);
}

.middle-row {
  margin-bottom: var(--gap-md);
}

/* --- الصناديق العامة --- */
.box {
  flex: 1;
  background: var(--void-glass);
  border: 1px solid var(--void-border);
  border-radius: var(--radius-md);
  padding: var(--gap-md);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* --- سلايدر الصور --- */
.slider {
  position: relative;
  overflow: hidden;
}
.slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: var(--trans-slow);
}
.slider img.active {
  opacity: 1;
}

/* --- سلايدر النصوص --- */
.text-slider {
  font-size: var(--font-size-lg);
  text-align: center;
}
.text-slider .text {
  position: absolute;
  opacity: 0;
  font-size: var(--font-size-lg);
  text-align: center;
  transition: var(--trans-slow);
  padding: var(--gap-md);
  color: var(--aqua);
}
.text-slider .text.active {
  opacity: 1;
}

/* --- صندوق الساعة --- */
.center-box {
  height: 200px;
  background: url('aaa/cherry.jpg') center/cover;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.time-overlay {
  text-align: center;
}
.time-overlay h2 {
  font-size: 5rem;
  color: var(--aqua);
  letter-spacing: 2px;
}
.time-overlay p {
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- صندوق اللغات (عبارات عشوائية) --- */
.quote-box {
  font-size: var(--font-size-md);
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  line-height: 1.6;
  padding: var(--gap-md);
}

/* --- صندوق الرمز السري --- */
.secret-box {
  flex-direction: column;
  gap: var(--gap-sm);
}

.secret-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* حقل الحرف (حرف واحد فقط) */
.secret-letter {
  width: 45px;
  height: 45px;
  text-align: center;
  font-size: var(--font-size-lg);
  background: var(--void-card);
  border: 1px solid var(--aqua);
  border-radius: var(--radius-sm);
  color: var(--aqua);
  outline: none;
  text-transform: uppercase;
}

/* حقول الأرقام الأربعة */
.secret-digit {
  width: 40px;
  height: 45px;
  text-align: center;
  font-size: var(--font-size-lg);
  background: var(--void-card);
  border: 1px solid var(--void-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
}
.secret-digit:focus {
  border-color: var(--aqua);
}

/* زر التأكيد */
.secret-submit {
  background: var(--aqua);
  color: var(--void-deep);
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: bold;
  transition: var(--trans-fast);
}
.secret-submit:hover {
  background: var(--aqua-dim);
}

/* رسالة النتيجة */
.secret-result {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-align: center;
  min-height: 20px;
}
.secret-result.error { color: #ff5555; }
.secret-result.success { color: var(--aqua); }

/* نافذة الرمز السري المنبثقة */
.secret-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.secret-modal.active {
  display: flex;
}
.secret-modal-inner {
  background: var(--void-card);
  border: 1px solid var(--aqua-glow);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  max-width: 90%;
  width: 500px;
  text-align: center;
  position: relative;
}
.secret-modal img,
.secret-modal video,
.secret-modal iframe {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin-top: var(--gap-md);
}
.secret-modal .close-modal {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

/* --- صندوق GIF --- */
.gif-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ============================================================
   HERO PARALLAX — قسم الفيديو بخلفية متحركة
   ============================================================ */
.hero {
  background-image: url('saku.jpg');
  min-height: 100vh;
  background-attachment: fixed; /* تأثير البارالاكس */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-box {
  background: rgba(0,0,0,0.75);
  padding: var(--gap-lg);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  max-width: 800px;
  width: 90%;
  border: 1px solid var(--void-border);
}

/* ============================================================
   SPLIT SECTION — أقسام النص مع زر Switch
   ============================================================ */
.split-section {
  width: 100%;
}

.split-block {
  display: flex;
  flex-direction: column;
  min-height: 80vh;
  position: relative;
}

/* زر السويتش (يغير الصورة والنص) */
.switch-btn {
  position: absolute;
  top: var(--gap-md);
  right: var(--gap-md);
  background: var(--aqua);
  color: var(--void-deep);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: var(--trans-fast);
  font-size: var(--font-size-sm);
}
.switch-btn:hover {
  background: var(--aqua-dim);
}

/* --- الصورة داخل القسم --- */
.split-image {
  height: 50vh;
  background-size: cover;
  background-position: center;
  animation: zoomEffect 10s ease-in-out infinite alternate;
  transition: background-image 0.5s ease;
}

@keyframes zoomEffect {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* --- صندوق النص داخل القسم --- */
.text-box {
  min-height: 50vh;
  background: var(--void-card);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gap-xl);
  transition: var(--trans-med);
}

.text-box h2 {
  margin-bottom: var(--gap-md);
  font-size: var(--font-size-xl);
  color: var(--aqua);
}

.text-box p {
  font-size: var(--font-size-md);
  line-height: 1.7;
  color: var(--text-muted);
}

/* ============================================================
   SWITCH BLOCK — القسم الذي يقلب بين حالتين بزر
   ============================================================ */

/* الغلاف الخارجي */
.split-block {
  position: relative;
}

/* كل حالة: صورة + نص جنب بعض */
.switch-state {
  display: flex;
  min-height: 70vh;
  overflow: hidden;
}

/* الصورة في الـ switch */
.switch-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  animation: zoomEffect 10s ease-in-out infinite alternate;
}

/* النص في الـ switch */
.switch-state .switch-text {
  flex: 1;
  background: var(--void-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gap-xl);
}

.switch-state .switch-text h2 {
  font-size: var(--font-size-xl);
  color: var(--aqua);
  margin-bottom: var(--gap-md);
}

.switch-state .switch-text p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: var(--font-size-md);
}

/* تأثير الانتقال عند القلب */
.switch-state {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* الجوال: جمب بعض (row) */
@media (max-width: 768px) {
  .switch-state {
    flex-direction: row;
    min-height: 200px;
    align-items: stretch;
  }
  .switch-image {
    flex: 1;
    min-height: 200px;
    height: auto;
  }
  .switch-state .switch-text {
    flex: 1;
    padding: var(--gap-md);
    font-size: 13px;
  }
  .switch-state .switch-text h2 { font-size: 16px; margin-bottom: 8px; }
  .switch-state .switch-text p  { font-size: 12px; line-height: 1.5; }
}

/* ============================================================
   BOOKS PAGE — صفحة الكتب
   ============================================================ */
.books-container {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  overflow-x: auto;
  padding: 50px var(--gap-md);
  display: flex;
  align-items: center;
  min-height: 300px;
}

.books-row {
  display: flex;
  gap: var(--gap-lg);
  flex-wrap: nowrap;
}

.book {
  flex: 0 0 auto;
  width: 180px;
  height: 260px;
  cursor: pointer;
  transition: transform var(--trans-med), box-shadow var(--trans-med);
}
.book:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 15px 30px var(--aqua-glow);
}
.book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* --- البانل الجانبي للكتاب --- */
/* ============================================================
   BOOK MODAL — نافذة الكتاب المنبثقة
   ============================================================ */

/* الـ overlay الداكن */
.book-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--trans-med), visibility var(--trans-med);
  backdrop-filter: blur(6px);
}
.book-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* الكارد الداخلي */
.book-modal {
  background: var(--void-card);
  border: 1px solid var(--void-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  gap: 0;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--trans-med);
}
.book-modal-overlay.active .book-modal {
  transform: translateY(0);
}

/* زر الإغلاق */
.book-modal-close {
  position: absolute;
  top: 14px;
  left: 16px;
  background: var(--void-glass);
  border: 1px solid var(--void-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans-fast);
}
.book-modal-close:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

/* القسم الأيسر - الغلاف والتصنيفات */
.book-modal-left {
  flex: 1;                       /* نصف الـ modal */
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.book-modal-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* طبقة تدرج فوق الغلاف تحمل التصنيفات */
.book-modal-tags {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--gap-lg) var(--gap-md) var(--gap-md);
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 1;
}
.book-tag {
  background: var(--navy-subtle);
  color: var(--navy-bright);
  border: 1px solid var(--navy-glow);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  backdrop-filter: blur(4px);
}

/* القسم الأيمن - المعلومات */
.book-modal-right {
  flex: 1;
  padding: var(--gap-xl) var(--gap-xl) var(--gap-xl);
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  overflow-y: auto;
  min-width: 0;
}

.book-modal-title {
  font-size: 22px;
  color: var(--aqua);
  line-height: 1.3;
}

.book-modal-desc {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: var(--font-size-md);
  flex: 1;
}

.book-modal-downloads {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.book-dl-btn {
  background: var(--navy-subtle);
  color: var(--navy-bright);
  border: 1px solid var(--navy-glow);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: var(--trans-fast);
  display: block;
}
.book-dl-btn:hover {
  background: var(--navy-glow);
  border-color: var(--navy-bright);
  color: var(--text-main);
}

/* جوال */
@media (max-width: 600px) {
  .book-modal {
    flex-direction: column;
    max-height: 95vh;
    overflow-y: auto;
  }
  .book-modal {
    max-height: 92vh;
    overflow-y: auto;
  }
  .book-modal-left {
    min-height: 240px;
    flex: none;
    height: 240px;
  }
  .book-modal-right {
    padding: var(--gap-md);
    flex: none;
  }
  .book-modal-title { font-size: 18px; }
}

/* ============================================================
   PRO PAGE — صفحة المشاريع
   ============================================================ */
.sections {
  display: flex;
  flex-direction: column;
  padding: var(--gap-xl);
  gap: var(--gap-xl);
  margin-left: var(--sidebar-w);
}

.section {
  display: flex;
  align-items: center;
  gap: var(--gap-xl);
  background: var(--void-glass);
  border: 1px solid var(--void-border);
  border-radius: var(--radius-lg);
  padding: var(--gap-xl);
  min-height: 300px;
}

/* النسخة المعكوسة: صورة يسار، نص يمين */
.section.reverse {
  flex-direction: row-reverse;
}

.section .text {
  flex: 1;
}
.section .text h2 {
  font-size: var(--font-size-xl);
  color: var(--aqua);
  margin-bottom: var(--gap-sm);
}
.section .text p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--gap-md);
}

.section .image {
  flex: 1;
  display: flex;
  justify-content: center;
}
.section .image img {
  max-width: 100%;
  border-radius: var(--radius-md);
  max-height: 250px;
  object-fit: cover;
}

/* --- أزرار التحميل --- */
.buttons {
  display: flex;
  gap: var(--gap-sm);
  flex-wrap: wrap;
}
.buttons a {
  background: var(--aqua-subtle);
  color: var(--aqua);
  border: 1px solid var(--aqua-glow);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: var(--trans-fast);
}
.buttons a:hover {
  background: var(--aqua-glow);
}

/* ============================================================
   RESPONSIVE — الجوال (أقل من 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* الهيدر شفاف لا يحتاج padding */

  /* السايدبار مخفي ويطلع بالضغط */
  .sidebar { left: -100%; z-index: 2000; }
  .sidebar.active { left: 0; }
  .menu-toggle { display: block; }
  .close-btn   { display: block; }
  .main        { margin-left: 0; }
  .page        { padding: var(--gap-md); }

  /* ===== تخطيط الصناديق على الجوال =====
     الصف العلوي: صورة + نص جنب بعض (نصفين)
     الوسط: الساعة مستطيلة تحتهم
     الأسفل: 3 صناديق بنفس النسبة
  ===== */
  .top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-sm);
  }
  .top-row .box { min-height: 160px; }

  .middle-row .center-box {
    min-height: 90px;
    height: 90px;
  }

  .bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--gap-sm);
    margin-top: var(--gap-sm);
  }
  .bottom-row .box {
    min-height: 150px;
    padding: var(--gap-sm);
  }

  /* ===== الرمز السري على الجوال =====
     تصغير الحقول عشان ما تطلع بره الصندوق
  ===== */
  .secret-box { padding: var(--gap-sm) !important; }

  .secret-input-row {
    flex-wrap: nowrap;
    gap: 3px;
    width: 100%;
    justify-content: center;
  }
  .secret-letter {
    width: 30px;
    height: 34px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .secret-digit {
    width: 26px;
    height: 34px;
    font-size: 12px;
    flex-shrink: 0;
    padding: 0;
  }
  .secret-submit {
    padding: 5px 8px;
    font-size: 11px;
    flex-shrink: 0;
  }

  /* قسم الكتب */
  .books-container { margin-left: 0; width: 100%; padding: var(--gap-md); }
  .book { width: 140px; height: 200px; }
  /* .panel replaced by book-modal */

  /* صفحة المشاريع */
  .sections { margin-left: 0; padding: var(--gap-md); }
  .section, .section.reverse { flex-direction: column; }

  /* أقسام النصوص */
  .text-box { padding: var(--gap-md) var(--gap-lg); min-height: auto; }
  .text-box h2 { font-size: 22px; }
  .split-image { height: 40vh; }

  .lang-dropdown { width: 180px; }
  .switch-btn {
    top: var(--gap-sm);
    right: var(--gap-sm);
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ============================================================
   RESPONSIVE — تابلت (768px - 1024px)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {

  .page {
    padding: var(--gap-lg);
  }

  .box {
    min-height: 200px;
  }

  .hero {
    background-attachment: scroll; /* البارالاكس مش شغّال زين على التابلت */
  }
}

/* ============================================================
   SHARED — عناصر مشتركة بين كل الصفحات
   (خلفية + مؤشر + dropdown إصلاح)
   ============================================================ */

/* خلفية الكانفاس خلف كل شيء */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* كل المحتوى فوق الكانفاس - السايدبار/الهيدر لهم z-index خاص */
.main,
.books-container,
.panel,
.sections,
.content,
.page-wrapper {
  position: relative;
  z-index: 1;
}
/* ضمان ظهور السايدبار والهيدر دايماً */
.main-header  { z-index: 999  !important; }
.sidebar      { z-index: 2000 !important; }
.menu-toggle  { z-index: 3000 !important; }

/* المؤشر المخصص — دائرة gacha */
* { cursor: none !important; }

#custom-cursor {
  position: fixed;
  width: 36px;
  height: 36px;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  /* الدائرة المفرغة */
  border: 2px solid var(--aqua);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--aqua-glow), inset 0 0 8px var(--aqua-glow);
  opacity: 0;            /* مخفية افتراضياً */
  transition: opacity 0.15s, transform 0.15s, width 0.15s, height 0.15s;
}

/* تظهر عند النقر */
#custom-cursor.clicking {
  opacity: 1;
  width: 44px;
  height: 44px;
  border-color: #fff8e7;
  box-shadow: 0 0 18px var(--aqua-glow), 0 0 4px var(--aqua);
}

/* على الجوال: أعد المؤشر الطبيعي */
@media (max-width: 768px) {
  * { cursor: auto !important; }
  #custom-cursor { display: none !important; }
}

/* DROPDOWN — الإعدادات الصحيحة موجودة في القسم العلوي */

/* ============================================================
   PARALLAX SECTIONS — بارالاكس للفيديو
   ============================================================ */
.parallax-wrap {
  position: relative;
  overflow: hidden;
}

.parallax-wrap .parallax-bg {
  position: absolute;
  inset: -20% 0;          /* أكبر من الحاوية عشان يتحرك */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.parallax-wrap .parallax-content {
  position: relative;
  z-index: 1;
}

/* ============================================================
   BOOKS — رفين (علمي + مانجا)
   ============================================================ */
.shelf-section {
  margin-left: var(--sidebar-w);
  padding: var(--gap-xl) var(--gap-md);
}

.shelf-label {
  font-size: 13px;
  color: var(--aqua);
  letter-spacing: 3px;
  margin-bottom: var(--gap-md);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--void-border);
}

.shelf-row {
  display: flex;
  gap: var(--gap-lg);
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: var(--gap-md);
  margin-bottom: var(--gap-xl);
  scrollbar-width: thin;
  scrollbar-color: var(--aqua) transparent;
}

/* على الجوال */
@media (max-width: 768px) {
  .shelf-section {
    margin-left: 0;
    padding: var(--gap-md);
  }
}

/* music player removed */

/* ============================================================
   RANDOM WORD BOX — مربع الكلمات العشوائية
   ============================================================ */
.random-word-box {
  position: relative;
  overflow: hidden;
  background: var(--void-glass);
}

.random-word {
  font-size: 28px;
  font-weight: 700;
  color: var(--aqua);
  text-align: center;
  letter-spacing: 2px;
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 0;
  transform: translateY(8px);
  display: block;
  text-shadow: 0 0 20px var(--aqua-glow);
  font-family: 'Segoe UI', 'Arial Unicode MS', sans-serif;
}

/* ============================================================
   PARALLAX SECTION — قسم بارالاكس تحت الفيديو
   ============================================================ */
.parallax-section {
  position: relative;
  height: 300px;
  overflow: hidden;
  margin: 0;
}

.parallax-inner {
  position: absolute;
  inset: -30% 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: brightness(0.35);
  z-index: 0;
}

.parallax-text-overlay {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: var(--gap-md);
}

.parallax-text-overlay h2 {
  font-size: var(--font-size-xl);
  color: var(--aqua);
  text-shadow: 0 0 30px var(--aqua-glow);
  letter-spacing: 3px;
}

.parallax-text-overlay p {
  color: var(--text-muted);
  font-size: var(--font-size-md);
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .parallax-inner { background-attachment: scroll; }
  .parallax-section { height: 220px; }
  .parallax-text-overlay h2 { font-size: 20px; }
}
