/* ========================================================================== */
/* Variables                                                                  */
/* ========================================================================== */

:root {
  /* Color palette - Gaming E‑commerce */
  --color-background: #05060a; /* Near-black, immersive backdrop */
  --color-surface: #0b0e16;    /* Dark surface for cards/sections */
  --color-surface-alt: #111622;

  --color-text: #f5f7ff;
  --color-text-muted: #9aa0b5;

  --color-primary: #1e90ff;       /* Electric blue */
  --color-primary-soft: #133765;
  --color-primary-strong: #0f6bd1;

  --color-accent: #24e07c;        /* Neon green accent */
  --color-accent-soft: #124a33;
  --color-accent-strong: #1ac26b;

  --color-success: #24e07c;
  --color-warning: #ffb020;
  --color-danger: #ff4b5c;

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

  --color-border-subtle: rgba(148, 163, 184, 0.25);
  --color-border-strong: rgba(148, 163, 184, 0.5);

  /* 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: "Rajdhani", "Oswald", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-8: 16px;
  --space-10: 20px;
  --space-12: 24px;
  --space-14: 28px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-28: 56px;
  --space-32: 64px;
  --space-36: 72px;
  --space-40: 80px;
  --space-48: 96px;

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Shadows (subtle neon & depth) */
  --shadow-xs: 0 0 0 1px rgba(15, 23, 42, 0.8);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.8);
  --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.9);
  --shadow-glow-primary: 0 0 0 1px rgba(30, 144, 255, 0.6),
    0 0 18px rgba(30, 144, 255, 0.55);
  --shadow-glow-accent: 0 0 0 1px rgba(36, 224, 124, 0.6),
    0 0 18px rgba(36, 224, 124, 0.55);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 260ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
  --container-wide-max-width: 1360px;
}

/* ========================================================================== */
/* Reset / Normalize                                                          */
/* ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
}

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

ul,
ol {
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  border: none;
  background: none;
  padding: 0;
}

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

:focus {
  outline: none;
}

/* ========================================================================== */
/* Base                                                                       */
/* ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  min-height: 100vh;
}

/* Headings - bold, modern, slightly condensed */

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

h1,
.h1 {
  font-size: clamp(var(--font-size-3xl), 2.4vw + 1.4rem, var(--font-size-5xl));
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-16);
}

h2,
.h2 {
  font-size: clamp(var(--font-size-2xl), 1.6vw + 1.2rem, var(--font-size-4xl));
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-12);
}

h3,
.h3 {
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-10);
}

h4,
.h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-8);
}

h5,
.h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-6);
}

h6,
.h6 {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

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

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-xs);
}

strong {
  font-weight: 600;
}

code,
pre {
  font-family: var(--font-mono);
}

/* Links - energetic but professional */

a {
  position: relative;
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal),
    text-shadow var(--transition-normal);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width var(--transition-normal);
}

a:hover {
  color: var(--color-accent);
  text-shadow: 0 0 6px rgba(36, 224, 124, 0.6);
}

a:hover::after {
  width: 100%;
}

a:active {
  color: var(--color-accent-strong);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-16) 0;
}

/* ========================================================================== */
/* Accessibility                                                              */
/* ========================================================================== */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

@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;
  }
}

/* Screen-reader only */

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

/* ========================================================================== */
/* Utilities                                                                  */
/* ========================================================================== */

/* Containers */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

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

/* Flex utilities */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: var(--space-8);
}

.gap-16 {
  gap: var(--space-16);
}

/* Grid utilities */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-16);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-20);
}

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-16);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Text alignment */

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

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

.text-muted {
  color: var(--color-text-muted);
}

/* Width helpers */

.w-full {
  width: 100%;
}



/* Spacing helpers (example subset) */

.mt-0 {
  margin-top: 0;
}

.mt-8 {
  margin-top: var(--space-8);
}

.mt-16 {
  margin-top: var(--space-16);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mb-16 {
  margin-bottom: var(--space-16);
}

.p-8 {
  padding: var(--space-8);
}

.p-16 {
  padding: var(--space-16);
}

/* ========================================================================== */
/* Components                                                                 */
/* ========================================================================== */

/* Buttons - primary CTA style for buying games */

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-accent-strong));
  color: #050608!important;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    filter var(--transition-fast),
    background var(--transition-normal);
}

.button:hover,
.btn:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: var(--shadow-lg), var(--shadow-glow-accent);
  filter: brightness(1.03);
}

.button:active,
.btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: var(--shadow-sm);
}

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

/* Secondary / ghost button */

.btn-secondary {
  background: rgba(15, 23, 42, 0.8);
  color: var(--color-text)!important;
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 1);
  box-shadow: var(--shadow-md);
}

/* Inputs - used on search, checkout, login */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

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

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow-primary);
  background-color: #070a11;
}

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

/* Form field wrapper */

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

.form-help {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card - product/game tiles, content blocks */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top left, rgba(30, 144, 255, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(36, 224, 124, 0.1), transparent 60%),
    var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: var(--space-12);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal),
    background var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(36, 224, 124, 0.7);
  box-shadow: var(--shadow-md), var(--shadow-glow-primary);
}

.card-header {
  margin-bottom: var(--space-8);
}

.card-body {
  flex: 1 1 auto;
  margin-bottom: var(--space-8);
}

.card-footer {
  margin-top: auto;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  flex-wrap: wrap;
  gap: var(--space-8);
}

/* Badge - stock status, platform labels */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-success {
  background-color: rgba(36, 224, 124, 0.12);
  color: var(--color-success);
  border-color: rgba(36, 224, 124, 0.6);
}

.badge-danger {
  background-color: rgba(255, 75, 92, 0.12);
  color: var(--color-danger);
  border-color: rgba(255, 75, 92, 0.7);
}

.badge-neutral {
  background-color: rgba(148, 163, 184, 0.16);
  color: var(--gray-100);
  border-color: rgba(148, 163, 184, 0.7);
}

/* Media wrappers */

.media-rounded {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.media-elevated {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Price styling for product cards */

.price {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.price-old {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.price-discount {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: 600;
}

/* Toast / notification base (for offers, availability) */

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
}

.toast-success {
  border-color: rgba(36, 224, 124, 0.7);
}

.toast-danger {
  border-color: rgba(255, 75, 92, 0.7);
}

/* ========================================================================== */
/* End of base.css                                                            */
/* ========================================================================== */
