/* ============================================
   Wosgames - Complete Custom CSS
   Pure CSS3 - No Frameworks, No Tailwind
   ============================================ */

/* ---------- CSS Variables (Dark Mode Default) ---------- */
:root {
  --bg-primary: #0A0F1D;
  --bg-secondary: #12182B;
  --bg-card: rgba(18, 24, 43, 0.7);
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --gold: #D4AF37;
  --gold-light: #F0D878;
  --gold-dark: #B8941F;
  --neon-blue: #00D4FF;
  --neon-glow: rgba(0, 212, 255, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --cta-pulse: #FFD700;
  --star-filled: #D4AF37;
  --star-empty: #3A4155;
  --radius: 16px;
  --header-height: 70px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* ---------- Light Mode Variables ---------- */
[data-theme="light"] {
  --bg-primary: #F0F2F5;
  --bg-secondary: #E8EBF0;
  --bg-card: rgba(255, 255, 255, 0.85);
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --glass-bg: rgba(0, 0, 0, 0.03);
  --glass-border: rgba(0, 0, 0, 0.08);
  --star-empty: #CBD5E1;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .main-header {
  background: rgba(240, 242, 245, 0.8);
}

[data-theme="light"] .main-header.scrolled {
  background: rgba(240, 242, 245, 0.95);
}

[data-theme="light"] .main-footer {
  background: #E8EBF0;
}

[data-theme="light"] .hero-bg {
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 212, 255, 0.04) 0%, transparent 50%),
    var(--bg-primary) !important;
}

[data-theme="light"] .game-card,
[data-theme="light"] .content-card,
[data-theme="light"] .game-detail-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .game-card:hover {
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 60px rgba(212, 175, 55, 0.08);
}

[data-theme="light"] .search-box input,
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
}

[data-theme="light"] .filter-btn {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-secondary);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .filter-btn:hover,
[data-theme="light"] .filter-btn.active {
  background: var(--gold);
  color: #fff;
}

[data-theme="light"] .skeleton-card {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .skeleton-image,
[data-theme="light"] .skeleton-text {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
}

[data-theme="light"] .mobile-menu {
  background: #E8EBF0;
}

[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  border: 1px solid rgba(0,0,0,0.1);
}

/* Smooth theme transition */
body, .main-header, .game-card, .content-card, .game-detail-card, 
.search-box input, .form-group input, .form-group textarea,
.filter-btn, .mobile-menu, .main-footer, .toast {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

/* LTR support */
html[dir="ltr"] body {
  direction: ltr;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* ---------- Utility Classes ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

.gradient-text {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  top: 90px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

html[dir="ltr"] .toast-container {
  left: auto;
  right: 24px;
}

.toast {
  background: rgba(18, 24, 43, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px 24px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  box-shadow: 0 10px 30px var(--shadow-color);
  transform: translateX(-120%);
  opacity: 0;
  animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: auto;
}

html[dir="ltr"] .toast {
  transform: translateX(120%);
  animation: toastSlideInLTR 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.toast-out {
  animation: toastSlideOut 0.3s ease forwards;
}

html[dir="ltr"] .toast.toast-out {
  animation: toastSlideOutLTR 0.3s ease forwards;
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success .toast-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.toast-info .toast-icon {
  background: rgba(0, 212, 255, 0.2);
  color: var(--neon-blue);
}

.toast-warning .toast-icon {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(-120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideInLTR {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-120%);
    opacity: 0;
  }
}

@keyframes toastSlideOutLTR {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  position: absolute;
  transition: all 0.4s ease;
}

.theme-toggle .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ---------- Language Dropdown ---------- */
.lang-dropdown {
  position: relative;
}

.lang-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.lang-btn:hover {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-normal);
  z-index: 3000;
  box-shadow: 0 10px 30px var(--shadow-color);
}

html[dir="ltr"] .lang-menu {
  right: auto;
  left: 0;
}

.lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  padding: 10px 16px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: right;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

html[dir="ltr"] .lang-option {
  text-align: left;
}

.lang-option:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold);
}

.lang-option.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold);
}

/* ---------- Header ---------- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(10, 15, 29, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-normal);
}

.main-header.scrolled {
  background: rgba(10, 15, 29, 0.95);
  border-bottom-color: var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -1px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  transition: text-shadow var(--transition-normal);
}

.logo:hover {
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

/* Logo with image in header */
.header-inner .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
}

.logo-img {
  height: 45px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 8px 0;
  transition: color var(--transition-normal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width var(--transition-normal);
  border-radius: 1px;
}

html[dir="ltr"] .nav-link::after {
  right: auto;
  left: 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-secondary);
  z-index: 2000;
  padding: 80px 32px 32px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  border-left: 1px solid var(--glass-border);
}

html[dir="ltr"] .mobile-menu {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  border-left: none;
  border-right: 1px solid var(--glass-border);
}

.mobile-menu.open {
  transform: translateX(0);
}

.menu-close {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

html[dir="ltr"] .menu-close {
  left: auto;
  right: 24px;
}

.menu-close:hover {
  background: var(--gold);
  color: var(--bg-primary);
}

.mobile-menu .nav-link {
  display: block;
  padding: 16px 0;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--glass-border);
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu.open + .mobile-menu-backdrop {
  opacity: 1;
  visibility: visible;
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 20s ease infinite alternate;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 1;
}

.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.particle {
  position: absolute;
  background: var(--gold-light);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 8px var(--gold), 0 0 15px rgba(212, 175, 55, 0.5);
  animation-name: particle-float !important;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 15, 29, 0.2) 0%, rgba(10, 15, 29, 0.75) 75%, var(--bg-primary) 100%);
  pointer-events: none;
  z-index: 3;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-primary);
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 16px 40px;
  border-radius: 50px;
  border: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.hero-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
}

.hero-cta:hover::before {
  left: 100%;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.hero-scroll svg {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
}

@keyframes particle-float {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-40px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(0.5);
  }
}

/* ---------- Section Styles ---------- */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}

html[dir="ltr"] .section-title::after {
  right: auto;
  left: 0;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 24px auto 0;
}

/* ---------- Search & Filter Bar ---------- */
.search-filter-bar {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-box .search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

html[dir="ltr"] .search-box .search-icon {
  right: auto;
  left: 16px;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-normal);
}

html[dir="ltr"] .search-box input {
  padding: 14px 48px 14px 20px;
}

.search-box input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-btn.active {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* ---------- Games Grid ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

/* ---------- Game Card ---------- */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition-slow);
  position: relative;
  backdrop-filter: blur(10px);
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px var(--shadow-color),
    0 0 60px rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.3);
}

.game-card-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.game-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .game-card-image {
  transform: scale(1.1);
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 15, 29, 0.9) 0%, rgba(10, 15, 29, 0.3) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.btn-details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--gold);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50px;
  transition: all var(--transition-normal);
  transform: translateY(10px);
  opacity: 0;
}

.game-card:hover .btn-details {
  transform: translateY(0);
  opacity: 1;
}

.btn-details:hover {
  background: var(--gold-light);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
  z-index: 5;
}

html[dir="ltr"] .wishlist-btn {
  right: auto;
  left: 12px;
}

.wishlist-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.wishlist-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.wishlist-btn.active {
  background: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
}

.wishlist-btn.active svg {
  fill: currentColor;
}

.game-card-content {
  padding: 24px;
}

.game-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.game-card-rating {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 1rem;
}

.star-filled {
  color: var(--star-filled);
}

.star-empty {
  color: var(--star-empty);
}

.game-card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-genre {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 50px;
}

.game-size {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Skeleton Loading ---------- */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, rgba(255,255,255,0.05) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-text {
  height: 16px;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, rgba(255,255,255,0.05) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-text.long {
  width: 100%;
}

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

/* ---------- No Results ---------- */
.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
}

.no-results svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ---------- Footer ---------- */
.main-footer {
  background: var(--bg-secondary);
  padding: 80px 0 32px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--glass-border);
}

.footer-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

.footer-watermark img {
  width: 400px;
  height: auto;
  max-width: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.social-icon:hover {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- Content Section (About, Contact, etc.) ---------- */
.content-section {
  padding: 140px 0 80px;
  min-height: 60vh;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 48px;
  max-width: 800px;
  margin: 0 auto;
  backdrop-filter: blur(10px);
}

.content-card h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.content-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--gold);
}

.content-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-card ul {
  list-style: disc;
  padding-right: 24px;
  margin-bottom: 16px;
}

html[dir="ltr"] .content-card ul {
  padding-right: 0;
  padding-left: 24px;
}

.content-card ul li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

/* ---------- Contact Form ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 14px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  align-self: flex-start;
}

.btn-submit:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

/* ---------- Game Detail Page ---------- */
.game-banner {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.game-banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.game-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 15, 29, 0.3) 0%, var(--bg-primary) 100%);
}

.game-detail-section {
  padding: 0 0 80px;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.game-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 48px;
  backdrop-filter: blur(10px);
  max-width: 900px;
  margin: 0 auto;
}

.game-detail-header {
  margin-bottom: 32px;
}

.game-detail-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.game-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.meta-item {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.meta-label {
  font-weight: 600;
  color: var(--gold);
}

.game-detail-description {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.game-features {
  margin-bottom: 32px;
}

.features-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-item svg {
  color: var(--gold);
  flex-shrink: 0;
}

.game-detail-cta {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
}

.cta-pulse {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 48px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-primary);
  font-weight: 800;
  font-size: 1.2rem;
  border-radius: 50px;
  transition: all var(--transition-normal);
  animation: ctaPulse 2s infinite;
}

@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
  }
}

.cta-pulse:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
}

.cta-note {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Interactive Rating */
.interactive-rating {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 2px;
  transition: all 0.2s ease;
}

.star-btn.star-filled {
  color: var(--star-filled);
}

.star-btn.star-empty {
  color: var(--star-empty);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .game-detail-card {
    padding: 32px;
  }
  
  .game-detail-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .content-card {
    padding: 32px 24px;
  }
  
  .game-banner {
    height: 250px;
  }
  
  .game-detail-card {
    padding: 24px;
    margin: 0 16px;
  }
  
  .game-detail-title {
    font-size: 1.75rem;
  }
  
  .game-detail-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .games-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes kenburns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   NEW STYLES FOR STATIC GAME PAGES
   Appended for SEO Migration
   ============================================ */

/* ---------- Game Page Section Layout ---------- */
.game-page-section {
  padding: 60px 0;
  border-top: 1px solid var(--glass-border);
}

.game-page-section:first-of-type {
  border-top: none;
}

.game-page-section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-page-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 28px;
  background: linear-gradient(180deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}

html[dir="ltr"] .game-page-section-title::before {
  margin-right: 0;
  margin-left: 0;
}

.game-page-section-content {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
}

.game-page-section-content p {
  margin-bottom: 16px;
}

/* ---------- Image Gallery Grid ---------- */
.game-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.game-gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.game-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px var(--shadow-color);
  border-color: rgba(212, 175, 55, 0.3);
}

.game-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-gallery-item:hover img {
  transform: scale(1.08);
}

.game-gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 2px dashed var(--glass-border);
}

/* ---------- Hero Cards Grid ---------- */
.game-heroes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition-normal);
  text-align: center;
}

.hero-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px var(--shadow-color);
  border-color: rgba(212, 175, 55, 0.3);
}

.hero-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: 1px solid var(--glass-border);
}

.hero-card-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 3rem;
  border-bottom: 1px solid var(--glass-border);
}

.hero-card-info {
  padding: 20px;
}

.hero-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero-card-role {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-card-power {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Warning / Info Cards ---------- */
.warning-card {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(234, 179, 8, 0.05));
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.warning-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #eab308, #ca8a04);
  border-radius: 0 2px 2px 0;
}

html[dir="ltr"] .warning-card::before {
  right: auto;
  left: 0;
  border-radius: 2px 0 0 2px;
}

.warning-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #eab308;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-card-text {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Info Card variant */
.info-card {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 212, 255, 0.03));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--neon-blue), #0891b2);
  border-radius: 0 2px 2px 0;
}

html[dir="ltr"] .info-card::before {
  right: auto;
  left: 0;
  border-radius: 2px 0 0 2px;
}

.info-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-blue);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card-text {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ---------- Video Review Button ---------- */
.video-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50px;
  transition: all var(--transition-normal);
  margin-top: 16px;
}

.video-review-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

.video-review-btn svg {
  width: 20px;
  height: 20px;
}

/* ---------- Feature List (Bulleted) ---------- */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-list-item:last-child {
  border-bottom: none;
}

.feature-list-item svg {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Responsive for new sections ---------- */
@media (max-width: 768px) {
  .game-page-section {
    padding: 40px 0;
  }
  
  .game-gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .game-heroes-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-card {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .warning-card,
  .info-card {
    padding: 20px;
  }
}
/* ============================================
   Small Hero Cards (Whiteout Survival)
   ============================================ */
.heroes-intro-text {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.game-heroes-grid {
  display: grid;
  /* حجم مرن وصغير للبطاقات (150px) يسمح بعرض أبطال كُثر في السطر */
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  justify-content: center;
}

.hero-card-small {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-card-small:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--gold);
}

.hero-card-image {
  width: 100%;
  aspect-ratio: 1 / 1; /* لجعل الصورة مربعة تماماً */
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2); 
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-card-small:hover .hero-card-image img {
  transform: scale(1.1); /* تأثير التكبير عند تمرير الماوس */
}

.hero-card-body {
  padding: 16px 12px;
  text-align: center;
  width: 100%;
}

.hero-name-ar {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.hero-name-en {
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* ألوان الشارات المستوحاة من ندرة أبطال الـ RPG */
.badge.gold {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.badge.green {
  background: linear-gradient(135deg, #10B981, #059669);
}

.badge.blue {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
}

.badge.red {
  background: linear-gradient(135deg, #EF4444, #DC2626);
}
