/* ====== أساسيات الثيم (داكن + أخضر) ====== */
: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}
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:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.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--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;
}
.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; }

/* ====== الفوتر ====== */
.foot{
  padding:18px; text-align:center; color:var(--text-300);
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ====== تجاوب ====== */
@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;
}

.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);
}
