/* ======================================================
   🎨 ToQuiz Unified UI (Tailwind Companion)
   هذا الملف مسؤول فقط عن المظهر العام
   ❌ لا منطق
   ❌ لا JS
====================================================== */

/* ------------------------------
   🔤 الخط
------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Tajawal:wght@400;500;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Changa:wght@400;600;700&display=swap");

* {
  box-sizing: border-box;
}

body {
    font-family:
    "Cairo",
    "Tajawal",
    "Noto Sans Arabic",
    system-ui,
    sans-serif;
  background-color: #121212;
  color: #ffffff;
  margin: 0;
  direction: rtl;
}

/* ------------------------------
   📦 Container موحد
------------------------------- */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 16px;
}

/* ------------------------------
   🧭 Header موحد
------------------------------- */
.header {
  font-weight: bold;
  margin-bottom: 30px;
  background-color: var(--darkcard);
  color: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content:center;
  flex-direction: column;
}

.header h1 {
  font-size: 2rem;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.95;
}




.sponsor {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 6px;
}

.sponsor-label {
  font-size: 12px;
  opacity: 0.7;
}

.sponsor img {
  height: 48px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sponsor:hover img {
  transform: scale(1.05);
  opacity: 0.9;
}

.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

/* ------------------------------
   🧱 Cards (كويز / فورم / درس)
------------------------------- */
#descPreview {
  background: rgb(26, 26, 26);
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 10px;
  white-space: pre-wrap;
}

#editQuizModal {
  display: flex;
  flex-direction: column
}

/* أسئلة الكويز */
#contentInputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: rgb(26, 26, 26);
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
}


.content-question {
  background-color: rgb(26, 26, 26);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* .modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  overflow-y: auto;
} */



.close {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 32px;
  font-weight: bolder;
  color: #ff0000;
  cursor: pointer;
}

form label {
  display: block;
  margin-top: 16px;
  font-weight: bold;
}

form select,
form textarea,
form input,input,
textarea,
select{
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  background: rgba(0,0,0,0.65);
  color: var(--white);
}

form button[type="submit"],
form button[type="button"] {
  background-color:  #2a9d8f;
  color: white;
  padding: 5px 7px;
  margin-top: -3px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}

form button[type="submit"]:hover,
form button[type="button"]:hover {
  background-color: #21867a;
}

#desc-toolbar {
  margin-bottom: 8px;
}

#desc-toolbar button {
  padding: 6px 10px;
  margin-inline-end: 6px;
  background-color: rgb(26, 26, 26);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  background-color: #21867a;

}


.card,
.quiz-card,
.form-card {
  background-color: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 16px;
  transition: 0.2s ease;
}

.card:hover,
.quiz-card:hover,
.form-card:hover {
  border-color: #2563eb;
}

/* ------------------------------
   📊 Grid موحد
------------------------------- */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* ------------------------------
   🏷️ Badges
------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.badge-primary {
  background-color: #2563eb;
  color: white;
}

.badge-success {
  background-color: #10b981;
  color: white;
}

.badge-gray {
  background-color: #374151;
  color: white;
}

/* ------------------------------
   🔘 Buttons (تكملة Tailwind)
------------------------------- */
.btn {
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-success {
  background-color: #10b981;
  color: white;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}

.btn-gray {
  background-color: #374151;
  color: white;
}

/* ------------------------------
   🧾 Inputs / Textarea
------------------------------- */
/* input,
textarea,
select {
  background-color: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 8px 12px;
  color: rgb(0, 0, 0);
  font-family: inherit;
} */

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
}

/* ------------------------------
   🪟 Modals
------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}


/* .modal-content {
  background-color: #1e1e1e;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 650px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  
} */

.edit-hidden {
  display: none !important;
}

.modal-content {
  background-color: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 20px;
  max-width: 700px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}


.answers-layout {
  width: 100%;
  max-width: 1400px; /* أو احذفها لو تريد Full */
  margin: auto;
  padding: 16px;
}

/* ------------------------------
   📭 Empty State
------------------------------- */
.empty,
.empty-state {
  text-align: center;
  color: #9ca3af;
  margin-top: 60px;
  font-size: 0.95rem;
}

/* ------------------------------
   🌳 Tree (الدروس)
------------------------------- */
.lesson-node {
  background-color: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px;
  margin-top: 8px;
}

.lesson-node .children {
  margin-right: 16px;
  margin-top: 8px;
  padding-right: 12px;
  border-right: 2px dashed #333;
}

/* ------------------------------
   📱 Responsive
------------------------------- */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .header h1 {
    font-size: 1.4rem;
  }
}
