@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

/* ====== أساسيات الثيم (داكن + أخضر) ====== */
:root {
  --bg-900: #0a0f0d;
  /* خلفية رئيسية داكنة */
  --bg-800: #0e1412;
  /* طبقة زجاجية خفيفة */
  --text-100: #e8fff3;
  /* نص رئيسي */
  --text-300: #b9e4cf;
  /* نص ثانوي */
  --border: 1px solid rgba(255, 255, 255, 0.05);

  /* أخضر ثيم */
  --g-400: #1db36f;
  --g-500: #18a565;
  --g-600: #118454;

  /* تدرج زر */
  --accent-grad: linear-gradient(135deg, var(--g-600), var(--g-400));

  /* بصريات */
  --radius: 16px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .40), 0 0 80px rgba(22, 199, 126, .10);

  --font: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  font-family: inherit;
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-100);
  background: var(--bg-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ====== خلفية ضباب/ميست متحركة وخفيفة ====== */
body.landing {
  position: relative;
  overflow-x: hidden;
}

/* ==== خلفية متحركة بثيم داكن + ضباب وموجات ناعمة ==== */
body.landing::before,
body.landing::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
}

body.landing::before {
  background:
    radial-gradient(35% 25% at 20% 30%, rgba(29, 179, 111, .25), transparent 70%),
    radial-gradient(40% 30% at 80% 70%, rgba(17, 132, 84, .20), transparent 70%),
    radial-gradient(30% 20% at 50% 90%, rgba(24, 165, 101, .25), transparent 70%);
  filter: blur(40px);
  animation: mistFloat 20s ease-in-out infinite alternate;
  opacity: .25;
}

body.landing::after {
  background: repeating-linear-gradient(135deg,
      rgba(35, 192, 122, .04) 0px,
      rgba(35, 192, 122, .08) 4px,
      transparent 4px,
      transparent 12px);
  animation: waveFlow 40s linear infinite;
  mix-blend-mode: overlay;
  opacity: .08;
}

/* حركة الضباب */
@keyframes mistFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-2%, 2%, 0) scale(1.05);
  }

  100% {
    transform: translate3d(2%, -1%, 0) scale(1.03);
  }
}

/* حركة موجات ناعمة تمشي قطريًا */
@keyframes waveFlow {
  from {
    transform: translateX(0) rotate(0deg);
  }

  to {
    transform: translateX(-20%) rotate(1deg);
  }
}

/* ====== شريط علوي ====== */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(to bottom, rgba(10, 15, 13, 0.95) 20%, rgba(10, 15, 13, 0));
  pointer-events: none;
  /* Let clicks pass through the faded area */
}

.nav>* {
  pointer-events: auto;
  /* Re-enable clicks for items inside nav */
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none
}

.brand__logo {
  width: 36px;
  height: 36px;
  object-fit: contain
}

.brand__name {
  font-weight: 700;
  letter-spacing: .2px
}

.nav__actions {
  display: flex;
  gap: 10px
}

/* ====== أزرار ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-100);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn--ghost {
  background: transparent;
}

.btn-back {
  padding: 0 10px;
}

.btn-back:hover {
  background: rgba(255, 75, 92, 0.15);
  border-color: rgba(255, 75, 92, 0.4);
  color: #ff4b5c;
}

.btn--grad {
  background: var(--accent-grad);
  border: none;
  color: #062214;
}

.btn--lg {
  height: 48px;
  padding: 0 20px;
  border-radius: 14px;
}

/* ====== الهيرو (قسم ترحيبي بسيط وواضح) ====== */
.hero {
  min-height: calc(100dvh - 70px);
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 60px) 20px 24px;
}

.hero__text {
  width: min(100%, 840px);
  background: rgba(12, 18, 16, .35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: clamp(12px, 2vw, 18px);
  padding: clamp(18px, 4vw, 28px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  margin-bottom: 200px;
  text-align: center;
}

.hero__title {
  font-size: clamp(26px, 4.4vw, 44px);
  margin: 0 0 8px;
}

.hero__sub {
  margin: 0 0 18px;
  color: var(--text-300);
}

.hero__cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  color: #ffffff;
}

/* ====== الفوتر ====== */
.foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 12px;
  text-align: center;
  color: var(--text-300);
  background: linear-gradient(to top, rgba(10, 15, 13, 0.95) 20%, rgba(10, 15, 13, 0));
  z-index: 90;
  pointer-events: none;
}

.foot-link {
  pointer-events: auto;
}

.foot-link {
  color: #b5b5b5a4;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0.8) 50%,
      rgba(255, 255, 255, 0) 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  display: inline-block;
  animation: shine 3s linear infinite;
  transition: 0.3s ease;
}

.foot-link:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

@keyframes shine {
  0% {
    background-position: 100%;
  }

  100% {
    background-position: -100%;
  }
}

/* ====== تجاوب ====== */
@media (max-width: 640px) {
  .nav {
    padding: 12px 14px;
  }

  .btn {
    height: 38px;
    padding: 0 14px;
  }

  .btn--lg {
    height: 44px;
  }
}

/* Liquid Ether Background */
#ether-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* خلف كل شيء */
  pointer-events: none;
  /* لا يتداخل مع النقر */
  filter: blur(40px);
  /* نعومة السوائل */
  opacity: 0.55;
  /* قوّة التأثير */
  mix-blend-mode: screen;
  /* يندمج مع الخلفية الداكنة */
}

/* يُفضّل بقاء خلفية الصفحة داكنة */
body {
  background: #0a0f0d;
}

/* خلفية Ether */
#ether-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

/* الشريط العلوي */
.top-bar {
  width: 100%;
  height: 70px;
  background: rgba(255, 255, 255, 0);
  /* شفاف جداً */
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);

  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  /* يعطي إحساس زجاج */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);

  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

}

.site-title {
  font-size: 30px;
  color: rgb(255, 255, 255);
  margin: 0;
  font-weight: bold;
}

.back-btn {
  position: absolute;
  left: 20px;
  top: 18px;
  background: rgba(255, 255, 255, 0.192);
  padding: 8px 30px;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  transition: 0.25s;
}

.back-btn:hover {
  transform: scale(1.08);
}

/* كروت الألعاب */
.games-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  padding: 60px;
}

.game-card {
  background: #9fdbb32a;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  /* يعطي إحساس زجاج */
  border-radius: 35px;
  height: 400px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s ease;
}

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

/* المحتوى الأساسي */
.card-content {
  text-align: center;
  padding-top: 50px;
  transition: 0.25s ease;
}

.game-img {
  width: 390px;
  height: 220px;
  object-fit: cover;
  border-radius: 15px;
}

.game-title {
  color: white;
  margin-top: 10px;
  font-size: 1.3rem;
}

/* المحتوى عند المرور */
.card-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.473);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  opacity: 0;
  transition: 0.25s ease;
}

.game-card:hover .card-content {
  opacity: 0;
}

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

.game-area {
  padding: 50px;
}

.game-inner-title {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

/* صندوق اللعبة */
.game-box {
  width: 100%;
  height: 400px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 25px;
  backdrop-filter: blur(6px);
  padding: 20px;
}

/* ====== Modern Alerts (Toast) ====== */
.alert-box {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: 14px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-10px);
  transition: 0.25s ease;
  line-height: 1.6;
}

.alert-show {
  opacity: 1;
  transform: translateY(0);
}

.alert-success {
  background: rgba(0, 255, 140, 0.45);
  border: 1px solid rgba(0, 255, 140, 0.6);
}

.alert-error {
  background: rgba(255, 50, 70, 0.45);
  border: 1px solid rgba(255, 50, 70, 0.6);
}

.alert-info {
  background: rgba(120, 90, 255, 0.45);
  border: 1px solid rgba(120, 90, 255, 0.6);
}

.alert-btn {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-weight: 600;
  transition: 0.2s;
}

.alert-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.logo-animated {
  animation: floatLogo 4s ease-in-out infinite;
}

@keyframes floatLogo {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0);
  }
}

.twitch-user-box {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  font-weight: 800;
  font-size: .9rem;
}

.twitch-user-box img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ====== نافذة إدخال القناة ====== */
.channel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.channel-modal-overlay.show {
  display: flex;
  opacity: 1;
}

.channel-modal-box {
  width: 90%;
  max-width: 400px;
  background: rgba(15, 15, 20, 0.95);
  border: 1px solid rgba(42, 211, 216, 0.3);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(42, 211, 216, 0.15);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
}

.channel-modal-overlay.show .channel-modal-box {
  transform: translateY(0) scale(1);
}

.channel-modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.channel-modal-title svg {
  width: 42px;
  height: 42px;
  fill: #2ad3d8;
  filter: drop-shadow(0 0 8px rgba(42, 211, 216, 0.6));
}

.channel-modal-desc {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 20px;
}

.channel-modal-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px;
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
  font-family: inherit;
  outline: none;
  transition: 0.2s;
  margin-bottom: 20px;
}

.channel-modal-input:focus {
  border-color: #2ad3d8;
  box-shadow: 0 0 12px rgba(42, 211, 216, 0.3);
  background: rgba(0, 0, 0, 0.8);
}

.channel-modal-btns {
  display: flex;
  gap: 12px;
}

.channel-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: 0.2s;
  font-family: inherit;
}

.btn-save {
  background: linear-gradient(135deg, #2ad3d8, #15d0d4);
  color: #000;
  box-shadow: 0 4px 15px rgba(42, 211, 216, 0.4);
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 211, 216, 0.6);
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ====== زر التواصل الطافي (Floating Contact Button) ====== */
.floating-contact-btn {
  position: fixed;
  bottom: 80px;
  /* Above the footer */
  right: 30px;
  width: 55px;
  height: 55px;
  background: rgba(29, 179, 111, 0.25);
  border: 1px solid rgba(29, 179, 111, 0.5);
  backdrop-filter: blur(12px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(29, 179, 111, 0.3);
  cursor: pointer;
  z-index: 95;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background 0.3s;
  outline: none;
}

.floating-contact-btn:hover {
  transform: translateY(-5px) scale(1.08);
  background: rgba(29, 179, 111, 0.45);
  box-shadow: 0 8px 25px rgba(29, 179, 111, 0.6);
}

.floating-contact-btn svg {
  width: 30px;
  height: 30px;
  fill: #44ac6cc9;
}

/* ====== نافذة تواصل معنا (Contact Us Modal)/* نافذة التواصل */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.contact-modal-box {
  background: rgba(15, 20, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  border-radius: 24px;
  position: relative;
}

.contact-modal-overlay.show .contact-modal-box {
  transform: translateY(0) scale(1);
}

.contact-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-close-btn:hover {
  background: rgba(255, 50, 70, 0.8);
  transform: rotate(90deg);
}

.contact-modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact-modal-title svg {
  width: 50px;
  height: 50px;
  fill: rgba(42, 216, 80, 0.568);
  filter: drop-shadow(0 0 12px rgba(42, 216, 80, 0.5));
}

.contact-modal-desc {
  font-size: 0.95rem;
  opacity: 0.75;
  margin-bottom: 28px;
  line-height: 1.5;
}

.social-links-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.3s ease;
}

.social-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  transition: 0.3s ease;
}

.social-twitter:hover {
  background: #1DA1F2;
  border-color: #1DA1F2;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

.social-insta:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
}

.social-discord:hover {
  background: #5865F2;
  border-color: #5865F2;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

/* Hover style for logout button */
#logoutBtn {
  position: relative;
  overflow: hidden;
}

#logoutBtn:hover {
  color: transparent !important;
  border-color: rgba(255, 40, 40, 0.5) !important;
  background: rgba(255, 40, 40, 0.1) !important;
}

#logoutBtn:hover::after {
  content: "تغير حساب";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #ff3333;
  font-weight: 700;
  white-space: nowrap;
}