/* Meccha Chameleon — Design System */
:root {
  --primary: #00d4aa;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --bg: #0a0f1a;
  --card-bg: #111827;
  --text: #ffffff;
  --text-secondary: #d7d7d7;
  --border: #2b2f36;
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --header-height: 80px;
  --header-height-mobile: 64px;
  --card-radius: 15px;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --transition: 300ms ease;
}

* { box-sizing: border-box; }

body {
  background: var(--bg) !important;
 
  font-family: var(--font-body);
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);

  font-weight: 900;
}

/* Header */
.site-header {
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height-mobile);
  transition: background var(--transition), box-shadow var(--transition);
  background: rgb(23, 22, 20);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: -70px;
  padding: 0 16px;
}
@media (min-width: 1024px) {

}
.site-header .max-w-\[1400px\] {
  padding: 0 16px;
}
.site-header .flex {
  gap: 24px;
}
@media (min-width: 1024px) {
  .site-header .flex { gap: 20px; }
}

.main-content {
  padding-top: var(--header-height-mobile);
}
@media (min-width: 1024px) {
  .main-content { padding-top: var(--header-height); }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 500;
  transition: color var(--transition);
  margin-right: 4px;
  font-size: 14px;
}
@media (min-width: 640px) {
  .nav-link { margin-right: 8px; font-size: 15px; }
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
}
.nav-link.favorites-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  
  transition: all var(--transition);
}
.nav-link.favorites-link:hover {
 
  color: var(--primary);
  transform: scale(1.1);
}
.nav-link.favorites-link svg {
  width: 20px;
  height: 20px;
}
.site-header nav {
  margin-right: 16px;
}
@media (min-width: 640px) {
  .site-header nav { margin-right: 24px; }
}
.site-header .w-72 {
  margin-right: 16px;
  max-width: 200px;
}
@media (min-width: 640px) {
  .site-header .w-72 { margin-right: 24px; max-width: 288px; }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Game Cards */
.game-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1;
}
@media (min-width: 640px) {
  .game-card { max-width: 160px; }
}
@media (min-width: 1024px) {
  .game-card { max-width: 170px; }
}
.game-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.game-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 60%, rgba(0, 0, 0, 0.95) 100%);
  padding: 16px 12px 12px;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  min-height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.game-card:hover .game-card__overlay {
  opacity: 1;
}

.game-card__title-overlay {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-heading);
}
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-card .aspect-square {
  width: 100%;
  height: 100%;
}
.game-item {
  width: 100%;
  max-width: 150px;
}
@media (min-width: 640px) {
  .game-item { max-width: 160px; }
}
@media (min-width: 1024px) {
  .game-item { max-width: 170px; }
}
.game-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-item .aspect-square {
  width: 100%;
  height: 100%;
}
.game-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-heading);
}
.game-card__badge--hot { background: var(--primary); color: #fff; }
.game-card__badge--new { background: #22c55e; color: #fff; }
.game-card__badge--category {
  background: rgba(255, 45, 85, 0.2);
  color: var(--primary);
  border: 1px solid var(--primary);
}
.game-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}
.game-card__rating svg { color: #fbbf24; }

/* Grids */
.games-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  padding: 0 16px;
}
@media (min-width: 480px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 640px) {
  .games-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; }
}
@media (min-width: 1024px) {
  .games-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1280px) {
  .games-grid { grid-template-columns: repeat(8, 1fr); }
}

/* Games scroll container */
.games-scroll-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.games-scroll-wrapper {
  flex: 1;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.games-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.games-scroll-wrapper .games-grid {
  display: flex;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  min-width: max-content;
  padding: 0;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(14, 13, 13, 0.9);
  color: white;
  border: none;
  border-radius: 20%;
  font-size: 29px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
 
  
}

.scroll-btn:hover {
  background: rgb(15, 15, 15);
  transform: translateY(-50%) scale(1.1);
}

.scroll-left {
  left: -15px;
}

.scroll-right {
  right: -15px;
}

@media (max-width: 768px) {
  .scroll-btn {
    width: 50px;
    height: 50px;
    font-size: 30px;
  }

  .scroll-left {
    left: 0;
  }

  .scroll-right {
    right: 0;
  }
}

/* Hero */
.hero-section {
  min-height: 350px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .hero-section { min-height: 400px; padding: 0; }
}
@media (min-width: 1024px) {
  .hero-section { min-height: 450px; }
}
.hero-grid {
  display: grid;
  gap: 24px;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.hero-image {
  border-radius: var(--card-radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  max-height: 300px;
}
@media (min-width: 640px) {
  .hero-image { max-height: 350px; }
}
@media (min-width: 1024px) {
  .hero-image { max-height: 400px; }
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
@media (min-width: 640px) {
  .hero-play-btn { padding: 14px 32px; font-size: 18px; }
}
.hero-play-btn:hover {
  background: var(--secondary);
  transform: scale(1.05);
}

/* Trending Carousel */
.trending-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
  padding: 0 16px 8px;
}
@media (min-width: 640px) {
  .trending-carousel { gap: 16px; padding: 0 0 8px; }
}
.trending-carousel::-webkit-scrollbar { display: none; }
.trending-carousel .game-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
}
@media (min-width: 480px) {
  .trending-carousel .game-card { flex: 0 0 180px; }
}
@media (min-width: 640px) {
  .trending-carousel .game-card { flex: 0 0 200px; }
}

/* Section */
.section-title {
  font-size: 1.25rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .section-title { font-size: 1.5rem; margin-bottom: 20px; padding: 0; }
}
.section-title a {
  color: var(--primary);
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
}

/* Game Player */
.frame-box-game {
  min-height: 300px;
  position: relative;
  
  overflow: hidden;
  background: var(--card-bg);
  width: 100%;
  margin: 0px;
}
@media (min-width: 480px) {
  .frame-box-game { min-height: 350px; }
}
@media (min-width: 640px) {
  .frame-box-game { min-height: 500px; margin: 0; }
}
@media (min-width: 1024px) {
  .frame-box-game { min-height: 500px; width: 100%; }
}
.game-preview, .game-preview-bgi, .game_area_frame { top: 0; height: 100%; width: 100%; left: 0; }
.game-preview { position: absolute; overflow: hidden; z-index: 1; }
.game-preview-bgi { position: absolute; z-index: 10; background-position: center; background-size: cover; filter: blur(10px); }
.game-preview__content {
  position: relative; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; background-color: rgb(0 0 0 / 0.6);
}
.game-preview__logo img { border-radius: 8px; box-shadow: 0 0 1rem 0 #fff; max-width: 150px; }
@media (min-width: 480px) {
  .game-preview__logo img { max-width: 180px; }
}
@media (min-width: 640px) {
  .game-preview__logo img { max-width: 200px; }
}
.game-preview__title {
  font-size: 20px; color: #fff; font-weight: 700; margin: 16px auto;
  background: linear-gradient(90deg, #fff0 0, rgb(0 0 0 / 0.3) 50%, #fff0);
  width: 100%; text-align: center; padding: 12px 0;
  font-family: var(--font-heading);
}
@media (min-width: 640px) {
  .game-preview__title { font-size: 24px; margin: 20px auto; padding: 14px 0; }
}
.play-btn__ctrl {
  height: 48px; background: var(--primary); font-weight: 700; color: #fff;
  font-size: 18px; padding: 0 24px; border-radius: 16px; border: 0; cursor: pointer;
  transition: all 0.15s; font-family: var(--font-heading);
}
@media (min-width: 640px) {
  .play-btn__ctrl { height: 50px; font-size: 22px; padding: 0 32px; }
}
.play-btn__ctrl:hover {
  background: var(--secondary);
  box-shadow: 0 0 2rem 0 rgba(255, 45, 85, 0.4);
  transform: scale(1.05);
}
.game-frame iframe { position: absolute; top: 0; bottom: 0; left: 0; right: 0; border: 0; width: 100%; height: 100%; }

/* Game page layout */
.game-page-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 320px;
  grid-template-areas:
    "player grid"
    "more-games grid"
    "info grid"
    "description grid"
    "faq comments"
    "tags comments";
}

.game-page-player-section {
  grid-area: player;
}

.game-page-grid-large-section {
  grid-area: more-games;
}

.game-page-info-section {
  grid-area: info;
}

.game-page-description-section {
  grid-area: description;
}

.game-page-faq-section {
  grid-area: faq;
}

.game-page-tags-section {
  grid-area: tags;
}

.game-page-grid-section {
  grid-area: grid;
}

.game-page-comments-section {
  grid-area: comments;
}

/* Tablet and mobile - stack columns */
@media (max-width: 1023px) {
  .game-page-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "player"
      "more-games"
      "info"
      "description"
      "faq"
      "tags"
      "grid"
      "comments";
  }
}

/* Mobile reordering */
@media (max-width: 639px) {
  .game-page-layout {
    display: flex;
    flex-direction: column;
  }

  .game-page-player-section {
    order: 1;
  }

  .game-page-grid-large-section {
    order: 2;
  }

  .game-page-description-section {
    order: 3;
  }

  .game-page-comments-section {
    order: 4;
  }

  .game-page-info-section {
    order: 5;
  }

  .game-page-faq-section {
    order: 6;
  }

  .game-page-tags-section {
    order: 7;
  }

  .game-page-grid-section {
    order: 8;
  }
}

/* Game page grid list */
/* 1. إعداد الشبكة للهاتف والحاسب */
.game-page-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr); /* دائماً بطاقتين في الصف */
  padding: 0 16px;
}



/* 2. التحكم في البطاقة داخل هذه الشبكة فقط */
.game-page-grid .game-card {
  width: 100% !important; /* تجبر البطاقة على أخذ عرض العمود */
  max-width: none !important; /* إلغاء القيد الذي كان يمنع التمدد */
  aspect-ratio: 1 / 1; /* الحفاظ على شكل المربع */
}

/* New game grid section below iframe - 6 columns */
.game-page-grid-large-section {
  margin-top: 0px;
}

.game-page-grid-large {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  padding: 0 16px;
}

@media (min-width: 480px) {
  .game-page-grid-large { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 640px) {
  .game-page-grid-large { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; }
}

@media (min-width: 1024px) {
  .game-page-grid-large { grid-template-columns: repeat(6, 1fr); }
}

.game-page-grid-large .game-card {
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: 1 / 1;
}

/* Player footer */
.player-footer {
  background: var(--card-bg);
 
  padding: 8px 12px;
}
@media (min-width: 640px) {
  
}
.player-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.player-footer__left { display: flex; align-items: center; gap: 12px; }
.player-footer__left img { border-radius: 5px; }
.player-footer__left h1 { font-size: 16px; font-weight: 700; color: var(--text); }
.player-footer__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.g-footer__button {
  background: var(--border); border: none; color: var(--text);
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
  position: relative;
}
.g-footer__button svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.g-footer__button:hover {
  background: var(--primary);
}
.g-footer__button[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: -70px;
  z-index: 1000;
  pointer-events: none;
  font-weight: 500;
}
.g-footer__button[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: -4px;
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  pointer-events: none;
}
.g-footer__button.active { background: var(--primary); }

/* Breadcrumbs */
.breadcrumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 12px;
  flex-wrap: wrap;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .breadcrumbs { gap: 8px; font-size: 14px; margin-bottom: 16px; padding: 0; }
}
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { color: var(--text-secondary); }

/* Info Table */
.info-table {
  width: 100%; border-collapse: collapse;
  background: var(--card-bg); border-radius: var(--card-radius);
  overflow: hidden; border: 1px solid var(--border);
  font-size: 13px;
}
@media (min-width: 640px) {
  .info-table { font-size: 14px; }
}
.info-table th, .info-table td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 640px) {
  .info-table th, .info-table td { padding: 12px 16px; }
}
.info-table th { color: var(--text-secondary); font-weight: 500; width: 140px; font-size: 14px; }
.info-table td { color: var(--text); font-size: 14px; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }

/* Tags */
.tag-pill {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 45, 85, 0.1);
  color: var(--primary);
  border: 1px solid rgba(255, 45, 85, 0.3);
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  transition: background var(--transition);
  margin: 4px;
}
.tag-pill:hover { background: rgba(255, 45, 85, 0.25); }

/* FAQ Accordion */
.faq-item {
  background: var(--card-bg);
  
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-question {
  width: 100%; padding: 16px 20px;
  background: none; border: none; color: var(--text);
  font-family: var(--font-heading); font-weight: 600; font-size: 15px;
  text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-question:hover { color: var(--primary); }
.faq-answer {
  padding: 0 20px 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}
.faq-item:not(.open) .faq-answer { display: none; }
.faq-icon { transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(180deg); }

/* Category Banner */
.category-banner {
  border-radius: var(--card-radius);
  padding: 0 2px;
  transform: translateY(28px);
}

@media (min-width: 640px) {
  .category-banner {
    padding: 3px 4px;
  }
}

@media (min-width: 1024px) {
  .category-banner {
    padding: 4px 3px;
  }
}

/* Search */
.search-input {
  width: 100%;
  padding: 10px 16px 10px 44px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--primary); }
.search-input::placeholder { color: var(--text-secondary); }

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--card-shadow);
}
.search-dropdown a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; color: var(--text); text-decoration: none;
  transition: background 0.15s;
}
.search-dropdown a:hover { background: rgba(255, 45, 85, 0.1); }
.search-dropdown img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

/* Footer */
.site-footer {
  background: #0a0c10;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 24px 16px 20px;
  margin-top: 32px;
}
@media (min-width: 640px) {
  .site-footer { padding: 32px 24px 24px; margin-top: 48px; }
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 24px;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  font-size: 14px;
}
.footer-links a:hover {
  color: var(--primary);
}
.site-footer h3, .site-footer h4 { color: var(--text); font-family: var(--font-heading); }
.site-footer a { color: var(--text-secondary); text-decoration: none; transition: color var(--transition); }
.site-footer a:hover { color: var(--primary); }

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--secondary); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.btn-outline:hover { border-color: var(--primary); }

/* Load More */
.load-more-container { text-align: center; padding: 32px 0; }

/* Comments */
/* Comments */ .comments-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin-top: 24px; }
.comments-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; } 
.comments-title { font-size: 18px; font-weight: 600; color: var(--text); margin: 0; } 
.comment-sort { display: flex; gap: 8px; }
.comment-sort button { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-secondary); cursor: pointer; font-size: 13px; transition: all 0.2s; }
 .comment-sort button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
  .comment-sort button:hover:not(.active) { background: var(--border); } 
  #comments-list { max-height: 500px; overflow-y: auto; padding-right: 8px; margin-bottom: 20px; }
   #comments-list::-webkit-scrollbar { width: 6px; } 
   #comments-list::-webkit-scrollbar-track { background: var(--card-bg); border-radius: 3px; } 
   #comments-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    #comments-list::-webkit-scrollbar-thumb:hover { background: var(--primary); } 
    .comment-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; transition: border-color 0.2s; } 
    .comment-item:hover { border-color: var(--primary); } 
    .comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } 
    .comment-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: #fff; flex-shrink: 0; } 
    .comment-info { display: flex; flex-direction: column; gap: 2px; } 
    .comment-author { font-size: 14px; font-weight: 600; color: var(--text); } 
    .comment-date { font-size: 12px; color: var(--text-secondary); }
     .comment-content { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; word-wrap: break-word; }
      .comment-actions { display: flex; gap: 16px; flex-wrap: wrap; }
       .comment-action-btn { background: none; border: none; color: var(--text-secondary); font-size: 13px; cursor: pointer; padding: 6px 12px; border-radius: 6px; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
        .comment-action-btn svg { width: 16px; height: 16px; } 
       .comment-action-btn:hover { color: var(--primary); background: rgba(255, 255, 255, 0.05); } 
.comment-form-container { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: 12px; padding: 20px; } 
.comment-form-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; } 
.user-avatar { flex-shrink: 0; } 
.comment-input-wrapper { flex: 1; } 
.comment-input { width: 100%; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; color: var(--text); font-size: 14px; outline: none; font-family: inherit; line-height: 1.5; transition: border-color 0.2s; }
 .comment-input:focus { border-color: var(--primary); } 
 .comment-input::placeholder { color: var(--text-secondary); } 
 .comment-send-btn { background: var(--primary); border: none; border-radius: 8px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; transition: all 0.2s; flex-shrink: 0; }
  .comment-send-btn:hover { opacity: 0.9; transform: scale(1.05); }
   .comment-form-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; } 
   .comment-field { flex: 1; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-size: 14px; outline: none; font-family: inherit; transition: border-color 0.2s; } 
   .comment-field:focus { border-color: var(--primary); } 
   .comment-field::placeholder { color: var(--text-secondary); }
    .comment-form-footer { display: flex; align-items: center; }
     .comment-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-secondary); } 
     .comment-checkbox input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* Game Content */
.game-content {
  background: var(--card-bg);
  
  border-radius: var(--card-radius);
  padding: 20px 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 14px;
}
@media (min-width: 640px) {
  .game-content { padding: 24px; font-size: 15px; }
}
.game-content h2, .game-content h3 {
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
}
.game-content p { margin-bottom: 1rem; }

/* Game Description Show More */
.game-description { position: relative; }
.game-description__content { 
  max-height: 300px; 
  overflow: hidden; 
  transition: max-height var(--transition) ease-in-out;
  position: relative;
}
.game-description__content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(24, 27, 32, 0), rgba(24, 27, 32, 0.8));
  pointer-events: none;
}
.game-description__content.expanded {
  max-height: none;
}
.game-description__content.expanded::after {
  display: none;
}
.game-description__toggle {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
  font-size: 14px;
}
.game-description__toggle:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

/* Prose static pages */
.prose h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.prose p { margin-bottom: 1rem; line-height: 1.7; color: var(--text-secondary); }
.prose h2 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--text); }

/* Back to top */
.btn_up {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  cursor: pointer; opacity: 0; visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index: 90; font-size: 18px;
}
.btn_up.show { opacity: 1; visibility: visible; }
.btn_up:hover { background: var(--secondary); }


/* Mobile menu */
.menu-mobile {
  display: none;
}

/* Sidebar Menu - Simplified Style */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-backdrop.open {
  display: block;
  opacity: 1;
}

.sidebar-menu {
  position: fixed;
  left: 0;           /* ابدأ من أقصى اليسار */
  top: 0;            /* من الأعلى */
  bottom: 0;         /* إلى الأسفل */
  width: 395px;      /* عرض القائمة الجانبية (يمكنك تعديله) */
  max-width: 80vw;   /* لضمان عدم خروجها عن الشاشة في الهواتف الصغيرة */
  height: 100%;      /* لتأخذ كامل الارتفاع */
  background: var(--card-bg);
  border-top: none;  /* إزالة الحدود العلوية */
  /* إضافة حدود جانبية */
  z-index: 101;
  
  /* التغيير الجوهري هنا للحركة الجانبية */
  transform: translateX(-100%); 
  transition: transform 400ms cubic-bezier(0.32, 0.72, 0, 1);
  
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.3); /* تعديل الظل ليكون جانبياً */
}

@media (min-width: 1024px) {
  .sidebar-menu {
    display: none !important;
  }
}

.sidebar-menu.open {
  transform: translateX(0);
}
.sidebar-search {
  position: relative;
  margin: 16px;
  display: flex;
  align-items: center;
}

.sidebar-search-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
  flex-shrink: 0;
}
.btn-bar {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 24px;
  color: #b5b5b5;
  transition: transform 0.3s;
}

/* تنسيق خاص عند فتح القائمة */

.sidebar-search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  background: rgba(255, 45, 85, 0.05);
  border: 1px solid rgba(255, 45, 85, 0.2);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: all var(--transition);
  pointer-events: auto; /* التأكد من تفعيل التفاعل */
  z-index: 105;
}

.sidebar-search-input::placeholder {
  color: var(--text-secondary);
}

.sidebar-search-input:focus {
  outline: none;
  background: rgba(255, 45, 85, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.1);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.sidebar-nav-link {
  display: block;
  padding: 14px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font-heading);
  font-size: 14px;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  margin: 0;
}

.sidebar-nav-link:hover {
  background: rgba(255, 45, 85, 0.1);
  color: var(--primary);
  border-left-color: var(--primary);
  padding-left: 22px;
}
.comments-section *,
.comment-form-container * {
  box-sizing: border-box;
}
/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text-secondary);
  text-decoration: none; font-size: 14px;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 30px;
}

/* Mobile */
@media (max-width: 768px) {
  .filter-bar {
    margin-top: 49px; /* عدّل القيمة حسب الحاجة */
  }
}
.filter-bar select {
  padding: 8px 14px; background: black;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 14px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Empty state */
.empty-state {
  text-align: center; padding: 64px 24px;
  color: var(--text-secondary);
}
.empty-state svg { margin-bottom: 16px; opacity: 0.5; }

/* Favorites grid placeholder */
#favorites-grid, #recent-grid { min-height: 200px; }
