
  :root {
    --primary: #FF6B35;
    --secondary: #FFD23F;
    --accent1: #06D6A0;
    --accent2: #118AB2;
    --accent3: #EF476F;
    --accent4: #9B5DE5;
    --dark: #0756A0;
    --light: #FFF8F0;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html {scroll-behavior: smooth;}

  body {
    font-family: 'Tajawal', sans-serif;
    background: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    direction: rtl;
  }

  /* ── HEADER ── */
  header {
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d5e 100%);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    max-width: 125px;
  }
  .logo img{
    width: 100%;
    animation: logoPulse 3s ease-in-out infinite;
  }
  /* .logo-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
    animation: logoPulse 3s ease-in-out infinite;
  } */
  @keyframes logoPulse {
    0%,100%{transform:scale(1)} 50%{transform:scale(1.05)}
  }
  /* .logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.5px;
  } */
  /* .logo-text span { color: var(--secondary); } */

  nav { display: flex; gap: 8px; align-items: center; }
  nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.25s;
  }
  nav a:hover { background: rgba(255,255,255,0.15); color: var(--secondary); }
  nav a.active { background: var(--primary); color: white; }

  .hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
  .hamburger span { width: 25px; height: 3px; background: white; border-radius: 3px; transition: all 0.3s; }

  /* ── HERO ── */
  .hero {
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
    padding: 80px 2rem 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
  .floating-letters {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  }
  .fl {
    position: absolute;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    opacity: 0.07;
    color: white;
    animation: float linear infinite;
  }
  @keyframes float {
    0%{transform:translateY(100vh) rotate(0deg)} 100%{transform:translateY(-200px) rotate(360deg)}
  }
  .hero-content { position: relative; z-index: 2; }
  .hero-badge {
    display: inline-block;
    background: rgba(255,210,63,0.2);
    border: 2px solid var(--secondary);
    color: var(--secondary);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 24px;
    animation: badgePop 0.6s ease;
  }
  @keyframes badgePop { from{transform:scale(0.8);opacity:0} to{transform:scale(1);opacity:1} }
  .hero h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    color: white;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: slideUp 0.8s ease 0.2s both;
  }
  .hero h1 span { color: var(--secondary); }
  .hero p {
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: slideUp 0.8s ease 0.4s both;
  }
  @keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }

  .hero-letters {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
    margin-bottom: 40px;
    animation: slideUp 0.8s ease 0.5s both;
  }
  .hletter {
    width: 56px; height: 56px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
    cursor: pointer;
    transition: all 0.25s;
    backdrop-filter: blur(10px);
  }
  .hletter:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(255,107,53,0.4);
  }

  .hero-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, var(--primary), #ff8c42);
    color: white;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 900;
    box-shadow: 0 8px 30px rgba(255,107,53,0.4);
    transition: all 0.3s;
    animation: slideUp 0.8s ease 0.6s both;
  }
  .hero-cta:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(255,107,53,0.5); }

  /* ── STATS ── */
  .stats {
    background: white;
    padding: 40px 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  }
  .stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
  }
  .stat { text-align: center; }
  .stat-num {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .stat-label { font-size: 0.9rem; color: #888; font-weight: 700; margin-top: 4px; }

  /* ── GAMES SECTION ── */
  .games-section {
    padding: 80px 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  .section-header { text-align: center; margin-bottom: 60px; }
  .section-label {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--accent3));
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 1px;
  }
  .section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
  }
  .section-header p { color: #888; font-size: 1.1rem; }

  .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
  }

  .game-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    cursor: pointer;
    display: block;
  }
  .game-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
  }

  .game-thumb {
    height: 220px;
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
  }
  .game-thumb-bg {
    position: absolute; inset: 0;
    background: var(--thumb-bg);
    transition: transform 0.5s ease;
  }
  .game-card:hover .game-thumb-bg { transform: scale(1.1); }

  .game-thumb-content {
    position: relative; z-index: 2;
    text-align: center;
  }
  .game-icon {
    font-size: 5rem;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
    animation: iconBounce 2s ease-in-out infinite;
  }
  @keyframes iconBounce {
    0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)}
  }
  .game-card:hover .game-icon { animation-duration: 0.6s; }

  .game-badge {
    position: absolute;
    top: 16px; left: 16px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
  }
  .game-new {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--accent3);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    animation: newPulse 1.5s ease-in-out infinite;
  }
  @keyframes newPulse { 0%,100%{opacity:1} 50%{opacity:0.7} }

  .game-info { padding: 24px; }
  .game-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .game-desc {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  .game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .game-tags { display: flex; gap: 8px; flex-wrap: wrap; }
  .tag {
    background: var(--tag-bg, #f0f0f0);
    color: var(--tag-color, #666);
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
  }
  .game-play {
    background: var(--play-bg);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 14px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    display: flex; align-items: center; gap: 6px;
  }
  .game-play:hover { transform: scale(1.05); filter: brightness(1.1); }

  /* Stars */
  .stars { color: var(--secondary); font-size: 0.85rem; }

  /* ── ALPHABET SECTION ── */
  .alphabet-section {
    background: linear-gradient(135deg, #1A1A2E, #0F3460);
    padding: 80px 2rem;
  }
  .alphabet-inner { max-width: 1200px; margin: 0 auto; }
  .alphabet-inner .section-header h2 { color: white; }
  .alphabet-inner .section-header p { color: rgba(255,255,255,0.6); }

  .alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
  }
  .alpha-card {
    background: rgba(255,255,255,0.07);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    backdrop-filter: blur(10px);
  }
  .alpha-card:hover {
    background: var(--card-color);
    border-color: var(--card-color);
    transform: translateY(-6px) scale(1.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }
  .alpha-letter { font-size: 2rem; font-weight: 900; color: white; }
  .alpha-name { font-size: 0.65rem; color: rgba(255,255,255,0.6); margin-top: 4px; }
  .alpha-card:hover .alpha-name { color: white; }

  /* ── FOOTER ── */
  footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 40px 2rem;
  }
  footer .footer-logo {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 8px;
  }
  footer .footer-logo span { color: var(--secondary); }
  footer p { font-size: 0.9rem; margin-top: 12px; }

  footer .social-media{
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  
  footer .social-media .icon{
    width: 40px;
    height: 40px;
    transition: 0.5s all ease-in-out;
    cursor: pointer;
  }

  footer .social-media .icon:hover{
    transform: rotate(20deg) scale(1.1);
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 768px) {
    nav { display: none; }
    .hamburger { display: flex; }
    nav.open {
      display: flex;
      flex-direction: column;
      position: fixed;
      inset: 70px 0 0;
      background: var(--dark);
      padding: 20px;
      z-index: 999;
    }
    nav.open a { font-size: 1.2rem; padding: 14px; border-radius: 12px; }
    .stats-inner { gap: 30px; }
    .alphabet-grid { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); }
  }