/* ===================================
   VALORANT RESOURCE HUB - BASE CSS
   Professional | Dynamic | Tactical
   =================================== */

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
  /* Color Palette - Tactical & Energetic */
  --color-bg-primary: #0f1116;
  --color-bg-secondary: #1a1d26;
  --color-bg-tertiary: #252932;
  --color-bg-elevated: #2d3139;
  
  --color-text-primary: #ffffff;
  --color-text-secondary: #d1d5db;
  --color-text-tertiary: #9ca3af;
  --color-text-muted: #6b7280;
  
  --color-primary: #ff4655;
  --color-primary-hover: #ff5a67;
  --color-primary-dark: #e63946;
  --color-primary-glow: rgba(255, 70, 85, 0.3);
  
  --color-secondary: #00d9ff;
  --color-secondary-hover: #1de3ff;
  --color-secondary-dark: #00b8d4;
  --color-secondary-glow: rgba(0, 217, 255, 0.3);
  
  --color-accent: #ffce00;
  --color-accent-glow: rgba(255, 206, 0, 0.3);
  
  --color-success: #00ff88;
  --color-warning: #ffa500;
  --color-danger: #ff4655;
  --color-info: #00d9ff;
  
  /* Neutral Grays - Gunmetal */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  --font-heading: 'Rajdhani', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --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 */
  --font-size-6xl: 3.75rem;     /* 60px */
  --font-size-7xl: 4.5rem;      /* 72px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  --line-height-tight: 1.2;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* Spacing Scale */
  --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 */
  
  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem;    /* 2px */
  --radius-base: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;    /* 6px */
  --radius-lg: 0.5rem;      /* 8px */
  --radius-xl: 0.75rem;     /* 12px */
  --radius-2xl: 1rem;       /* 16px */
  --radius-full: 9999px;
  
  /* Shadows - Sharp & Tactical */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-base: 0 2px 8px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px 0 rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 24px 0 rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 16px 48px 0 rgba(0, 0, 0, 0.8);
  --shadow-2xl: 0 24px 64px 0 rgba(0, 0, 0, 0.9);
  
  /* Neon Glows */
  --glow-primary: 0 0 20px var(--color-primary-glow), 0 0 40px var(--color-primary-glow);
  --glow-secondary: 0 0 20px var(--color-secondary-glow), 0 0 40px var(--color-secondary-glow);
  --glow-accent: 0 0 20px var(--color-accent-glow), 0 0 40px var(--color-accent-glow);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-fixed: 1200;
  --z-modal-backdrop: 1300;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-tooltip: 1600;
  
  /* Container */
  --container-max-width: 1440px;
  --container-padding: var(--space-6);
}

/* ===================================
   RESET & NORMALIZE
   =================================== */

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

/* Remove Default Margins & Paddings */
* {
  margin: 0;
  padding: 0;
}

/* HTML & Body */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

/* Form Elements */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Remove Button Styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Inherit Fonts for Form Controls */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Remove Textarea Resize */
textarea {
  resize: vertical;
}

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

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

/* ===================================
   BASE STYLES
   =================================== */

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 70, 85, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 217, 255, 0.05) 0%, transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
}

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

h1 {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-6);
  font-weight: var(--font-weight-black);
}

h2 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-4);
}

h5 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
}

h6 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-3);
}

@media (max-width: 768px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
  h3 { font-size: var(--font-size-2xl); }
  h4 { font-size: var(--font-size-xl); }
}

/* Paragraphs */
p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

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

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Strong & Em */
strong,
b {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

em,
i {
  font-style: italic;
}

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

code {
  background-color: var(--color-bg-tertiary);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-secondary);
}

pre {
  background-color: var(--color-bg-tertiary);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border-left: 4px solid var(--color-primary);
}

pre code {
  background: none;
  padding: 0;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-6);
  margin: var(--space-6) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* HR */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--color-primary) 20%, 
    var(--color-secondary) 80%, 
    transparent
  );
  margin: var(--space-8) 0;
}

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

::-moz-selection {
  background-color: var(--color-primary);
  color: var(--color-text-primary);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-gray-700);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-bg-secondary);
}

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

/* ===================================
   UTILITY CLASSES
   =================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-fluid {
  width: 100%;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

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

/* Focus Visible */
.focus-visible:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

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

.flex-row {
  flex-direction: row;
}

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

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

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

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

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

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

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

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

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

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

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

.flex-1 {
  flex: 1;
}

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

/* Grid Utilities */
.grid {
  display: grid;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* Text Utilities */
.text-left { text-align: left; }
.text-center { text-align: center; }
.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); }
.text-2xl { font-size: var(--font-size-2xl); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-black { font-weight: var(--font-weight-black); }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

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

/* Neon Text */
.text-neon-red {
  color: var(--color-primary);
  text-shadow: 0 0 10px var(--color-primary-glow);
}

.text-neon-cyan {
  color: var(--color-secondary);
  text-shadow: 0 0 10px var(--color-secondary-glow);
}

/* Spacing Utilities */
.m-0 { margin: var(--space-0); }
.m-auto { margin: auto; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.my-6 { margin-top: var(--space-6); margin-bottom: var(--space-6); }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

/* ===================================
   COMPONENT STYLES
   =================================== */

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width var(--transition-base), height var(--transition-base);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Variants */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-primary)!important;
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px var(--color-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary), 0 8px 24px var(--color-primary-glow);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  color: var(--color-bg-primary);
  border-color: var(--color-secondary);
  box-shadow: 0 4px 16px var(--color-secondary-glow);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-secondary), 0 8px 24px var(--color-secondary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-text-primary);
  box-shadow: var(--glow-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--color-bg-tertiary);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

/* Input */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-tertiary);
  border: 2px solid var(--color-gray-700);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

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

.input:hover {
  border-color: var(--color-gray-600);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
  background-color: var(--color-bg-secondary);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--color-gray-800);
}

/* Textarea */
textarea.input {
  min-height: 120px;
  resize: vertical;
}

/* Select */
select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ff4655'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 1.5em;
  padding-right: var(--space-10);
}

/* Card */
.card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-gray-800);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-gray-700);
}

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

.card-elevated {
  background-color: var(--color-bg-elevated);
}

.card-neon {
  border-color: var(--color-primary);
  box-shadow: 0 4px 24px var(--color-primary-glow);
}

.card-neon:hover {
  box-shadow: var(--glow-primary), var(--shadow-xl);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.badge-primary {
  background-color: var(--color-primary);
  color: var(--color-text-primary);
  box-shadow: 0 2px 8px var(--color-primary-glow);
}

.badge-secondary {
  background-color: var(--color-secondary);
  color: var(--color-bg-primary);
  box-shadow: 0 2px 8px var(--color-secondary-glow);
}

.badge-success {
  background-color: var(--color-success);
  color: var(--color-bg-primary);
}

/* Divider */
.divider {
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--color-gray-700) 20%, 
    var(--color-gray-700) 80%, 
    transparent 100%
  );
  margin: var(--space-6) 0;
  border: none;
}

.divider-neon {
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--color-primary) 20%, 
    var(--color-secondary) 80%, 
    transparent 100%
  );
  box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Link with Underline Effect */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-base);
}

.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* 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 Support */
@media (prefers-contrast: high) {
  .btn,
  .input,
  .card {
    border-width: 3px;
  }
  
  .text-neon-red,
  .text-neon-cyan {
    text-shadow: none;
  }
}

/* Dark Mode Override (if needed) */
@media (prefers-color-scheme: light) {
  /* Valorant site is dark-themed by nature, but can add overrides if needed */
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .btn,
  .card {
    box-shadow: none;
    border: 1px solid black;
  }
  
  .sr-only {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
  }
}