/* url(style.css) */
/* * {
  outline: 1px solid red;
} */

:root {
  /* ===== Dark Theme (افتراضي) ===== */
  --h3: greenyellow;
  --bg: #0f1723;
  --card: #1e293b;
  --border-color: rgba(255, 255, 255, 0.25);
  --accent: #e5e7eb;
  --muted: #9ca3af;
  --btn-bg: #555;
  --btn-primary: #3498db;
  --text-color: #e5e7eb;
  --header-link: #1f8ef1;
  --header-link-hover: #f39c12;
  --canvas-bg: #f6f6f6;
  --btn-border: #333;
  --btn-active-bg: #007bff;
  --btn-active-text: #fff;
  --shadow-color: rgba(17, 255, 0, 0.6);
}

/* Light Theme */
body.light-theme {
  --h3: black;
  --bg: #fefefe;
  --card: #fff;
  --border-color: #999;
  --accent: #333;
  --muted: #888;
  --btn-bg: #555;
  --btn-primary: #3498db;
  --text-color: #181818;
  --header-link: #1f8ef1;
  --header-link-hover: #f39c12;
  --canvas-bg: #f6f6f6;
  --btn-border: #ccc;
  --btn-active-bg: #007bff;
  /* ممكن تغيره للون مناسب للفاتح */
  --btn-active-text: black;
  --shadow-color: rgba(17, 255, 0, 0.6);
}

html {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Comic Sans", "Tajawal", "Segoe UI", Helvetica, Arial, sans-serif !important;
  background: var(--bg);
  color: var(--text-color);
  padding: 8px;
  height: 100%;
  position: relative;
  z-index: 0;
}

/* 🔥 الوتر مارك */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('/logo.jpeg');
  background-repeat: repeat;
  background-position: center;
  background-size: cover;

  /* background-size: 120px; */
  opacity: 0.07;
  /* زودناها عشان نجرب */
  pointer-events: none;
  z-index: -1;
}

/* موبايل */
@media (max-width: 600px) {
  body::before {
    background-size: 500%;
  }
}

/* تابلت */
@media (max-width: 1024px) {
  body::before {
    background-size: 200%;
  }
}

/* ديسكتوب */
@media (min-width: 1025px) {
  body::before {
    background-size: 120%;
  }
}

button,
input,
textarea {
  font-family: inherit;
}

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

.header-nav a {
  color: var(--header-link);
}

.header-nav a:hover {
  color: var(--header-link-hover);
}

.roast-controls input,
.roast-controls select {
  background: var(--card);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ======== Header ======== */
h1 {
  font-size: 2rem;
  text-align: center;
  font-weight: 700;
  margin: 0.2rem 0;
}

.logo {
  height: 40px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-nav a {
  text-decoration: none;
  color: #1f8ef1;
  font-weight: bold;
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: #f39c12;
}

.header-nav .divider {
  color: #888;
}

/* عشان محتوى الصفحة مايخشش على الهيدر */
/* body main {
  padding-top: 60px;
} */

/* ======== Container ======== */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 1rem;
  /* width: 100%; */
  max-width: 500px;
  margin: 0 auto;
}

@media (min-width: 200px) {
  .my-container {
    display: ruby;
  }
}

/* ======== Canvas ======== */
canvas {
  touch-action: none;
  /* touch-action: pan-y; */
}

canvas#memeCanvas {
  width: 100% !important;
  height: auto !important;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: var(--canvas-bg);
  display: flex;
}

/* ======== Form Controls ======== */
label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

select,
input[type="file"],
textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

/* ======== Buttons ======== */
.appbtn {
  display: block;
  padding: 10px;
  margin: 20px auto;
  /* margin-bottom: 50px; */
  /* background: var(--bg); */
  /* color: white; */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: 0.2s;
}

.btn {
  text-decoration: none;
  display: inline-block;
  padding: 8px 3px;
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 1px 2px var(--shadow-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: 0.2s;
  font-family: var(--main-font);
}

.appbtn:hover {
  opacity: 0.60;
}

.btn:hover {
  background: var(--btn-active-bg);
  /* color: var(--btn-active-bg); */
  /* opacity: 0.2; */
}

.layer-size {
  width: 50px;
}

.layer-color {
  margin: 0px;
}

.layer-stroke {
  margin: 0px;
}

.btn-primary {
  background: #3498db;
}

.btn-success {
  background: #2ecc71;
}

.btn-purple {
  background: #9b59b6;
}

.btn-danger {
  background: #ff6b6b;
}

.del-layer {
  /* background: #e74c3c; */
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  /* margin-top: 12px; */
  padding: 6px 8px;
  font-size: 0.85rem;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  justify-content: center;
}

#category-buttons button {
  /* color: var(--text-color); */
  border: 1px solid var(--btn-border);
}

/* ======== Button Groups ======== */
.btn-group {
  display: flex;
  gap: 6px;
  width: 100%;
}

/* ======== Layers Container ======== */
#layers-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

/* ======== Textarea inside layer ======== */
.layer-text {
  width: 100%;
  min-height: 50px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.95rem;
}

/* ======== Info Text ======== */
.info-text {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

/* ======== Fonts ======== */
.font-btn {
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: 4px;
  background: var(--bg);
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
  flex: 0 0 auto;
}

.font-btn:hover {
  background: var(--btn-active-bg);
}

.font-btn.active {
  background: var(--btn-active-bg);
  /* color: #fff; */
  /* border-color: #333; */
}

/* ======== container ======== */
.roast-container {
  max-width: 760px;
  margin: 18px auto;
  padding: 20px;
  /* background: rgba(255, 255, 255, 0.02); */
  border: 1px solid var(--btn-border);
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 1px 2px var(--shadow-color);
}

.roast-controls label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.roast-controls input,
.roast-controls select {
  width: 95%;
  padding: 10px;
  margin-top: 6px;
  border-radius: 8px;
  /* border: 1px solid rgba(255, 255, 255, 0.06); */
  border: 1px solid var(--btn-border);
  box-shadow: 0 1px 1px var(--shadow-color);
  /* background: rgba(255, 255, 255, 0.02); */
  background: var(--bg);
  color: var(--accent);
}

.roast-lead {
  color: var(--muted);
  margin: 6px 0 18px 0;
}

.roast-buttons {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

button {
  padding: 10px 14px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  background: var(--bg);
  color: var(--text-color);
  font-size: large;
  box-shadow: 0 1px 1px var(--shadow-color);
}

.roast-result {
  margin-top: 18px;
}

.roastBox {
  min-height: 70px;
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.01));
  /* border: 1px solid rgba(255, 255, 255, 0.03); */
  border: 1px solid var(--btn-border);
  box-shadow: 0 1px 1px var(--shadow-color);
  font-size: 1.05rem;
}

.roast-warn {
  display: none;
  color: #fca5a5;
  margin-top: 8px;
}

/* ======== articles ======== */
.articles-list {
  list-style: none;
  padding: 2rem;
  margin: 0 auto;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.articles-list li a {
  display: block;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  /* box-shadow: 0 3px 8px rgba(0,0,0,0.05); */
  box-shadow: 0 1px 1px var(--shadow-color);
  border-radius: 10px;
  text-decoration: none;
  color: #1f8ef1;
  font-weight: bold;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.articles-list li a:hover {
  transform: translateY(-2px);
  /* box-shadow: 0 5px 15px rgba(0,0,0,0.1); */
  box-shadow: 0 1px 1px var(--header-link-hover);
}

p,
h2 {
  line-height: 1.6;
  margin-bottom: 1rem;
  padding: 0px 10px;
  color: var(--accent);
}

/* ======== img ======== */
.img {
  width: 96%;
  /* عشان تتوافق مع حجم القسم */
  max-width: 600px;
  /* الحد الأقصى لحجم الصورة */
  height: auto;
  /* يحافظ على نسبة الطول للعرض */
  display: block;
  margin: 20px auto;
  /* صورة في النص مع مسافة فوق وتحت */
  border-radius: 8px;
  /* حواف خفيفة حلوة */
}

/* ======== container ======== */
/* تعديل ال container للصفحات النصية */
.text-container {
  display: block;
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.6;
  text-align: right;
  /* للغة العربية */
}

.text-container h1,
.text-container h2 {
  text-align: right;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.text-container p {
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  #controls-container {
    max-height: 50vh;
    /* تقريبياً نص ارتفاع الشاشة */
    width: 100%;
    overflow-y: auto;
    text-align: right;
    justify-items: center;
    margin: auto;
  }

  #font-buttons {
    display: flex;
    flex-wrap: nowrap;
    /* يمنع الالتفاف */
    overflow-x: auto;
    /* scroll أفقي */
    gap: 6px;
    padding-bottom: 4px;
  }

  #font-buttons .font-btn {
    flex: 0 0 auto;
    /* يخلي كل زر حجمه ثابت */
  }

  /* خلي الـ container الرئيسي flex column على الموبايل */
  .main-container {
    flex-direction: column;
  }

}

/* ======== emoji ======== */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.imojidiv {
  display: flex;
  justify-content: center;
  height: 150px;
  align-items: center;
  margin-top: -30px;
  margin-bottom: -60px;
  overflow: hidden;
  position: relative;
}

.emoji {
  font-size: 3rem;
  display: inline-block;
  animation: float 3s infinite ease-in-out;
}

.emoji:nth-child(1) {
  animation-delay: 0s;
}

.emoji:nth-child(2) {
  animation-delay: 0.5s;
}

.emoji:nth-child(3) {
  animation-delay: 1s;
}

.emoji:nth-child(4) {
  animation-delay: 1.5s;
}

.emoji:nth-child(5) {
  animation-delay: 2s;
}

/* ======== Responsive Ads ======== */
.ad-space {
  width: 98%;
  max-width: 728px;
  height: 90px;
  margin: 20px auto;
  margin-bottom: 0px;
  background: #f1f1f1;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: #555;
  text-align: center;
}

/* ======== JOKES ======== */
.jokes-page {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 15px;
}

.jokes-page h1 {
  text-align: center;
  color: #ff6600;
}

.jokes-page ul {
  list-style: none;
  padding: 0;
}

.jokes-page li {
  background: var(--bg);
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 1px 1px var(--shadow-color);
}

.card {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-color, #000);
  background: var(--card, #fff);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); */
  box-shadow: 0 1px 1px 0px var(--shadow-color);
}

.card:hover {
  transform: translateY(-3px);
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7); */
  box-shadow: 0 4px 12px 0px var(--shadow-color);
}

.emoji-icon {
  width: 2em;
  height: 2em;
  vertical-align: middle;
}

/* ======== Footer ======== */
.site-footer {
  background: #222;
  color: #fff;
  padding: 30px 20px;
  text-align: center;
  font-size: 0.95rem;
  border-top: 1px solid #444;
  margin-top: 50px;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer .footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.site-footer form {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer textarea {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #555;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  font-size: 0.95rem;
}

.site-footer button {
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.2s;
}

.site-footer button:hover {
  opacity: 0.85;
}

/* Responsive */
@media (max-width: 500px) {
  .site-footer .footer-content {
    padding: 0 1rem;
  }
}

/* url(style.css) */
/* ======== article ======== */
.article-container {
  text-align: start;
  margin: auto;
  max-width: 1000px;
  line-height: 1.9;
  font-size: 18px;
  padding: 1rem;
}

.article-container img {
  display: block;
  margin: 20px auto;
  border-radius: 12px;
  max-width: 100%;
  height: auto;
}

.article-container h1,
.article-container h2,
.article-container h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--accent, #f5f5f5);
  text-align: start;
}

.article-container p {
  margin-bottom: 1rem;
}

/* ======== ADS ======== */

/* ——— TOP / BOTTOM AD ——— */
.ad-top {
  display: flex;
  justify-content: center;
  margin: 25px auto;
}

.ad-bottom {
  margin: 40px auto 0;
  padding-bottom: 20px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.ad-top img,
.ad-bottom img,
.ad-placeholder {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  min-height: 150px;
  background: #111;
  border-radius: 14px;
  object-fit: cover;
}

.page-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: auto;
  /* padding: 10px; */
  text-align: center;
  /* text-align: -webkit-center; */
}

/* ——— SIDE ADS ——— */
.ad-right,
.ad-left {
  position: fixed;
  top: 180px;
  width: 300px;
  z-index: 900;
}

.ad-right {
  right: max(5px, calc((90vw - 1100px) / 2 - 200px));
}

.ad-left {
  left: max(5px, calc((90vw - 1100px) / 2 - 200px));
}

.ad-right img,
.ad-left img {
  width: 100%;
  border-radius: 12px;
}

.ad-side {
  position: fixed;
  z-index: 1100;
}

.side-close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  background: #000c;
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  z-index: 9999;
}

.side-close-btn:hover {
  background: #ff3b3b;
}

/* ——— FLOATING ——— */
.ad-floating {
  position: fixed;
  bottom: 90px;
  right: 25px;
  z-index: 1100;
}

.ad-floating img {
  width: 180px;
  border-radius: 12px;
}

/* ——— PLACEHOLDER ——— */
.ad-placeholder {
  background: var(--bg);
  border: 2px dashed var(--border-color);
  color: var(--accent);
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  font-size: .95rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ——— IN-CONTENT ——— */
/* .in-content-ad-box {
  margin: 30px auto;
  max-width: 800px;
} */
.in-content-ad-box {
  margin: 30px auto;
  max-width: 800px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.in-content-ad-box img,
.in-content-ad-box iframe,
.in-content-ad-box video {
  width: 100%;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
}

.grid-ad-box img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.grid-ad-box:hover {
  transform: translateY(-5px);
}

.grid-ad-box {
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  /* box-shadow: 0 4px 10px var(--shadow-color); */
  /* border: 2px solid var(--border-color); */
  border: 2px solid #00ff88;
  box-shadow: 0 0 10px rgba(0,255,136,0.3);
  transition: 0.3s;
  position: relative;
}

.grid-ad-box:hover {
  transform: translateY(-5px);
}

/* الميديا */
.ad-media img,
.ad-media video {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

/* المحتوى */
.ad-body {
  padding: 10px;
  text-align: center;
}

.ad-body h4 {
  color: #22c55e;
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.ad-body p {
  font-size: 1.1rem;
  opacity: 0.8;
}

.ad-link,
.ad-link * {
  text-decoration: none !important;
}

/* زرار */
.ad-body button {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: #22c55e;
  color: black;
  cursor: pointer;
}

/* البادج */
.ad-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #22c55e;
  color: black;
  padding: 3px 6px;
  font-size: 11px;
  border-radius: 5px;
}

.ad-tilt-inner img,
.ad-tilt-inner video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.ad-label {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #22c55e;
  color: black;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
}

.ad-tilt {
  perspective: 1000px;
  transform-style: preserve-3d;
  border-radius: 15px;
}

.ad-tilt-inner {
  border-radius: 14px;
  overflow: hidden;
  transform-style: preserve-3d;
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.ad-tilt-inner video,
.ad-tilt-inner img {
  width: 100%;
  height: auto;
  /* max-height: 300px; */
  object-fit: cover;
  display: block;
}

/* .grid-ad-box {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-color);
  box-shadow: 0 6px 15px var(--shadow-color);
  display: flex;
  flex-direction: column;
} */

/* إخفاء الإعلانات الجانبية والفلوت على الموبايل */
@media (max-width: 900px) {

  .ad-right,
  .ad-left,
  .ad-floating {
    display: none !important;
  }
}

.question-title {
  color: var(--h3);
  font-weight: bolder;
  font-size: 24px;
  margin-bottom: 10px;
}

.footer-ads {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed #333;
  text-align: center;
  font-size: 14px;
  opacity: 0.85;
}

.footer-ads a {
  display: inline-block;
  margin-top: 6px;
  color: #25D366;
  font-weight: bold;
}


.advertise-cta-card {
  margin-top: 35px;
  padding: 22px 18px;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border-color), 0 6px 20px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.advertise-cta-card .cta-title {
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.advertise-cta-card .cta-desc {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 14px;
}

.advertise-cta-card .cta-btn {
  background: #25D366;
  color: #000;
  border: none;
  padding: 10px 20px;
  font-size: 1.05rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.advertise-cta-card .cta-btn:hover {
  opacity: 0.9;
}

/* ===================================== games ===================================== */
.host-box {
  background: var(--bg);
  /* background: linear-gradient(135deg, #1e293b, #020617); */
  padding: 15px;
  border-radius: 15px;
  /* border: 1px solid #22c55e; */
  margin-top: 15px;
  box-shadow: 0 1px 2px var(--shadow-color);
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.correct-player {
  background: #22c55e22;
  color: #22c55e;
  font-weight: bold;
}

.wrong-player {
  background: #ef444422;
  color: #ef4444;
  font-weight: bold;
}

.first-player.correct-player {
  background: #22c55e33;
}

.first-player.wrong-player {
  background: #ef444433;
}

.feedback {
  margin-top: 15px;
  padding: 10px;
  border-radius: 10px;
  font-weight: bold;
  text-align: center;
}

.feedback.correct {
  background: #22c55e33;
  color: #22c55e;
}

.feedback.wrong {
  background: #ef444433;
  color: #ef4444;
}

.results-card {
  background: var(--bg);
  padding: 15px;
  border-radius: 15px;
  margin-top: 20px;
  box-shadow: 0 1px 2px var(--shadow-color);
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  border-bottom: 1px solid #333;
}




.wrong-text {
  color: #ef4444;
  font-weight: bold;
  font-size: 24px;
  /* text-shadow: 0 0 2px #ef4444; */
}

.correct-text {
  color: #22c55e;
  font-weight: bold;
  font-size: 24px;
  /* text-shadow: 0 0 2px #22c55e; */
}

#question {
  margin-bottom: 20px;
  font-size: 40px;
}

.answer-btn {
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border-radius: 12px;
  border: none;
  color: white;
  font-size: 34px;
  transition: 0.2s;
}

.answer-btn:hover {
  transform: scale(1.03);
  background: #334155;
}

#text-answer {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

#send-answer {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: #22c55e;
  color: white;
  border: none;
}

#feedback {
  margin-top: 15px;
  font-weight: bold;
  font-size: 18px;
}


.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #020617;
  color: white;
}

.results-table th,
.results-table td {
  border: 1px solid #333;
  padding: 10px;
  text-align: center;
}

.results-table th {
  background: #111827;
}

.results-table tr:hover {
  background: #1e293b;
}

.correct-answer {
  color: #22c55e;
  font-weight: bold;
}

.wrong-answer {
  color: #ef4444;
  font-weight: bold;
}

.table-wrapper {
  max-height: 400px;
  width: 100%;
  overflow-x: auto;
  margin-top: 30px;
}

.results-table {
  min-width: 600px;
}

.table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 10px;
}

.winner-container {
  margin-top: 50px;
  margin: 30px auto;
  text-align: center;
}

.trophy {
  font-size: 90px;
  animation: bounce 1s infinite alternate;
}

.winner-name {
  font-size: 36px;
  font-weight: bold;
  color: gold;
  border-radius: 12px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  animation: glow 1.5s infinite alternate;
}

.winner-score {
  margin-top: 10px;
  font-size: 40px;
  /* color: #ccc; */
  margin-bottom: 59px;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px gold;
  }

  to {
    text-shadow: 0 0 30px orange;
  }
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-12px);
  }
}

.leaderboard {
  width: 100%;
  max-width: 700px;
  margin: 20px auto;
  padding: 20px;
  box-sizing: border-box;

  background: linear-gradient(135deg, #0f172a, #020617);
  border-radius: 16px;

  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.leaderboard h2 {
  margin-bottom: 15px;
  font-size: 30px;
}

.leader-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  margin-bottom: 8px;

  background: #020617;
  border-radius: 10px;

  transition: 0.2s;
}

.leader-item:hover {
  background: #1e293b;
}

.leader-item:nth-child(2) {
  background: linear-gradient(90deg, gold, orange);
  color: black;
  font-weight: bold;
}

.leader-item:first-child {
  background: linear-gradient(90deg, gold, orange);
  color: black;
  font-weight: bold;

  animation: winnerGlow 1.5s infinite alternate;
  animation: pulse 1s infinite alternate;
}

@keyframes winnerGlow {
  from {
    box-shadow: 0 0 10px gold;
  }

  to {
    box-shadow: 0 0 25px orange;
  }
}

@keyframes pulse {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.03);
  }
}

.leader-title {
  font-size: 24px;
  margin-bottom: 15px;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-8px);
  }
}

.leader-item:first-child {
  position: relative;
  overflow: hidden;
}

.leader-item:first-child::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, transparent, gold, transparent);
  opacity: 0.4;
  animation: shine 2s infinite;
}

@keyframes shine {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

.trophy-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.trophy-icon {
  font-size: 90px;

  /* ✨ لمعة خفيفة بس */
  filter: drop-shadow(0 0 10px gold);

  /* 🕺 حركة */
  animation: float 1.5s infinite ease-in-out alternate;
}

/* حركة طلوع ونزول */
@keyframes float {
  from {
    transform: translateY(0px) scale(1);
  }

  to {
    transform: translateY(-12px) scale(1.05);
  }
}

.trophy-icon {
  position: relative;
}

.trophy-icon::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  /* background: radial-gradient(circle, gold, transparent); */
  opacity: 0.4;
  animation: glowPulse 1.5s infinite alternate;
}

@keyframes glowPulse {
  from {
    opacity: 0.3;
  }

  to {
    opacity: 0.7;
  }
}

.leader-title {
  margin-top: 10px;
  font-size: 22px;
  font-weight: bold;
  color: white;

  /* ❌ شيل أي animation */
  animation: none;
}

.flip-card {
  max-width: 700px;
  margin: 20px auto 150px;
}

/* 👇 ده أهم تعديل */
.flip-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

/* الوجهين */
.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  /* 🔥 مهم جداً */
  backface-visibility: hidden;
  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* 👈 الأمام */
.flip-front {
  background: linear-gradient(135deg, #0f172a, #020617);
  color: white;
  font-size: 18px;
  /* padding: 20px; */
}

/* 👉 الخلف */
.flip-back {
  transform: rotateY(180deg);
}

@media (max-width: 600px) {
  .flip-card {
    width: 95%;
  }
}


.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.options-grid span {
  background: #1e293b;
  padding: 6px;
  border-radius: 8px;
  text-align: center;
}

.edit-form {
  margin-top: 10px;
  padding: 10px;
  background: #020617;
  border-radius: 10px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.edit-form input {
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: #1e293b;
  color: white;
}

.edit-form button {
  background: #22c55e;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.edit-form .edit-text {
  grid-column: span 2;
}

.edit-form .edit-correct {
  grid-column: span 2;
}

.edit-form button {
  grid-column: span 2;
}
















/* ===================================== code.astro ===================================== */
.room-container {
  max-width: 800px;
  margin: auto;
}

/* 🧠 العناوين */
h1 {
  text-align: center;
  margin-bottom: 10px;
}

#role-box {
  text-align: center;
  margin-bottom: 15px;
  opacity: 0.8;
}

/* 👥 اللاعبين */
#players {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 20px;
}


/* =========================================addc.astro=========================⃁ */
/* 🎯 الأزرار (الفئات) */
.category-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

/* 📱 موبايل */
@media (max-width: 600px) {
  .category-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 💻 تابلت */
@media (min-width: 601px) {
  .category-buttons {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 🖥️ كمبيوتر */
@media (min-width: 1024px) {
  .category-buttons {
    grid-template-columns: repeat(4, 1fr);
  }

  .room-container {
    max-width: 1200px;
  }
}

.roles-box {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.roles-box label {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #111827;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.cat-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.cat-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

#edit-cat {
  background: #22c55e;
}

#delete-cat {
  background: #ef4444;
}

#cancel-cat {
  background: #374151;
}

/* =============================================================== */
/* 👑 الهوست */
.host-box {
  /* background: rgba(255, 255, 255, 0.05); */
  background: var(--bg);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
}

/* أزرار التحكم */
.host-box button {
  margin: 5px;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: var(--bg);
  transition: 0.2s;
}

.host-box button:hover {
  background: #22c55e;
  color: black;
}

/* ❓ السؤال */
#question-box {
  margin-top: 20px;

}

/* 📊 النتائج */
#results-box {
  margin-top: 20px;
}

/* #review {
  display: flex;
  justify-content: center;
} */

.question-card {
  max-width: 600px;
  margin: 15px auto;
  background: var(--bg);
  padding: 20px;
  border-radius: 15px;
  font-size: large;
  text-align: center;
}

/* 🧠 كارد السؤال */
/* .question-card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
} */

/* 📥 input */
#text-answer {
  width: 100%;
  max-width: 400px;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid #22c55e;
  /* background: #0f172a; */
  /* color: white; */
  outline: none;
  margin-top: 15px;
  font-size: 14px;
  transition: 0.2s;
}

#text-answer::placeholder {
  color: #9ca3af;
}

/* ✨ لما تدوس عليه */
#text-answer:focus {
  border-color: #4ade80;
  box-shadow: 0 0 10px #22c55e55;
}

/* 🚀 زرار الإرسال */
#send-answer {
  margin-top: 12px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

/* hover */
#send-answer:hover {
  background: #4ade80;
  transform: scale(1.05);
}






.room-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--bg);
  padding: 10px 0;
}

.category-dropdown {
  position: relative;
}

.dropdown-btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #22c55e33;
  cursor: pointer;
  background: var(--card);
}

.dropdown-btn:hover {
  background: #22c55e22;
}

@media (max-width: 768px) {
  .room-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 👈 اتنين في الصف */
    gap: 10px;
  }

  .room-header button,
  .dropdown-btn,
  #open-admin {
    width: 100%;
    font-size: 15px;
    padding: 12px;
  }

  /* 👑 نخلي زرار الفئات ياخد صف كامل (اختياري) */
  .category-dropdown {
    position: relative;
    grid-column: span 2;
  }

  .category-dropdown.open .dropdown-menu {
    position: absolute;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    /* transform: translateX(-50%); */
    pointer-events: auto;
  }
}

@media (min-width: 769px) {
  .category-dropdown.open .dropdown-menu {
    position: absolute;
    top: 50px;
    left: -50%;
    opacity: 1;
    visibility: visible;
    /* transform: translateX(-50%) translateY(0); */
    transform: translateX(-50%);
    pointer-events: auto;
  }
}

.dropdown-menu {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);

  width: 1200px;
  max-width: 90vw;

  background: var(--card);
  border-radius: 15px;
  padding: 20px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: 0.25s;
  z-index: 999;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* تظهر */
/* .category-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
} */
/* .category-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
} */

.category-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
}

/* الكروت */
.cat-card {
  position: relative;
  aspect-ratio: 16 / 9;

  border-radius: 14px;
  overflow: hidden;

  background-size: cover;
  background-position: center;

  cursor: pointer;
  transition: 0.3s;
}

.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  z-index: 1;
}

.cat-card span {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;

  color: white;
  font-weight: bold;
  font-size: 1.0rem;
}

.cat-card.active {
  outline: 3px solid #22c55e;
  box-shadow: 0 0 30px #22c55e88;
  transform: scale(1.05);
}

.cat-card.active::after {
  content: "✔";
  position: absolute;
  top: 10px;
  left: 10px;
  background: #22c55e;
  color: black;
  font-weight: bold;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

/* hover 🔥 */
.cat-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #22c55e55;
}

#role-box,
#players {
  position: relative;
  z-index: 1;
}


/* الكارت كله */
.players-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #22c55e22;
}

/* ليست اللاعبين */
.players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* كل لاعب */
.player-item {
  background: #111827;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid #22c55e22;
  transition: 0.2s;
}

/* أنا مميز */
.player-item.me {
  border: 1px solid #22c55e;
  background: #22c55e22;
}

/* hover لطيف */
.player-item:hover {
  transform: translateY(-2px);
}

.players-card.compact {
  background: transparent;
  /* 👈 أهم حاجة */
  border: 1px solid #22c55e22;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 15px;
}

/* الهيدر */
.players-header {
  font-size: 13px;
  margin-bottom: 8px;
  opacity: 0.7;
}

/* اللاعبين */
.players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* كل لاعب */
.player-chip {
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 999px;
  /* 👈 pill شكل */
  font-size: 12px;
  border: 1px solid #22c55e22;
}

/* أنا */
.player-chip.me {
  background: #22c55e22;
  border: 1px solid #22c55e;
}

.suggest-box {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.suggest-box input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  outline: none;
  background: #0f172a;
  color: #fff;
}

.suggest-box button {
  padding: 10px 15px;
  border-radius: 10px;
  border: none;
  background: #22c55e;
  color: white;
  cursor: pointer;
}

.suggestions-list {
  margin-top: 15px;
}

.suggest-item {
  /* background: linear-gradient(135deg, #0f172a, #020617); */
  background: var(--card);
  border: 1px solid #22c55e33;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  text-align: right
}

.suggest-item .name {
  font-size: 12px;
  color: #22c55e;
  margin-bottom: 4px;
}

.suggest-item .text {
  font-size: 14px;
  color: #fff;
}

.suggestions-wrapper {
  margin-top: 15px;
  height: 100px;
  /* 👈 انت تتحكم */
  overflow-y: auto;
  border: 1px solid #22c55e33;
  border-radius: 12px;
  padding: 10px;
  background: var(--card);
}

.suggestions-wrapper::-webkit-scrollbar {
  width: 6px;
}

.suggestions-wrapper::-webkit-scrollbar-thumb {
  background: #22c55e;
  border-radius: 10px;
}

.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.image-modal img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  /* مهم */
}

.image-modal.hidden {
  display: none;
}

#close-image {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 25px;
  cursor: pointer;
  color: white;
}

/* .new-msg {
  animation: pop 0.4s ease;
  border: 1px solid #22c55e;
}

@keyframes pop {
  0% {
    transform: scale(0.95);
    background: #022c22;
  }
  100% {
    transform: scale(1);
  }
} */
.close-sheet {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}



.group-content {
  display: none;
}

.group-content.open {
  display: grid;
}

.group-title {
  cursor: pointer;
  margin: 15px 0 5px;
  font-size: 18px;
}



.player-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 15px;
}

.cat-suggest {
  padding: 8px;
  border-radius: 10px;
  border: none;
  background: #0f172a;
  color: #fff;
  cursor: pointer;
}













/* ============================================addq.astro================================= */


.add-q-section {
  text-align: center;
  margin-top: 40px;
}

.add-q-box {
  background: var(--card);
  max-width: 400px;
  margin: auto;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 20px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-q-box input {
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #020617;
  color: white;
  text-align: center;
  font-size: 16px;
  font-family: inherit;
}

.add-q-box button {
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #22c55e;
  color: black;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

#q-type {
  font-size: 16px;
  font-family: inherit;
}

#q-type option {
  font-size: 16px;
  font-family: inherit;
}

.add-q-box button:hover {
  opacity: 0.8;
}

#msg {
  margin-top: 10px;
  font-weight: bold;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}


.cat-btn:hover {
  background: #22c55e;
  /* color: black; */
}

.cat-btn.active {
  border: 2px solid #22c55e;
  box-shadow: 0 8px 5px var(--shadow-color);

  transform: scale(1.08);
  opacity: 1;
}


@keyframes glow {
  from {
    box-shadow: 0 0 5px #22c55e;
  }

  to {
    box-shadow: 0 0 20px #22c55e;
  }
}

/* 🔥 بوكس إضافة الفئة */
.add-category-box {
  max-width: 700px;
  margin: 20px auto;
  padding: 20px;
  background: linear-gradient(145deg, #020617, #0f172a);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* العنوان */
.add-category-box h3 {
  text-align: center;
  color: #22c55e;
  margin-bottom: 10px;
}

.add-q-box h3 {
  text-align: center;
  color: #22c55e;
  margin-bottom: 10px;
}

/* inputs */
.add-category-box input,
.add-category-box select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #020617;
  color: white;
  outline: none;
  transition: 0.2s;
}

.add-category-box input:focus,
.add-category-box select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 8px #22c55e55;
}

/* file input */
.add-category-box input[type="file"] {
  background: #020617;
  padding: 10px;
  cursor: pointer;
}

/* زرار */
#add-cat-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: black;
  font-weight: bold;
  border: none;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

#add-cat-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 15px #22c55e;
}

/* رسالة */
#cat-msg {
  text-align: center;
  font-weight: bold;
}

/* 🔥 الفئات */
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 25px auto;
  max-width: 900px;
}

.cat-btn {
  width: 160px;
  height: 45px;

  padding: 0 10px;
  border: 1px solid #1e293b;
  background: linear-gradient(145deg, #020617, #0f172a);
  color: white;

  display: flex;
  align-items: center;
  justify-content: space-between;
  /* 👈 أهم تعديل */

  text-align: center;
  font-size: 18px;
}

@media (max-width: 767px) {
  .cat-btn {
    width: 140px;
    font-size: 14px;
  }
}

.cat-btn span:first-child {
  flex: 1;
  text-align: center;
}

.cat-toggle {
  flex-shrink: 0;
  /* 👈 مهم جدًا */
  cursor: pointer;
  z-index: 2;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-btn:hover {
  background: var(--bg);
  transform: translateY(-2px);
  opacity: 1;
}

/* 🔥 بوكس السؤال */
.add-q-box {
  background: linear-gradient(145deg, #020617, #0f172a);
  max-width: 420px;
  margin: 40px auto;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* inputs */
.add-q-box input,
.add-q-box select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #020617;
  color: white;
  text-align: center;
}

/* زرار السؤال */
#add-q-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: black;
  font-weight: bold;
  padding: 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

#add-q-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #22c55e;
}

#preview {
  width: 100%;
  max-width: 300px;
  /* 👈 أهم سطر */
  height: 170px;
  /* 👈 يخليه 16:9 */
  object-fit: cover;

  border-radius: 12px;
  margin: 10px auto;
  display: none;

  border: 2px solid #22c55e;
}

.upload-box {
  font-family: inherit;
  border: 2px dashed #22c55e;
  padding: 20px;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  color: #22c55e;
  transition: 0.3s;
}

.upload-box:hover {
  background: #022c22;
}

#preview {
  width: 100%;
  max-width: 280px;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin: 15px auto;
  display: none;
  border: 2px solid #22c55e;
}

/* 👁️ visibility box (نفس ستايل الموقع) */
.visibility-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, #020617, #0f172a);
  border: 1px solid #1e293b;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* label */
.visibility-box label {
  font-size: 18px;
  opacity: 0.8;
}

/* السطر اللي فيه checkbox */
.switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* checkbox نفسه */
.switch input {
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
  /* نفس اللون الأساسي */
  cursor: pointer;
}

/* النص (ظاهرة / مخفية) */
#visibility-text {
  font-size: 18px;
  opacity: 0.7;
  text-align: right;
}

/* لما تبقى مخفية */
#visibility-text.hidden {
  color: #22c55e;
  font-weight: bold;
}

/* ============================================.board================================= */
.board {
  position: relative;
  z-index: 2;
  max-width: inherit;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 15px;
  padding: 20px;
  margin: 0 auto;
  /* justify-items: center; */
}

.column {
  text-align: center;
}

/* عنوان الفئة */
.category {
  /* background:var(--card); */
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 18px;
}

.category-card {
  position: relative;
  height: 90px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 6px;
  font-size: 13px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .board {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .category {
    font-size: 12px;
    padding: 8px;
  }

  .card {
    /* aspect-ratio: 3/1; */
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
  }
}



.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  height: 80%;
  background: transparent;
  border-radius: 20px 20px 0 0;

  transform: translateY(100%);
  transition: 0.3s;

  z-index: 999;
}

.sheet-content {
  position: relative;
  padding: 20px;
  height: 100%;
  overflow-y: auto;
  background: #1f2937;
  border-radius: 20px;
  padding: 20px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  /* opacity: 0.9; */
}

.question-box {
  max-width: 800px;
  margin: 40px auto;
  text-align: center;

  /* background: linear-gradient(180deg, #020617, #020617cc); */
  background: var(--card);
  padding: 30px 20px;
  border-radius: 20px;
  border: 1px solid #1e293b;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.question-box h2 {
  font-size: 30px;
  margin-bottom: 25px;
  line-height: 1.6;
}

.question-box {
  animation: pop 0.3s ease;
}

.question-img {
  width: 50%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 16px;
  cursor: pointer;
}

@keyframes pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.sheet.show {
  transform: translateY(0);
}

#players-section {
  position: relative;
  z-index: 1;
}

.sheet.show .sheet-content {
  transform: scale(1);
}

.sheet-content h2 {
  font-size: 34px;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}

.drag-bar {
  width: 50px;
  height: 5px;
  background: #555;
  border-radius: 10px;
  margin: 0 auto 10px;
}

@media (max-width: 768px) {
  .sheet-content h2 {
    font-size: 18px;
  }
}

/* ===================================== board.astro ======================== */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--card);
  /* background: #0b1220; */
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  font-size: large;
  z-index: 1000;
  flex-wrap: wrap;

  /* background: rgba(11, 18, 32, 0.9); */
  backdrop-filter: blur(10px);

  /* padding: 10px 16px; */

  /* display: flex; */
  /* align-items: center; */
  /* justify-content: space-between; */

  /* gap: 10px; */
}

.answer-progress.green {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.5);
}

.answer-progress.red {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.answer-progress.waiting {
  background: #374151;
}

.answer-progress {
  text-align: center;
  margin: 12px auto;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: bold;
  font-size: 15px;
  color: #fff;

  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.5);

  display: inline-block;
  min-width: 280px;

  animation: fadeInUp 0.4s ease;
}

.top-bar button {
  padding: 6px 10px;
  font-size: 14px;
}

.answer-progress.warning {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.answer-progress.waiting {
  background: linear-gradient(135deg, #374151, #111827);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.not-answered {
  margin-top: 6px;
  font-size: 13px;
  color: #fca5a5;
  text-align: center;
  opacity: 0.9;
}

/* ✨ Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {

  .answer-progress {
    font-size: 14px;
    padding: 5px 10px;
    width: 70%;
    text-align: center;
  }
}

.text-answer-box {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

#text-answer {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #333;
  outline: none;
  width: 220px;
  background: #111;
  color: #fff;
  font-size: 14px;
  transition: 0.2s;
}

#text-answer:focus {
  border-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

#send-answer {
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: var(--bg);
  /* color: white; */
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

#send-answer:hover {
  transform: scale(1.05);
}

.close-sheet {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 30px;
}

.admin-correct {
  margin-top: 10px;
  padding: 8px 12px;
  background: #0f172a;
  border: 1px solid #22c55e;
  border-radius: 8px;
  color: #22c55e;
  font-weight: bold;
  text-align: center;
}


.review-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

#new-cat-name,
#options-box,
#new-cat-group {
  font-size: 18px;
  font-family: inherit;
}

#new-cat-name,
#options-box,
#new-cat-group option {
  font-size: 18px;
  font-family: inherit;
}

#new-cat-type {
  font-size: 18px;
  font-family: inherit;
}

#new-cat-type option {
  font-size: 18px;
  font-family: inherit;
}


/* ============================================player.astro============================== */
.player-container {
  max-width: 1000px;
  margin: auto;
  padding: 30px 20px;
  text-align: center;
  background: var(--card);
  /* background: linear-gradient(145deg, #020617, #020617); */
  border-radius: 25px;
  /* box-shadow: 0 10px 31px -15px var(--shadow-color); */
  box-shadow: 0 1px 1px 0px var(--shadow-color);
  /* box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); */
}

.player-cat-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}

.player-cat-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  filter: brightness(0.7);
}

.player-cat-card .overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: #fff;
  font-weight: bold;
  font-size: 34px;
}

.chat-divider {
  display: flex;
  align-items: center;
  margin: 20px 0 10px;
  color: #aaa;
  font-size: 14px;
}

.chat-divider::before,
.chat-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.chat-divider span {
  padding: 0 10px;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .player-cat-card .overlay {
    font-size: 20px;
  }

  #question {
    margin-bottom: 20px;
    font-size: 20px;
  }

  .answer-btn {
    font-size: 18px;
  }
}

/* الإجابات */
#answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 👈 اتنين جنب بعض */
  gap: 15px;
}

.answer-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

/* التكست */
#text-box input {
  width: 70%;
  padding: 12px;
  border-radius: 10px;
  border: none;
}

#text-box button {
  padding: 12px 20px;
  margin-left: 10px;
  border-radius: 10px;
  /* background: #22c55e; */
  border: none;
  /* color: #000; */
  cursor: pointer;
}

#question-image {
  display: flex;
  justify-content: center;
  margin: 10px;
}

/* .question-img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.question-img {
  animation: fadeIn 0.5s ease;
} */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.feedback-box {
  margin-top: 20px;
  padding: 20px;
  border-radius: 15px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

/* الصح */
.feedback-box.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid #22c55e;
}

/* الغلط */
.feedback-box.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* .correct-answer {
  display: block;
  margin-top: 10px;
  color: #22c55e;
} */








.role-select {
  text-align: center;
  margin: 20px 0;
}

.role-btn {
  padding: 12px 20px;
  margin: 8px;
  border: none;
  border-radius: 12px;
  background: #1f2937;
  color: white;
  cursor: pointer;
  font-size: 16px;
  transition: 0.3s;
}

.role-btn:hover {
  background: #374151;
}

.role-btn.active {
  background: #22c55e;
}

.admin-status {
  text-align: center;
  margin-bottom: 15px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 14px;
  color: #fff;

  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

  transition: all 0.3s ease;
}

/* 🧠 وضع الإدارة */
.admin-status.admin-mode {
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.6);
}

/* 🎮 وضع اللعب */
.admin-status.play-mode {
  background: linear-gradient(135deg, #16a34a, #14532d);
  box-shadow: 0 0 15px rgba(22, 163, 74, 0.6);
}

/* =====================================setup.astro===================== */
.setup-container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
  text-align: center;
}

.sub {
  opacity: 0.7;
  margin-bottom: 20px;
}

.questions-count {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 25px;
}

.q-btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #222;
  color: #fff;
}

.q-btn.active {
  background: #3b82f6;
}

.categories-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.start-btn {
  width: 100%;
  max-width: 400px;
  margin: 25px auto;
  display: block;
  padding: 14px 25px;
  border: none;
  border-radius: 12px;
  background: #10b981;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.group-title {
  width: 100%;
  text-align: center;
  margin: 25px 0 10px;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, #1f2937, #374151);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  position: relative;
}

.group-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.group-title::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 60%;
  background: #3b82f6;
  border-radius: 5px;
}

.section-title {
  margin: 30px 0 10px;
  font-size: 20px;
  text-align: right;
  opacity: 0.8;
}

.hint-msg {
  margin-top: 10px;
  font-size: 16px;
  /* opacity: 0.7; */
  text-align: right;
  color: white;
}

#hint-box {
  font-size: 18px;
  line-height: 1.6;
  margin-top: 10px;
  padding: 10px 15px;
  border-radius: 10px;

  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  animation: fadeIn 0.4s ease;
  font-size: 30px;

  text-align: center;
  font-weight: 500;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  #hint-box {
    font-size: 18px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#q-hint {
  white-space: normal;
  /* 👈 أهم سطر */
  word-break: break-word;
  /* 👈 يخلي الكلام الطويل يتكسر */
  overflow-wrap: break-word;

  width: 100%;
  box-sizing: border-box;

  min-height: 70px;
  padding: 14px;

  font-size: 16px;
  line-height: 1.5;

  border-radius: 12px;
  border: 1px solid #1e293b;

  background: #020617;
  color: white;

  resize: vertical;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======================== modes intro ===================== */
.modes-intro {
  text-align: center;
  margin: 30px auto;
  max-width: 900px;
}

.modes-intro h2 {
  margin-bottom: 10px;
}

.modes-intro p {
  color: #aaa;
  margin-bottom: 20px;
}

/* grid */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* card */
.mode-card {
  background: linear-gradient(145deg, #0a1622, #0f2233);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(0, 255, 150, 0.1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  transition: 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* hover */
.mode-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: #00ff99;
  box-shadow: 0 0 15px rgba(0,255,150,0.3);
}

/* icon */
.mode-card .icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* title */
.mode-card h3 {
  margin-bottom: 8px;
  color: #00ff99;
}

/* text */
.mode-card p {
  font-size: 14px;
  color: #ccc;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
}

.skeleton-card {
  height: 80px;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    90deg,
    #0f2233 25%,
    #1a3a4d 50%,
    #0f2233 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-title {
  height: 16px;
  width: 120px;
  margin-bottom: 10px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    #0f2233 25%,
    #1a3a4d 50%,
    #0f2233 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ================================ home-card ============================= */

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  max-width: 1000px;
  margin: auto;
  padding: 40px 8px;
}

.home-card {
  text-decoration: none;
  color: inherit;
  background: var(--bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgb(241, 249, 16);
}

.home-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.home-card .content {
  padding: 10px;
  text-align: center;
}

.home-card h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--accent);
}

.tilt-card,
.tilt-card .product-card-inner {
  will-change: transform, box-shadow;
  transform-origin: center;
}

/* =============== articles =============== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: transform 0.2s;
}

.article-card:hover {
  transform: translateY(-3px);
}

.article-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.article-card h3 {
  margin: 10px;
  font-size: 1.1rem;
}

.article-card p {
  margin: 0 10px 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}


.play-section {
  text-align: center;
  margin: 30px 0;
}

.play-box {
  background: var(--bg-color);
  border-radius: 16px;
  padding: 20px;
  max-width: 400px;
  margin: auto;
  box-shadow: 0 4px 10px var(--shadow-color);
}

.play-btn.secondary {
  background: var(--bg);
  color: var(--text-color);
}

.play-btn {
  display: block;
  width: 100%;

  margin: 10px 0;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #22c55e55;

  background: var(--card);
  text-align: center;

  font-size: 16px;
  cursor: pointer;

  transition: 0.2s;
  text-decoration: none;
  /* 👈 مهم لو <a> */
}

.play-btn:hover {
  background: #22c55e;
  color: black;
  transform: translateY(-2px);
}

.code-input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  text-align: center;
  font-size: 1.2rem;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.divider {
  margin: 10px 0;
  opacity: 0.6;
}

.home-card {
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
  transition: 0.3s;
  position: relative;
}

.home-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.home-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}

.home-card h3 {
  color: white;
  z-index: 2;
}

.top-mini {
  text-align: center;
  margin-bottom: 20px;
}

.play-section {
  text-align: center;
  margin-bottom: 40px;
}

.categories-section {
  margin: 60px 0;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 255, 100, 0.2);
}

.categories-section h2 {
  text-align: center;
  margin-bottom: 20px;
}

.fun-section {
  margin: 60px 0;
}

.fun-section h2 {
  text-align: center;
  margin-bottom: 20px;
}

.articles-section {
  margin-top: 60px;
}

.game-desc {
  font-size: large;
}

/* ================================= admin.astro ================================= */
/* 🔥 Tabs */
.top-tabs {
  display: flex;
  gap: 10px;
  padding: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.top-tabs button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 18px;
}

.top-tabs button:hover {
  background: var(--btn-bg);
}

.top-tabs button.active {
  background: var(--btn-active-bg);
  color: var(--btn-active-text);
}

/* 🔥 Content */
.admin-content {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.content-inner {
  width: 100%;
  max-width: 1200px;
}

/* 🔥 Tabs Content */
.tab {
  display: none;
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 10px var(--shadow-color);
}

.tab.active {
  display: block;
}

h3 {
  color: var(--h3);
  margin-top: 0;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .top-tabs {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .top-tabs button {
    white-space: nowrap;
    font-size: 14px;
  }
}

.tab {
  padding: 10px;
}

/* 🔥 container عام */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 🔥 الهيدر */
.admin-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
  gap: 10px;
}

/* ==================================================editq.astro====================================== */
/* 🔥 السيرش */
.search-input {
  background: #0b1220;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  width: 250px;
  transition: 0.2s;
}

.search-input:focus {
  border-color: #00ff88;
  box-shadow: 0 0 10px #00ff8844;
}

/* 🔥 الكروت تتسنتر */
#editq {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.q-image-preview {
  width: 100%;
  border-radius: 10px;
  margin: 10px 0;
  object-fit: cover;
  max-height: 200px;
}

.q-image-preview {
  transition: 0.2s;
  cursor: pointer;
}

.q-image-preview:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* 🔥 شكل الكارت */
#editq .add-q-box {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

textarea.hint {
  background: #020617;
  color: #fff;
  border: 1px solid #22c55e33;
  border-radius: 10px;
  padding: 10px;
  width: 100%;
  resize: vertical;
  transition: 0.2s;
}

textarea.hint:focus {
  border-color: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
  outline: none;
}

textarea.hint::placeholder {
  color: #888;
}

/* 🔥 زر تحميل المزيد */
#load-more {
  display: block;
  margin: 25px auto;
  background: var(--bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

#load-more:hover {
  background: var(--btn-active-bg);
}


.search-input {
  width: 260px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--card);
  color: var(--text-color);
  outline: none;
  transition: 0.3s;
  font-size: 14px;
}

.search-input::placeholder {
  color: #888;
}

/* ✨ لما تركز عليه */
.search-input:focus {
  border-color: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

@media (max-width: 768px) {

  .add-q-box {
    padding: 12px !important;
  }

  .admin-content {
    padding: 10px;
    /* بدل 20 */
  }

  /* 🔥 الكارت يبقى مرن */
  #editq .add-q-box {
    max-width: 90%;
    width: 100%;
  }

  /* 🔥 inputs تبقى مريحة */
  input,
  textarea,
  select {
    font-size: 16px;
    /* مهم عشان الموبايل */
  }

  /* 🔥 السيرش */
  .search-input {
    width: 90%;
    max-width: 100%;
  }

  /* 🔥 الهيدر */
  .admin-header {
    flex-direction: column;
    gap: 10px;
  }

  /* 🔥 المسافات */
  #editq {
    gap: 15px;
  }

}

#filter-category {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 150, 0.3);
  background: rgba(20, 30, 40, 0.9);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(6px);
  margin-bottom: 20px;
}

/* hover */
#filter-category:hover {
  border-color: #00ff99;
  box-shadow: 0 0 8px rgba(0, 255, 150, 0.3);
}

/* focus */
#filter-category:focus {
  border-color: #00ff99;
  box-shadow: 0 0 12px rgba(0, 255, 150, 0.6);
}

/* options */
#filter-category option {
  background: #111;
  color: #fff;
}

.filter-box {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.filter-box label {
  font-size: 13px;
  color: #aaa;
}

/* ==========================================layout.astro ads================ */
.page-header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  /* width: 100%; */
  padding: 0rem 1rem;
  background: #0000;
}

.new-ad-space {
  width: 100%;
  max-width: 728px;
  height: 120px;
  margin: 30px auto;
  background: #e5e5e5;
  border: 2px dashed #999;
  border-radius: 12px;
  overflow: hidden;
}

#ad-container {
  margin: 25px auto;
  max-width: 728px;
  min-height: 90px;
}

.ad-box img {
  width: 100%;
  border-radius: 12px;
  transition: 0.3s;
}

.ad-box img:hover {
  transform: scale(1.03);
}

.ad-placeholder {
  border: 2px dashed #666;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  color: #aaa;
  background: rgba(255, 255, 255, 0.02);
  transition: 0.3s;
}

.ad-placeholder:hover {
  border-color: #00ffcc;
  color: #00ffcc;
  cursor: pointer;
}

.ad-container {
  width: 100%;
  max-width: 728px;
  height: 90px;
  /* حجم بانر إعلانات */
  margin: 30px auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ad-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.new-ad-placeholder {
  width: 100%;
  height: 100%;
  border: 2px dashed #00ffcc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ffcc;
  font-size: 1.1rem;
  text-align: center;
  background: rgba(0, 255, 204, 0.05);
}

.ad-box {
  animation: pulse 10s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

#mobile-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;

  background: transparent;
  padding: 5px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  z-index: 9999;
}

#mobile-ad img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  border-radius: 8px;
  display: block;
}

/* نخليه يظهر بس في الموبايل */
@media (min-width: 768px) {
  #mobile-ad {
    display: none;
  }
}

@media (max-width: 767px) {
  #ad-container {
    display: none;
  }
}

#mobile-ad a {
  color: #00ffcc;
  text-decoration: none;
  font-weight: bold;
}

#close-ad {
  cursor: pointer;
  font-size: 14px;
}









/* =================================== game-page SEO =============================== */
.game-page {
  text-align: center;
  /* padding: 30px; */
}

.intro {
  color: #aaa;
  margin-bottom: 10px;
}

.meta {
  margin-bottom: 20px;
}

.game-board {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.category h2 {
  margin-bottom: 10px;
  color: #00ff99;
}

.question-card {
  background: #0d1b2a;
  padding: 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.question-card:hover {
  transform: scale(1.03);
  background: #132a3a;
}

.question-card.active {
  border: 1px solid #00ff99;
}

.seo-extra {
  margin-top: 30px;
  color: #ccc;
}

.play-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 20px;
  background: #00ff99;
  color: #000;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
}

.options {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* الزرار */
.option-btn {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 150, 0.2);
  background: linear-gradient(145deg, #0d1b2a, #132a3a);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* hover */
.option-btn:hover {
  border-color: #00ff99;
  background: #18384d;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 12px rgba(0, 255, 150, 0.4);
}

/* effect glow من جوه */
.option-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 255, 150, 0.15), transparent);
  opacity: 0;
  transition: 0.3s;
}

.option-btn:hover::after {
  opacity: 1;
}

/* click */
.option-btn:active {
  transform: scale(0.95);
}

/* الكارت كله */
.question-card {
  background: linear-gradient(145deg, #0a1622, #0f2233);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 150, 0.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* السؤال */
.q-text {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* hint */
.cta-hint {
  margin-top: 12px;
  font-size: 13px;
  color: #00ff99;
  opacity: 0.9;
}

.page-btn {
  margin: 5px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #0d1b2a;
  color: #fff;
  cursor: pointer;
}

.page-btn:hover {
  background: #00ff99;
  color: #000;
}

/* =================================== play.astro ======================= */
.game-container {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
}

.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}
@media (max-width: 600px) {
  .game-container {
    width: 100%;
    height: 70vh;
    aspect-ratio: unset;
  }
}
/* #rotate-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  font-size: 22px;
  text-align: center;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.game-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
}
.game-wrapper iframe {
  width: 100%;
  height: 80vh;
  border: none;
}

@media (orientation: portrait) {
  #rotate-screen {
    display: flex;
  }

  .game-wrapper {
    display: none;
  }
} */

.device-note {
  max-width: 800px;
  margin: 20px auto;
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(255, 200, 0, 0.1);
  border: 1px solid rgba(255, 200, 0, 0.3);
  color: #ffd86b;
  text-align: center;
  font-size: 14px;
}
.seo-text{
  text-align: right;
}