/* ========================================================================
   Variables
   ======================================================================== */
:root {
  /* Color palette - tuned for a modern, dark gaming style */
  --color-background: #050814;
  --color-surface: #0b1020;
  --color-surface-elevated: #111729;
  --color-border-subtle: #1d2436;

  --color-text: #f5f7ff;
  --color-text-muted: #a0a7c4;
  --color-text-soft: #6b7290;

  --color-primary: #4f8cff; /* electric blue */
  --color-primary-soft: rgba(79, 140, 255, 0.16);
  --color-primary-strong: #2f6df0;

  --color-success: #33d69f;
  --color-success-soft: rgba(51, 214, 159, 0.16);

  --color-warning: #ffcf5c;
  --color-warning-soft: rgba(255, 207, 92, 0.18);

  --color-danger: #ff4f6e;
  --color-danger-soft: rgba(255, 79, 110, 0.2);

  /* Neutral grays for borders / text on dark bg */
  --gray-50: #f9fafb;
  --gray-100: #e5e7eb;
  --gray-200: #d1d5db;
  --gray-300: #9ca3af;
  --gray-400: #6b7280;
  --gray-500: #4b5563;
  --gray-600: #374151;
  --gray-700: #1f2933;
  --gray-800: #111827;
  --gray-900: #020617;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-heading: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  /* Font sizes (clamp for responsiveness) */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: clamp(1.75rem, 2.5vw, 2rem);
  --font-size-4xl: clamp(2.1rem, 3vw, 2.5rem);
  --font-size-5xl: clamp(2.6rem, 4vw, 3rem);

  /* Line heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Shadows (subtle neon-ish for gaming cards) */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 18px 50px rgba(0, 0, 0, 0.65);
  --shadow-glow-primary: 0 0 22px rgba(79, 140, 255, 0.45);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;
}

/* ========================================================================
   Reset / Normalize
   ======================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol,
li,
pre,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: transparent;
}

button,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

textarea {
  resize: vertical;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================
   Base
   ======================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: radial-gradient(circle at top, #101732 0%, #050814 55%, #02040a 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: 0.02em;
}

h1 { font-size: var(--font-size-5xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--font-size-4xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--font-size-3xl); margin-bottom: var(--space-3); }
h4 { font-size: var(--font-size-2xl); margin-bottom: var(--space-2); }
h5 { font-size: var(--font-size-xl); margin-bottom: var(--space-2); }
h6 { font-size: var(--font-size-lg); margin-bottom: var(--space-1); }

/* Links: subtle underline on hover only */
a {
  position: relative;
  transition: color var(--transition-normal);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), #7f5dff);
  border-radius: var(--radius-pill);
  transition: width var(--transition-normal);
}

a:hover::after,
a:focus-visible::after {
  width: 100%;
}

/* Code */
code,
pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

pre {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
}

/* ========================================================================
   Accessibility & Focus styles
   ======================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Better default focus for dark theme */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 0 0 3px var(--color-primary);
}

/* Screen-reader only helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================================================
   Layout Utilities
   ======================================================================== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1120px;
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

/* Flex helpers */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; align-items: center; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Grid helpers for content cards / guides */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 {
  display: grid;
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.w-full { width: 100%; }

/* ========================================================================
   Components
   ======================================================================== */
/* Buttons - primary CTA for Google Play / App Store */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-primary), #7f5dff);
  color: #f9fafb;
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-normal),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-strong), var(--shadow-glow-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), #9d6fff);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--ghost {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--color-text);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}

.btn--success {
  background: linear-gradient(135deg, var(--color-success), #3ee4b2);
}

.btn--danger {
  background: linear-gradient(135deg, var(--color-danger), #ff7b9a);
}

/* Inputs - for search bars, newsletter, feedback */
.input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.85);
  color: var(--color-text);
  box-shadow: 0 0 0 0 rgba(79, 140, 255, 0);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-text-soft);
}

.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 0 0 3px var(--color-primary-soft);
  background-color: rgba(15, 23, 42, 1);
}

.input--invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 0 0 3px var(--color-danger-soft);
}

/* Card - for guides, weapon builds, tips */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(79, 140, 255, 0.04), transparent),
    var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: var(--space-4);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid transparent;
  background: radial-gradient(circle at top left, rgba(79, 140, 255, 0.28), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover::before {
  opacity: 1;
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

.card__meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  margin-bottom: var(--space-2);
}

.card__body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Hero-specific utility (used across pages) */
.hero {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

@media (min-width: 768px) {
  .hero {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-soft);
}

.hero__title {
  font-size: var(--font-size-5xl);
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 40rem;
}

/* Tag badges for difficulty, weapon types, etc. */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-soft);
}

.badge--primary {
  border-color: rgba(79, 140, 255, 0.7);
  background-color: rgba(79, 140, 255, 0.1);
  color: #dbeafe;
}

.badge--success {
  border-color: rgba(51, 214, 159, 0.7);
  background-color: rgba(51, 214, 159, 0.08);
  color: #bbf7d0;
}

.badge--danger {
  border-color: rgba(255, 79, 110, 0.8);
  background-color: rgba(255, 79, 110, 0.12);
  color: #fee2e2;
}

/* Simple pill for platform labels (Google Play / App Store) */
.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
}

/* ========================================================================
   Misc helpers tailored for content-rich gaming guides
   ======================================================================== */

.highlight-box {
  border-radius: var(--radius-md);
  border: 1px solid rgba(79, 140, 255, 0.35);
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.12), rgba(15, 23, 42, 0.95));
  padding: var(--space-4);
}

.pro-tip {
  position: relative;
  padding-left: 1.75rem;
}

.pro-tip::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 207, 92, 0.85);
  color: #ffcf5c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
