/* =========================================================
   DARK WING — BASE VARIABLES, RESET & BACKDROP LAYERS
   ========================================================= */

:root {
  /* لوحة الألوان المعتمدة حصراً */
  --bg-deep: #090a0d;
  --surface-dark: #12141b;
  --primary-orange: #ff6b1a;
  --secondary-gold: #ffd464;
  --bright-gold: #ffcf40;
  --danger-red: #ff3b30;
  --success-green: #2ee678;
  --text-main: #f4f5f7;
  --text-dim: rgba(244, 245, 247, 0.72);
  --border-subtle: rgba(255, 255, 255, 0.14);

  /* الخطوط المعتمدة */
  --font-display: 'Cinzel', Georgia, serif;
  --font-ui: 'Cairo', system-ui, sans-serif;
  --font-digital: 'Orbitron', monospace;

  /* منحنيات الحركة */
  --ease-calm: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-deep);
}

/* =========================================================
   GLOBAL BACKDROP & KEN BURNS MOTION
   ========================================================= */

.global-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.backdrop-image {
  position: absolute;
  inset: -4%;
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(180deg, rgba(9, 10, 13, 0.45) 0%, rgba(9, 10, 13, 0.25) 45%, rgba(9, 10, 13, 0.88) 100%),
    url('../assets/images/background.jpg'),
    url('../assets/images/background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform;
  animation: kenBurnsCalm 30s ease-in-out infinite alternate;
}

@keyframes kenBurnsCalm {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.06) translate3d(-1%, -0.8%, 0);
  }
}

.backdrop-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 42%,
    rgba(9, 10, 13, 0.12) 0%,
    rgba(9, 10, 13, 0.65) 68%,
    rgba(9, 10, 13, 0.94) 100%
  );
}

.ambient-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

/* وضع تقليل الحركة لذوي الحساسية */
body.reduced-motion .backdrop-image,
body.reduced-motion .game-title,
body.reduced-motion .btn-sheen {
  animation: none !important;
}

/* =========================================================
   SHARED BUTTONS & SVG ICONS
   ========================================================= */

.icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary-tactical {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 13px 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 100, 0.42);
  background: linear-gradient(180deg, rgba(18, 20, 27, 0.92) 0%, rgba(9, 10, 13, 0.96) 100%);
  color: var(--secondary-gold);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 212, 100, 0.18);
  transition: transform 0.25s var(--ease-calm), border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.btn-primary-tactical:hover {
  transform: translateY(-2px);
  border-color: var(--primary-orange);
  color: var(--text-main);
  box-shadow: 0 14px 34px rgba(255, 107, 26, 0.22), inset 0 1px 0 rgba(255, 212, 100, 0.35);
}

.btn-primary-tactical:active {
  transform: translateY(0) scale(0.98);
}

.btn-sheen {
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 212, 100, 0.22), transparent);
  transform: skewX(-22deg);
  transition: left 0.65s var(--ease-calm);
  pointer-events: none;
}

.btn-primary-tactical:hover .btn-sheen {
  left: 160%;
}

.btn-secondary-tactical {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(18, 20, 27, 0.72);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all 0.22s var(--ease-calm);
}

.btn-secondary-tactical:hover {
  border-color: rgba(255, 212, 100, 0.45);
  color: var(--text-main);
  background: rgba(18, 20, 27, 0.95);
}

.btn-ghost-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 20, 27, 0.52);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all 0.22s ease;
}

.btn-ghost-icon:hover {
  border-color: rgba(255, 212, 100, 0.35);
  color: var(--secondary-gold);
  background: rgba(18, 20, 27, 0.85);
}