:root{--bg:#08090c;--panel:#14161b;--panel2:#202329;--line:#41454e;--text:#f5f6f8;--muted:#b2b5bd;--purple:#c4c8d0;--blue:#858b96;--green:#e0e3e8}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 80% 0%,#343840 0,transparent 38%),var(--bg);color:var(--text);font-family:Tahoma,Arial,sans-serif;line-height:1.7}.wrap{width:min(1050px,92%);margin:auto}.top{display:flex;align-items:center;justify-content:space-between;padding:22px 0;gap:12px}.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:20px}.mark{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:linear-gradient(145deg,#f4f5f7 0%,#8b9099 45%,#343840 100%);color:#101216;font-size:21px;box-shadow:0 8px 28px #cbd0da30,inset 0 1px 1px #ffffffa8;border:1px solid #d5d8de}.pill{border:1px solid var(--line);border-radius:999px;padding:7px 12px;color:var(--muted);font-size:12px}.hero{padding:45px 0 32px;text-align:center}.eyebrow{color:#e1e4e9;font-size:13px;font-weight:bold;letter-spacing:.4px}.hero h1{font-size:clamp(32px,6vw,56px);line-height:1.2;margin:14px 0}.hero h1 span{background:linear-gradient(90deg,#ffffff,#9298a3,#e5e7eb);-webkit-background-clip:text;background-clip:text;color:transparent}.hero p{color:var(--muted);max-width:620px;margin:0 auto 24px}.search{display:block;width:min(480px,100%);margin:0 auto;background:#0f1727;border:1px solid var(--line);border-radius:14px;padding:14px 16px;color:var(--text);font:inherit;outline:none}.search:focus{border-color:#d9dde5;box-shadow:0 0 0 3px #cbd0da20}.section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:30px 0 16px}.section-head h2{font-size:22px;margin:0}.section-head p{color:var(--muted);font-size:13px;margin:3px 0 0}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.card{background:linear-gradient(145deg,#24272d 0%,#111317 58%,#1b1e23 100%);border:1px solid #454951;border-radius:20px;padding:19px;min-width:0;display:flex;flex-direction:column;gap:10px;box-shadow:inset 0 1px 0 #ffffff12,0 10px 24px #00000035;transition:transform .2s,border-color .2s,box-shadow .2s}.card:hover{transform:translateY(-3px);border-color:#d1d5dc;box-shadow:inset 0 1px 0 #ffffff18,0 14px 30px #00000055}.app-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#f0f1f3,#858b95 52%,#30333a);color:#101216;box-shadow:inset 0 1px 1px #ffffffa8,0 5px 12px #00000035;font-size:25px}.tag{font-size:11px;color:#e0e3e8;background:#d9dde51a;border:1px solid #9ca3af55;border-radius:999px;padding:3px 9px;align-self:flex-start}.card h3{margin:0;font-size:18px}.card p{margin:0;color:var(--muted);font-size:13px;flex:1}.download{display:block;text-align:center;text-decoration:none;background:linear-gradient(135deg,#f0f1f3,#9298a2 48%,#c7cbd2);color:#101216;border:1px solid #f1f2f4;border-radius:11px;padding:10px 12px;font-weight:bold;font-size:14px;box-shadow:inset 0 1px 0 #ffffffb8,0 5px 12px #00000030}.download.missing{background:#202329;color:#e1e4e9;border:1px dashed #737984;box-shadow:none}.notice{margin:24px 0;background:#111b2c;border:1px solid var(--line);border-radius:16px;padding:16px;color:var(--muted);font-size:13px}.notice strong{color:var(--text)}footer{border-top:1px solid var(--line);margin-top:34px;padding:22px 0 30px;text-align:center;color:var(--muted);font-size:12px}.empty{display:none;color:var(--muted);padding:20px;text-align:center}.small{font-size:11px;color:var(--muted)}@media(max-width:760px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{padding-top:30px}}@media(max-width:470px){.grid{grid-template-columns:1fr}.top{align-items:flex-start}.pill{max-width:135px;text-align:center}.card{padding:16px}.section-head{align-items:flex-start;flex-direction:column}}



/* Games Room - Silver Gaming Card */
.game-card {
  position: relative;
  overflow: hidden;
  gap: 12px;
  border: 1px solid #777e89;
  background:
    radial-gradient(ellipse at top, #343943 0%, transparent 65%),
    linear-gradient(150deg, #20242b, #0b0d11 70%, #252a32);
  box-shadow:
    inset 0 1px 0 #ffffff25,
    0 12px 28px #00000055;
  transition: border-color 0.25s ease,
              box-shadow 0.25s ease,
              transform 0.25s ease;
}

.game-card:hover {
  border-color: #e0e4eb;
  box-shadow: 0 14px 30px #00000070,
              0 0 16px #c5ccd522;
  transform: translateY(-3px);
}

.game-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  margin: -19px -19px 4px;
  padding: 10px;
  overflow: hidden;
  background: radial-gradient(
    ellipse at center,
    #3a404b,
    #111318 75%
  );
  border-bottom: 1px solid #777e8966;
}

.game-logo {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: contain;
  margin: 0;
  border-radius: 12px;
  filter: drop-shadow(0 7px 12px #00000080);
  transition: transform 0.25s ease;
}

.game-card:hover .game-logo {
  transform: scale(1.03);
}

.game-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border: 1px solid #b9c0cc;
  border-radius: 6px;
  background: #090b0fe8;
  color: #f0f2f6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.game-version {
  padding: 4px 9px;
  border: 1px solid #858c9955;
  border-radius: 20px;
  background: #ffffff08;
  color: #d5d9e1;
  font-size: 11px;
}

.game-card h3 {
  color: #f1f3f7;
  font-size: 21px;
}

.game-card p {
  color: #c2c7d0;
  line-height: 1.8;
}

.game-download {
  display: block;
  text-align: center;
  margin-top: 5px;
  padding: 12px 15px;
  border: 1px solid #f0f2f6;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    #f0f2f5,
    #aeb5c0 50%,
    #e2e5eb
  );
  color: #101319;
  font-weight: 800;
  text-decoration: none;
  box-shadow: inset 0 1px 0 #ffffffcc,
              0 6px 16px #00000045;
  transition: filter 0.2s ease,
              transform 0.2s ease;
}

.game-download:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

@media (max-width: 470px) {
  .game-art {
    margin: -16px -16px 4px;
  }

  .game-logo {
    height: 210px;
  }}

/* تأثير اللمس لزر تحميل Games Room */
.game-download {
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: transform 0.15s ease,
              box-shadow 0.15s ease,
              filter 0.15s ease;
}

.game-download:active {
  transform: scale(0.96);
  filter: brightness(0.85);
  box-shadow: inset 0 3px 8px #00000040;
}

.game-download::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    #ffffff80 50%,
    transparent 75%
  );
  transform: translateX(-120%);
  transition: transform 0.5s ease;
  pointer-events: none;
}

.game-download:hover::after {
  transform: translateX(120%);
}

/* نافذة تفاصيل Games Room */
.game-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.game-modal-content {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 25px;
  text-align: center;
  color: #f1f3f7;
  border: 1px solid #aeb5c0;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at top, #343943, transparent 65%),
    linear-gradient(145deg, #20242b, #0b0d11 75%);
  box-shadow:
    0 20px 60px #00000099,
    inset 0 1px 0 #ffffff30;
  animation: gameModalIn 0.25s ease;
}

@keyframes gameModalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.game-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid #858c99;
  border-radius: 50%;
  background: #101319;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.modal-game-logo {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin: 10px auto 18px;
  filter: drop-shadow(0 8px 14px #00000080);
}

.game-modal-content h2 {
  margin: 15px 0 8px;
  color: #f0f2f6;
  font-size: 25px;
}

.game-modal-content p {
  color: #c2c7d0;
  line-height: 1.8;
}

.modal-game-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.modal-game-info div {
  padding: 12px 5px;
  border: 1px solid #858c9944;
  border-radius: 10px;
  background: #ffffff08;
}

.modal-game-info span,
.modal-game-info strong {
  display: block;
}

.modal-game-info span {
  margin-bottom: 7px;
  color: #aeb5c0;
  font-size: 12px;
}

.modal-game-info strong {
  color: #f1f3f7;
  font-size: 13px;
}

body.modal-open {
  overflow: hidden;
}

/* زر مشاركة Games Room */
.share-game-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 15px;
  border: 1px solid #aeb5c0;
  border-radius: 10px;
  background: linear-gradient(135deg, #252a32, #101319);
  color: #f0f2f6;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.share-game-btn:active {
  transform: scale(0.96);
  background: #343943;
}

/* تقييم وإحصائيات Games Room */
.game-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  font-size: 13px;
  color: #e4e7ed;
}

.rating-stars {
  color: #f5c451;
  font-size: 22px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px #f5c45144;
}

.rating-label {
  padding: 4px 8px;
  border: 1px solid #858c9955;
  border-radius: 20px;
  color: #bfc5d0;
  font-size: 11px;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.game-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border: 1px solid #858c9944;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff0d, #ffffff03);
  text-align: center;
}

.stat-icon {
  font-size: 20px;
}

.game-stat strong {
  color: #f0f2f6;
  font-size: 13px;
}

.game-stat small {
  color: #aeb5c0;
  font-size: 10px;
}

.rating-stars button {
  padding: 0;
  border: none;
  background: transparent;
  color: #727783;
  font-size: 25px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.rating-stars button:active {
  transform: scale(1.3);
}

.rating-stars button.selected {
  color: #f5c451;
  text-shadow: 0 0 10px #f5c45155;
}

.rating-stars button:focus-visible {
  outline: 2px solid #f5c451;
  outline-offset: 2px;
  border-radius: 4px;
}


/* زر الرجوع إلى أعلى الصفحة */
.back-to-top {
  position: fixed;
  bottom: 22px;
  left: 18px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  background: linear-gradient(135deg, #8b5cf6, #2563eb);
  color: white;
  font-size: 27px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 22px rgba(79, 70, 229, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:active {
  transform: scale(0.9);
}

/* تحسين تفاعل بطاقات Mr.Ahmad */
.card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.card:active {
  transform: scale(0.975);
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.22);
}

/* تأثير حركة خفيف للأجهزة التي تستخدم الماوس */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.65);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.18);
  }
}

/* احترام إعداد تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}


/* تنسيق إحصائيات البرامج */
.program-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 14px;
}

.program-stats > div {
  min-width: 0;
  padding: 10px 4px;
  text-align: center;
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(139, 92, 246, 0.10);
  border-radius: 10px;
  overflow-wrap: anywhere;
}

.program-stats strong {
  display: block;
  margin-top: 7px;
  color: #a78bfa;
  font-size: 18px;
  font-weight: 800;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 360px) {
  .program-stats {
    gap: 4px;
    padding: 8px 4px;
  }

  .program-stats > div {
    font-size: 10px;
  }

  .program-stats strong {
    font-size: 16px;
  }
}


/* توهج وحركة إحصائيات البرامج */
.program-stats {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.program-stats:hover {
  border-color: #8b5cf6;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.22);
}

.program-stats > div {
  transition: background 0.25s ease, transform 0.25s ease;
}

.program-stats > div:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.program-stats strong {
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.program-stats > div:hover strong {
  color: #c4b5fd;
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .program-stats,
  .program-stats > div,
  .program-stats strong {
    transition: none;
  }
}



