/* ==========================================================================
   1. SETUP & GLOBAL STYLES
   ========================================================================== */

/* --- CSS Custom Properties (Variables) --- */
:root {
  /* Colors */
  --glow-color: rgba(88, 166, 255, 0.5);
  --accent-blue: #58a6ff;
  --border-color: #30363d;
  --card-bg: #161b22;
  --body-bg: #0d1117;
  --text-primary: #d1d5db;
  --text-secondary: #9ca3af;
  --text-headings: #ffffff;

  /* Role Colors */
  --role-duelist: #ef4444;
  --role-vanguard: #3b82f6;
  --role-strategist: #22c55e;

  /* Typography */
  --font-sans: "Inter", sans-serif;
  --font-display: "Bebas Neue", sans-serif;
}

/* --- Global Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 80%;
}

body {
  background-color: var(--body-bg);
  background-image: radial-gradient(circle at top, rgba(22, 27, 34, 0.8), transparent 40%),
    url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"%3E%3Cpath fill="%23161b22" fill-opacity="0.4" d="M1 3h1v1H1V3zm2-2h1v1H3V1z"%3E%3C/path%3E%3C/svg%3E');
  color: var(--text-primary);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  opacity: 1;
  filter: brightness(0.8) saturate(1.2);
}

/* ==========================================================================
   2. LAYOUT & CONTAINERS
   ========================================================================== */

/* --- General Layout --- */
.container {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  overflow-y: auto;
  margin-left: 13.75rem; /* 13.75rem */
}

/* Reusable container for pages like Team Comps, Maps, etc. */
.page-container {
  max-width: 75rem; /* 75rem */
  margin: 0 auto;
  padding: 2rem;
}

/* Reusable header for pages */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  letter-spacing: 0.0625rem; /* 1px */
  color: var(--text-headings);
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 37.5rem; /* 37.5rem */
  margin: 0.5rem auto 0;
}

/* ==========================================================================
   3. UTILITIES & ANIMATIONS
   ========================================================================== */

/* --- Animation Utilities --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(1.25rem); /* 1.25rem */
  animation: fadeIn-up-anim 0.5s ease-out forwards;
}

/* --- Keyframes --- */
@keyframes fadeIn-up-anim {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 0.625rem rgba(255, 255, 255, 0); /* 0.625rem */
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes rotateGlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   4. UTILITY & PAGE STATES
   ========================================================================== */

.not-found {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem; /* 0.75rem */
  margin-top: 2rem;
}

.not-found h1 {
  color: #f87171;
  margin-bottom: 1rem;
}

/* =============================================
   AVATAR UTILITY CLASSES
   ============================================= */
/* Base class for all avatars */
.avatar {
    display: block;
    border-radius: 50%; /* Makes it a circle */
    object-fit: cover;  /* CRITICAL: Prevents stretching/distortion */
    background-color: var(--color-border); /* Placeholder color */
}

/* Sizing classes */
.avatar-sm { /* For small contexts like bylines */
    width: 1.75rem; /* 1.75rem */
    height: 1.75rem; /* 1.75rem */
}

.avatar-md { /* For medium contexts */
    width: 2.5rem; /* 2.5rem */
    height: 2.5rem; /* 2.5rem */
}

.avatar-lg { /* For larger profile icons */
    width: 4rem; /* 4rem */
    height: 4rem; /* 4rem */
    border: 0.125rem solid var(--color-bg-secondary); /* 0.125rem */
    border-radius: 0.5rem; /* 0.5rem */
}

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */

@media (max-width: 56.25rem) { /* 56.25rem */
  .character-content,
  .team-guide-content,
  .map-guide-layout {
    grid-template-columns: 1fr;
  }

  .character-sidebar {
    position: static;
    top: auto;
  }

  .team-comp-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 48rem) { /* 48rem */
  .ability-main-content {
    grid-template-columns: 1fr;
  }

  .compare-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1rem;
    padding: 1rem;
  }

  .compare-panel {
    min-height: 15.625rem; /* 15.625rem */
  }
}

@media (max-width: 37.5rem) { /* 37.5rem */
  .character-container,
  .main-content,
  .page-container {
    padding: 1rem;
  }

  .hero-header {
    height: 18.75rem; /* 18.75rem */
  }

  .hero-title h1 {
    font-size: 2.25rem;
  }

  .featured-hero {
    height: auto;
  }

  .featured-hero-info {
    max-width: 100%;
  }

  .featured-hero h1 {
    font-size: 2.5rem;
  }
}

/* --- Toast Notification --- */
.toast-notification {
    position: fixed;
    bottom: 1.25rem; /* 1.25rem */
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background-color: var(--accent-blue);
    color: var(--text-headings);
    padding: 1rem 2rem;
    border-radius: 0.5rem; /* 0.5rem */
    z-index: 1000;
    font-weight: 500;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.2); /* 0 0.25rem 0.9375rem */
    transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
}

/* --- Loading Indicator --- */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(0.3125rem); /* 0.3125rem */
}

.spinner {
    width: 3.75rem; /* 3.75rem */
    height: 3.75rem; /* 3.75rem */
    border: 0.3125rem solid var(--border-color); /* 0.3125rem */
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Visually hide an element while keeping it accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
/* Add or replace the :root block in your global.css */
:root {
    /* Color Palette - New Dark Theme */
    --color-primary: #00BFFF; /* Deep Sky Blue - A vibrant accent */
    --color-primary-dark: #009ACD;
    --bg-dark-primary: #161C29;   /* Dark Navy */
    --bg-dark-secondary: #21283A; /* Slightly Lighter Navy */
    --text-light-primary: #EAEAEA;
    --text-light-secondary: #a0a0a0;
    --border-color: #343A4B;

    /* Fonts (Keep as is) */
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Sizing & Spacing */
    --border-radius: 12px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}