
:root {
  /* Clean dark theme */
  --bg-primary: #09090b;
  --bg-secondary: #0f0f12;
  --bg-card: #141418;
  --bg-elevated: #1a1a1f;
  --border-color: #1f1f24;
  --border-card: #27272a;

  /* Text hierarchy - clear contrast */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Accent - single cyan with opacity variants */
  --accent: #22d3ee;
  --accent-dim: #0891b2;
  --accent-glow: rgba(34, 211, 238, 0.15);

  /* Functional */
  --error: #f87171;
  --success: #4ade80;

  /* Spacing - 4px base */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* Typography */
  --font: "Segoe UI", system-ui, sans-serif;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;

  /* Layout */
  --sidebar-width: 240px;
  --topbar-height: 56px;
  --radius: 8px;
  --radius-sm: 6px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.2s;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
}


html {
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-color);
  height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 100;
}

.left-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}

.lang-btn {
  margin-left: var(--sp-2);
  background: transparent;
  border: 1px solid var(--border-card);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}

.lang-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.lang-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}

.sidebar-section {
  margin-bottom: var(--sp-6);
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--sp-3) 0;
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border-color);
}

.about-section {
  margin-bottom: var(--sp-5);
}

.contact-links {
  margin-top: var(--sp-3);
}

.contact-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--sp-2) 0;
}

.contact-info {
  margin-top: var(--sp-2);
}

.contact-item {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: var(--sp-2) 0;
  display: flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.contact-item:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.contact-value {
  color: var(--accent);
  font-weight: 500;
  font-family: "SF Mono", "Consolas", monospace;
  margin-left: auto;
  font-size: var(--text-xs);
}

.contact-item:active {
  transform: scale(0.98);
}

/* ========== Heroes Section Styling ========== */
.heroes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-1) var(--sp-2);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.hero-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-tag:active {
  transform: scale(0.96);
}

/* ========== Heroes Showcase Styling ========== */
.heroes-showcase {
  padding: var(--sp-5) 0;
}

.heroes-title {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.heroes-title h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--sp-2) 0;
}

.heroes-title p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

.heroes-grid-showcase {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

.role-section {
  margin-bottom: var(--sp-8);
}

.role-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
}

.role-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.role-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 100px;
}

.heroes-grid-roleshow {
  --hero-card-width: 160px;
  --hero-card-height: 180px;
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(var(--hero-card-width), var(--hero-card-width)));
}

.heroes-grid-roleshow[data-columns] {
  grid-template-columns: repeat(var(--hero-grid-columns), var(--hero-card-width));
}

.hero-avatar-wrapper {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-3);
  border: 2px solid var(--border-card);
  transition: border-color var(--duration) var(--ease);
}

.hero-avatar-wrapper .hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hero-card:hover .hero-avatar-wrapper {
  border-color: var(--accent);
}

.hero-card .hero-info {
  text-align: center;
}

.hero-card .hero-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--sp-1);
}

.hero-card .hero-role {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: var(--sp-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  width: var(--hero-card-width);
  height: var(--hero-card-height);
}

.hero-card:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.hero-card:active {
  transform: scale(0.98);
}

.hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto var(--sp-3) auto;
  display: block;
  border: 2px solid var(--border-card);
  object-fit: cover;
  background: var(--bg-secondary);
  transition: border-color var(--duration) var(--ease);
}

.hero-card:hover .hero-avatar {
  border-color: var(--accent);
}

.hero-info {
  margin-top: var(--sp-2);
}

.hero-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--sp-1) 0;
}

.hero-card:hover .hero-name {
  color: var(--accent);
}

.hero-role {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}


.container {
  display: flex;
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  padding: var(--sp-5);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  margin: var(--sp-1) 0;
}

.sidebar ul li a {
  display: block;
  text-decoration: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  font-size: var(--text-sm);
}

.sidebar ul li a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar ul li a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar ul li a.active {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
}

.nav-separator {
  height: 1px;
  background: var(--border-color);
  margin: var(--sp-3) 0;
}

.nav-header {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--sp-4) 0 var(--sp-2) 0;
  padding: 0 var(--sp-3);
}

.content {
  flex: 1;
  padding: var(--sp-6);
  overflow-y: auto;
}

/* ========== Card Components ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  transition: border-color var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--border-color);
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--sp-4);
  gap: var(--sp-4);
}

.card-header img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border-card);
  object-fit: cover;
  flex-shrink: 0;
}

.champ-name {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--sp-1) 0;
}

.champ-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

.quote {
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-4) 0;
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.skill {
  display: flex;
  align-items: flex-start;
  margin-top: var(--sp-4);
  gap: var(--sp-3);
}

.skill img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.skill-title {
  font-weight: 600;
  color: var(--accent);
  font-size: var(--text-base);
  margin-bottom: var(--sp-1);
}

/* Content lists */
.card ul {
  margin: var(--sp-3) 0;
  padding-left: var(--sp-5);
}

.card ul li {
  margin: var(--sp-2) 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card ul li::marker {
  color: var(--accent-dim);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-card);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}

.menu-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.menu-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-block;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: -100%;
    width: 280px;
    height: calc(100vh - var(--topbar-height));
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    transition: left var(--duration) var(--ease);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.active {
    left: 0;
  }

  .content {
    padding: var(--sp-4);
  }

  .card {
    padding: var(--sp-4);
  }

  .card-header {
    gap: var(--sp-3);
  }

  .card-header img {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: var(--sp-2) var(--sp-3);
  }

  .content {
    padding: var(--sp-3);
  }

  .sidebar {
    width: 100%;
    max-width: 280px;
  }

  .heroes-grid-roleshow {
    --hero-card-width: 120px;
    --hero-card-height: 150px;
    gap: var(--sp-3);
    padding: var(--sp-3);
  }

  .hero-avatar, .hero-avatar-wrapper {
    width: 48px;
    height: 48px;
  }

  .role-header {
    flex-direction: column;
    gap: var(--sp-2);
    text-align: center;
  }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  .lang-btn,
  .menu-toggle,
  .sidebar ul li a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .lang-btn,
  .menu-toggle {
    min-width: 44px;
    justify-content: center;
  }
}

/* ========== Utility Classes ========== */
.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;
}

.error-message {
  color: var(--error);
  background: rgba(248, 113, 113, 0.1);
  padding: var(--sp-4);
  border-radius: var(--radius);
  border: 1px solid rgba(248, 113, 113, 0.2);
  margin: var(--sp-4) 0;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
  color: var(--text-muted);
}

/* ========== Focus & Motion ========== */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ========== Image & Loading States ========== */
img {
  transition: opacity var(--duration) var(--ease);
}

img.loading {
  opacity: 0.5;
}

img.loaded {
  opacity: 1;
}

img.error {
  opacity: 0.4;
  filter: grayscale(1);
}

img[data-src] {
  background: var(--bg-card);
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.skeleton-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-text {
  flex: 1;
}

.skeleton-line {
  height: 14px;
  margin-bottom: var(--sp-2);
}

.skeleton-line:last-child {
  width: 60%;
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-card);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page transitions */
.page-transition {
  opacity: 0;
}

.page-transition.loaded {
  opacity: 1;
  transition: opacity var(--duration) var(--ease);
}
