@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;600;700;800&display=swap");

:root {
  --blue: #007fff;
  --orange: #ff5722;
  --charcoal: #333333;
  --cream: #f5f5f5;
  --black: #121212;
  --glass: rgba(18, 18, 18, 0.65);
  --border: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Tajawal", sans-serif;
  background: #121212;
  color: var(--cream);
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: radial-gradient(
    ellipse at bottom,
    rgba(0, 127, 255, 0.25),
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
  animation: bottomGlow 4s ease-in-out infinite;
}

@keyframes bottomGlow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(18, 18, 18, 0.6);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(18, 18, 18, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo-wrap {
  width: 48px;
  height: 48px;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(120deg, #ffffff, #cfd8ff, #ffffff);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-subtitle {
  font-size: 0.85rem;
  opacity: 0.7;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
}

.nav a {
  position: relative;
  padding-bottom: 0.3rem;
  transition: all 0.3s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
  box-shadow: 0 0 10px var(--blue);
}

.nav a:hover {
  transform: translateY(-2px);
  color: var(--blue);
}

.nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.lang-toggle {
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 127, 255, 0.3);
}

.lang-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 127, 255, 0.5);
}

.menu-btn {
  display: none;
  background: none;
  color: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.hero {
  position: relative;
  padding: 10rem 0 8rem;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-logo-center {
  width: 220px;
  margin: 0 auto 3rem;
  transition: all 0.5s ease;
  animation: logoFloat 6s ease-in-out infinite;
  position: relative;
  filter: drop-shadow(0 0 30px rgba(0, 127, 255, 0.5))
          drop-shadow(0 0 60px rgba(0, 127, 255, 0.3));
}

.hero-logo-center:hover {
  transform: scale(1.1) rotate(2deg);
  filter: drop-shadow(0 0 40px rgba(0, 127, 255, 0.8))
          drop-shadow(0 0 80px rgba(0, 127, 255, 0.5))
          drop-shadow(0 0 120px rgba(255, 87, 34, 0.3));
}

.hero-logo-center img {
  width: 100%;
  height: auto;
  transition: all 0.5s ease;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}


.hero-tagline {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  font-weight: 500;
  animation: fadeInUp 1s ease 0.3s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 0.9;
    transform: translateY(0);
  }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

.btn {
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--orange));
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 127, 255, 0.35);
  animation: btnGlow 2s ease-in-out infinite;
}

.btn.ghost {
  border-color: var(--border);
  background: transparent;
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn.primary:hover {
  box-shadow: 0 15px 50px rgba(0, 127, 255, 0.6);
}

@keyframes btnGlow {
  0%,
  100% {
    box-shadow: 0 10px 30px rgba(0, 127, 255, 0.35);
  }
  50% {
    box-shadow: 0 10px 40px rgba(0, 127, 255, 0.6);
  }
}


.section {
  padding: 5rem 0;
}

.section-head {
  margin-bottom: 3rem;
  max-width: 720px;
}

.section-head.centered {
  max-width: 100%;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2rem, 2.5vw, 2.8rem);
  margin-bottom: 0.8rem;
  background: linear-gradient(
    120deg,
    #ffffff,
    #007fff,
    #ff5722,
    #ffffff
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGradient 3s linear infinite;
}

.section-head p {
  opacity: 0.8;
}

@keyframes textGradient {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 900px;
  margin: 0 auto;
}

.grid.three > * {
  animation: fadeInUp 0.8s ease backwards;
}

.grid.three > *:nth-child(1) {
  animation-delay: 0.1s;
}

.grid.three > *:nth-child(2) {
  animation-delay: 0.2s;
}

.grid.three > *:nth-child(3) {
  animation-delay: 0.3s;
}

.card,
.game-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 127, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.game-card::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 25%,
    rgba(0, 127, 255, 0.25) 35%,
    rgba(0, 127, 255, 0.4) 40%,
    rgba(0, 127, 255, 0.25) 45%,
    transparent 55%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 30%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.15) 70%,
    transparent 85%
  );
  -webkit-mask-image: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 30%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.15) 70%,
    transparent 85%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: cardRotate 4s linear infinite;
  z-index: 0;
  filter: blur(1px);
}

.game-card:hover::before,
.game-card:hover::after {
  opacity: 1;
}

.game-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 60px rgba(0, 127, 255, 0.4);
  border-color: rgba(0, 127, 255, 0.5);
}

.game-card h3,
.game-card p,
.game-card .game-badge,
.game-card .game-tags {
  position: relative;
  z-index: 1;
}

@keyframes cardRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 127, 255, 0.12), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-card:hover::before {
  opacity: 1;
}

.game-badge {
  display: inline-block;
  background: var(--blue);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
  animation: badgePulse 2s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(0, 127, 255, 0.5);
}

.game-badge.alt {
  background: var(--orange);
  box-shadow: 0 0 15px rgba(255, 87, 34, 0.5);
  animation-delay: 0.5s;
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(0, 127, 255, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 127, 255, 0.8);
  }
}

.game-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.game-tags span {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  cursor: default;
}

.game-tags span:hover {
  background: rgba(0, 127, 255, 0.3);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(0, 127, 255, 0.5);
}



.contact-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: all 0.5s ease;
  text-decoration: none;
  color: var(--cream);
}

.contact-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: all 0.5s ease;
  filter: drop-shadow(0 0 15px rgba(0, 127, 255, 0.3))
          drop-shadow(0 0 30px rgba(0, 127, 255, 0.2));
}

.contact-icon p {
  font-size: 0.9rem;
  opacity: 0.85;
  transition: all 0.3s ease;
  text-align: center;
}

.contact-icon:hover {
  transform: translateY(-8px);
}

.contact-icon:hover img {
  transform: scale(1.2);
  filter: drop-shadow(0 0 25px rgba(0, 127, 255, 0.8))
          drop-shadow(0 0 50px rgba(0, 127, 255, 0.5))
          drop-shadow(0 0 80px rgba(255, 87, 34, 0.3));
}

.contact-icon:hover p {
  color: var(--blue);
  text-shadow: 0 0 15px rgba(0, 127, 255, 0.6);
}

.site-footer {
  padding: 2rem 0;
  background: transparent;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.muted {
  opacity: 0.6;
}

#to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  border: none;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  box-shadow: 0 8px 20px rgba(0, 127, 255, 0.4);
}

#to-top.show {
  opacity: 1;
  transform: translateY(0);
  animation: toTopPulse 2s ease-in-out infinite;
}

#to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 12px 30px rgba(0, 127, 255, 0.6);
}

@keyframes toTopPulse {
  0%,
  100% {
    box-shadow: 0 8px 20px rgba(0, 127, 255, 0.4);
  }
  50% {
    box-shadow: 0 8px 30px rgba(0, 127, 255, 0.7);
  }
}

.glow-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}




@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 72px 20px auto 20px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid var(--border);
    border-radius: 16px;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }

  .menu-btn {
    display: inline-flex;
  }

  .hero-logo-center {
    width: 180px;
  }

  .contact-icons {
    gap: 3rem;
  }
}
