/*
 * GlobalPvP Base Styles
 * CSS Custom Properties, Reset, Typography, and Utilities
 */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Colors - Dark Theme */
  --bg: #0a0a0a;
  --bg-elev: #121924;
  --card: #0e1520;
  --muted: #9fb1c7;
  --text: #e6eef8;
  --primary: #6cc0ff;
  --accent: #7af0b3;
  --warn: #ffba6b;
  --error: #ff7a7a;
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  
  /* Semantic Colors */
  --success: var(--accent);
  --info: var(--primary);
  --warning: var(--warn);
  --danger: var(--error);
  
  /* Typography */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
  
  /* Minimum readable font sizes */
  --font-size-min: 14px;
  --font-size-small: 16px;
  
  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Font Sizes - SEO Optimized (minimum 14px) */
  --font-size-xs: 0.875rem;   /* 14px - minimum readable */
  --font-size-sm: 1rem;       /* 16px */
  --font-size-base: 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 Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* Letter Spacing */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  
  /* Spacing Scale (8px base) */
  --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 */
  
  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-base: 0.375rem; /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Glass Effect Shadows */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-glass-lg: 0 16px 64px rgba(0, 0, 0, 0.16), 0 4px 16px rgba(0, 0, 0, 0.12);
  
  /* Container Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-slower: 500ms ease;
  
  /* Animation Durations */
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;
}

/* Force Dark Theme - Light theme disabled */
/* @media (prefers-color-scheme: light) disabled */

/* Theme Toggle Classes - Only Dark Theme */
[data-theme="light"] {
  /* Force dark theme even when light is selected */
  --bg: #0a0a0a;
  --bg-elev: #121924;
  --card: #0e1520;
  --muted: #9fb1c7;
  --text: #e6eef8;
  --border: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elev: #121924;
  --card: #0e1520;
  --muted: #9fb1c7;
  --text: #e6eef8;
  --border: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.06);
}

/* CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  background-color: #0a0a0a !important;
  color-scheme: dark !important;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--text) !important;
  background-color: var(--bg) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: opacity 0.3s ease-in-out;
}
/* Force dark theme on all elements */
* {
  color-scheme: dark !important;
}

body:not(.loaded) {
  opacity: 0;
}

body.loaded {
  opacity: 1;
}

/* Main Content */
.main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Content wrapper */
.content {
  flex: 1;
}

/* Sections */
.section {
  padding: var(--space-12) 0;
}

.section--sm {
  padding: var(--space-8) 0;
}

.section--lg {
  padding: var(--space-20) 0;
}

/* Utilities */
.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;
}

/* Remove default margins */
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
dl, dd, ol, ul,
figure, hr,
fieldset, legend {
  margin: 0;
  padding: 0;
}

/* Remove list styles */
ol, ul {
  list-style: none;
}

/* Reset quotes */
blockquote, q {
  quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}

/* Reset tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Reset form elements */
button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button, input {
  overflow: visible;
}

button, select {
  text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/* Reset links */
a {
  background-color: transparent;
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Reset images */
img {
  border-style: none;
  max-width: 100%;
  height: auto;
}

/* Reset media elements */
audio, canvas, iframe, img, svg, video {
  vertical-align: middle;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text);
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: var(--letter-spacing-tighter);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

p {
  line-height: var(--line-height-relaxed);
  color: var(--muted);
}

small {
  font-size: var(--font-size-sm);
  color: var(--muted);
}

code, kbd, samp {
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  background-color: var(--glass);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Focus Styles */
:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--primary);
  color: var(--bg);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-elev);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 5rem;
  padding-right: 5rem;
}

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

@media (max-width: 768px) {
  .container {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
}

.container--wide {
  max-width: var(--container-2xl);
}

/* Utility Classes */

/* Spacing Utilities */
.-mt-1 { margin-top: var(--space-1); }
.-mt-2 { margin-top: var(--space-2); }
.-mt-3 { margin-top: var(--space-3); }
.-mt-4 { margin-top: var(--space-4); }
.-mt-6 { margin-top: var(--space-6); }
.-mt-8 { margin-top: var(--space-8); }

.-mb-1 { margin-bottom: var(--space-1); }
.-mb-2 { margin-bottom: var(--space-2); }
.-mb-3 { margin-bottom: var(--space-3); }
.-mb-4 { margin-bottom: var(--space-4); }
.-mb-6 { margin-bottom: var(--space-6); }
.-mb-8 { margin-bottom: var(--space-8); }

.-ml-1 { margin-left: var(--space-1); }
.-ml-2 { margin-left: var(--space-2); }
.-ml-3 { margin-left: var(--space-3); }
.-ml-4 { margin-left: var(--space-4); }

.-mr-1 { margin-right: var(--space-1); }
.-mr-2 { margin-right: var(--space-2); }
.-mr-3 { margin-right: var(--space-3); }
.-mr-4 { margin-right: var(--space-4); }

.-pt-1 { padding-top: var(--space-1); }
.-pt-2 { padding-top: var(--space-2); }
.-pt-3 { padding-top: var(--space-3); }
.-pt-4 { padding-top: var(--space-4); }
.-pt-6 { padding-top: var(--space-6); }
.-pt-8 { padding-top: var(--space-8); }

.-pb-1 { padding-bottom: var(--space-1); }
.-pb-2 { padding-bottom: var(--space-2); }
.-pb-3 { padding-bottom: var(--space-3); }
.-pb-4 { padding-bottom: var(--space-4); }
.-pb-6 { padding-bottom: var(--space-6); }
.-pb-8 { padding-bottom: var(--space-8); }

/* Grid Utilities */
.-grid-1 { display: grid; grid-template-columns: 1fr; }
.-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

.-gap-2 { gap: var(--space-2); }
.-gap-3 { gap: var(--space-3); }
.-gap-4 { gap: var(--space-4); }
.-gap-6 { gap: var(--space-6); }

/* Flex Utilities */
.-flex { display: flex; }
.-flex-col { 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; }
.-justify-start { justify-content: flex-start; }
.-justify-end { justify-content: flex-end; }

/* Display Utilities */
.-hidden { display: none; }
.-block { display: block; }
.-inline { display: inline; }
.-inline-block { display: inline-block; }

/* Text Utilities */
.-text-center { text-align: center; }
.-text-left { text-align: left; }
.-text-right { text-align: right; }
.-text-xs { font-size: var(--font-size-xs); }
.-text-sm { font-size: var(--font-size-sm); }
.-text-base { font-size: var(--font-size-base); }
.-text-lg { font-size: var(--font-size-lg); }
.-text-xl { font-size: var(--font-size-xl); }

/* Color Utilities */
.-text-muted { color: var(--muted); }
.-text-primary { color: var(--primary); }
.-text-accent { color: var(--accent); }
.-text-success { color: var(--success); }
.-text-warning { color: var(--warning); }
.-text-danger { color: var(--danger); }

/* Position Utilities */
.-relative { position: relative; }
.-absolute { position: absolute; }
.-fixed { position: fixed; }
.-sticky { position: sticky; }

/* Overflow Utilities */
.-overflow-hidden { overflow: hidden; }
.-overflow-auto { overflow: auto; }
.-overflow-x-auto { overflow-x: auto; }
.-overflow-y-auto { overflow-y: auto; }

/* Border Radius Utilities */
.-rounded { border-radius: var(--radius-base); }
.-rounded-md { border-radius: var(--radius-md); }
.-rounded-lg { border-radius: var(--radius-lg); }
.-rounded-xl { border-radius: var(--radius-xl); }
.-rounded-full { border-radius: var(--radius-full); }

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: var(--bg);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-base);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 6px;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.3);
    --glass: rgba(255, 255, 255, 0.1);
  }
  
  [data-theme="light"] {
    --border: rgba(0, 0, 0, 0.3);
    --glass: rgba(0, 0, 0, 0.1);
  }
}

/* Print Styles */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
  
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  
  .no-print {
    display: none !important;
  }
}
