/* =============================================
   ARC MASTER GAMES - Global Styles
   ============================================= */

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

/* CSS Custom Properties */
:root {
  /* Colors */
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #e94560;
  --accent-hover: #ff6b81;
  --bg-color: #0f0f23;
  --bg-surface: #1a1a2e;
  --bg-surface-alt: #16213e;
  --text-color: #e0e0e0;
  --text-muted: #8a8a9a;
  --text-heading: #ffffff;
  --border-color: #2a2a4a;
  --shadow-color: rgba(0, 0, 0, 0.3);

  /* Typography */
  --heading-font: 'Orbitron', 'Segoe UI', sans-serif;
  --body-font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono-font: 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width: 1280px;
  --sidebar-width: 280px;
  --header-height: 70px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* Base Typography */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fluid Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  color: var(--text-heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: var(--space-lg); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-bottom: var(--space-sm); }
h4 { font-size: clamp(1rem, 2vw, 1.25rem); margin-bottom: var(--space-sm); }

p {
  margin-bottom: var(--space-md);
  max-width: 75ch;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-xs);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
}

@media (min-width: 1024px) {
  .content-with-sidebar {
    grid-template-columns: 1fr var(--sidebar-width);
  }
}

/* Visually Hidden (for screen readers) */
.visually-hidden,
.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;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--accent-color);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  z-index: 9999;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  list-style: none;
}

.breadcrumbs li {
  margin-bottom: 0;
}

.breadcrumbs li + li::before {
  content: '›';
  margin-right: var(--space-xs);
  color: var(--text-muted);
}

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

.breadcrumbs a:hover {
  color: var(--accent-color);
}

/* Console Badge */
.console-badge {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* Game Card */
.game-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow-color);
}

.game-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.game-card__content {
  padding: var(--space-md);
}

.game-card__title {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
  font-family: var(--heading-font);
  color: var(--text-heading);
}

.game-card__year {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.btn-outline:hover {
  background: var(--accent-color);
  color: #fff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in {
  animation: fadeIn var(--transition-slow) both;
}

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

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

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

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

/* Selection */
::selection {
  background: var(--accent-color);
  color: #fff;
}

/* Print Styles */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .no-print,
  #header-placeholder,
  #sidebar-placeholder,
  #footer-placeholder {
    display: none;
  }
}
