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

:root {
  --bg: #0a0b14;
  --bg-soft: #11131f;
  --panel: #161926;
  --panel-border: #272b3d;
  --text: #f1f2fa;
  --text-dim: #9699b0;
  --primary: #7c5cff;
  --primary-dim: #5a3fe0;
  --accent: #30e8d8;
  --accent-2: #ff4fa0;
  --warn: #ffb547;
  --danger: #ff5c7a;
  --success: #3ddc97;
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  background-image:
    radial-gradient(circle at 15% 0%, rgba(124, 92, 255, 0.25), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(48, 232, 216, 0.15), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 79, 160, 0.12), transparent 45%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 20, 0.75);
  border-bottom: 1px solid var(--panel-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.3px;
}
.brand-badge {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.5);
}
.header-cta {
  background: linear-gradient(135deg, var(--primary), #9b7bff);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.35);
}
.header-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(124, 92, 255, 0.45); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 48px;
  text-align: center;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 54px);
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 16px;
  background: linear-gradient(90deg, #fff, #c9c3ff 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.9;
}
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #9b7bff);
  color: #fff; border: none; padding: 15px 32px; border-radius: 999px;
  font-weight: 800; font-size: 15px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.4);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(124, 92, 255, 0.5); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.btn-ghost:hover { border-color: var(--primary); background: rgba(124, 92, 255, 0.08); }

/* ---------- Games grid ---------- */
.section { padding: 56px 0; }
.section-title {
  text-align: center;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 900;
  margin: 0 0 8px;
}
.section-sub {
  text-align: center;
  color: var(--text-dim);
  margin: 0 0 40px;
  font-size: 15px;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}
.game-card {
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
}
.game-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(124,92,255,0.15), transparent 70%);
  opacity: 0;
  transition: opacity .2s ease;
}
.game-card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: 0 16px 32px rgba(0,0,0,0.35); }
.game-card:hover::after { opacity: 1; }
.game-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 16px 32px rgba(0,0,0,0.35); }
.game-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.game-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.game-card p { margin: 0; color: var(--text-dim); font-size: 12.5px; }

/* ---------- Booking form ---------- */
.booking-panel {
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 36px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dim);
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}
.form-row textarea { resize: vertical; min-height: 80px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; display: none; }
.field-error.show { display: block; }
.form-row.has-error input, .form-row.has-error select { border-color: var(--danger); }

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #9b7bff);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.35);
}
.submit-btn:hover:not(:disabled) { transform: translateY(-2px); }
.submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }

.form-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: none;
  font-weight: 600;
  line-height: 1.7;
}
.form-feedback.show { display: block; }
.form-feedback.success { background: rgba(61, 220, 151, 0.12); border: 1px solid rgba(61, 220, 151, 0.4); color: var(--success); }
.form-feedback.error { background: rgba(255, 92, 122, 0.12); border: 1px solid rgba(255, 92, 122, 0.4); color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.site-footer a { color: var(--text-dim); opacity: .7; }
.site-footer a:hover { color: var(--accent); opacity: 1; }

/* ---------- Spinner ---------- */
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .booking-panel { padding: 24px 18px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 32px; }
  .section { padding: 40px 0; }
}
