/* =========================================
   DIVISION 2 COMPANION - COMPLETE STYLESHEET
   ========================================= */

/* CSS Variables */
:root {
  --bg-primary: #0d0d1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1e2a4a;
  --accent: #e94560;
  --accent-hover: #ff6b35;
  --accent-glow: rgba(233, 69, 96, 0.3);
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0b0;
  --border: #2a2a4a;
  --border-accent: #3a3a6a;
  --success: #00d4aa;
  --warning: #f4a261;
  --info: #4cc9f0;
  --gold: #ffd700;
  --nav-height: 64px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 0 20px rgba(233, 69, 96, 0.2);
  --transition: all 0.2s ease;
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); margin-bottom: 0.5rem; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 13, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(233, 69, 96, 0.1);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(233, 69, 96, 0.08);
}

.lang-toggle .lang-flag {
  font-size: 1rem;
}

/* Mobile menu toggle */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  border-radius: var(--border-radius);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.2rem;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4rem 1.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(233, 69, 96, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(76, 201, 240, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 107, 53, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

/* Animated grid lines */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(233, 69, 96, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 69, 96, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Animated particles */
.hero-bg::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.15) 0%, transparent 70%);
  top: 20%;
  left: 15%;
  animation: float1 6s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search {
  display: flex;
  gap: 0;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  transition: var(--transition);
}

.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.hero-search input {
  flex: 1;
  padding: 0.85rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.hero-search input::placeholder {
  color: var(--text-secondary);
}

.hero-search button {
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  white-space: nowrap;
}

.hero-search button:hover {
  background: var(--accent-hover);
}

/* =========================================
   STATS BAR
   ========================================= */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.stats-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* =========================================
   SECTION LAYOUT
   ========================================= */
.section {
  padding: 3rem 1.5rem;
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title h2 {
  margin: 0;
}

.section-title-line {
  width: 4px;
  height: 28px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.view-all-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(233, 69, 96, 0.05);
}

/* =========================================
   BUILD CARDS GRID
   ========================================= */
.builds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.build-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}

.build-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.build-card:hover {
  border-color: rgba(233, 69, 96, 0.4);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card), var(--shadow-accent);
}

.build-card:hover::before {
  transform: scaleX(1);
}

.build-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.build-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  flex: 1;
}

.build-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.category-badge.pve_dps { background: rgba(255, 107, 53, 0.2); color: #ff6b35; border: 1px solid rgba(255, 107, 53, 0.3); }
.category-badge.pve_skill { background: rgba(76, 201, 240, 0.2); color: #4cc9f0; border: 1px solid rgba(76, 201, 240, 0.3); }
.category-badge.pvp { background: rgba(233, 69, 96, 0.2); color: #e94560; border: 1px solid rgba(233, 69, 96, 0.3); }
.category-badge.raid { background: rgba(255, 215, 0, 0.2); color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.3); }
.category-badge.tank { background: rgba(0, 212, 170, 0.2); color: #00d4aa; border: 1px solid rgba(0, 212, 170, 0.3); }
.category-badge.support { background: rgba(120, 85, 220, 0.2); color: #a78bfa; border: 1px solid rgba(120, 85, 220, 0.3); }

.build-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.build-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
  flex-wrap: wrap;
}

.difficulty-stars {
  display: flex;
  gap: 2px;
}

.star {
  width: 14px;
  height: 14px;
  color: var(--border-accent);
}

.star.filled {
  color: var(--accent);
}

.build-card-patch {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
  background: var(--bg-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 4px;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================
   FILTER BAR
   ========================================= */
.filter-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-bar label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.filter-select,
.filter-input {
  padding: 0.5rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--transition);
  min-width: 140px;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.15);
}

.filter-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.filter-search {
  flex: 1;
  min-width: 200px;
}

.filter-search .filter-input {
  width: 100%;
  min-width: 0;
}

.clear-filters-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.clear-filters-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(233, 69, 96, 0.05);
}

/* =========================================
   TABLES
   ========================================= */
.data-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--bg-secondary);
}

.data-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(233, 69, 96, 0.04);
}

.table-number {
  font-weight: 700;
  color: var(--accent);
  font-family: monospace;
  font-size: 0.85rem;
}

.weapon-type-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(76, 201, 240, 0.12);
  border: 1px solid rgba(76, 201, 240, 0.2);
  border-radius: 4px;
  color: var(--info);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.exotic-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 4px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.named-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 4px;
  color: #a78bfa;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* =========================================
   TABS
   ========================================= */
.tabs-nav {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 0.7rem 1.2rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* =========================================
   GEAR PAGE CARDS
   ========================================= */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.gear-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}

.gear-card:hover {
  border-color: rgba(233, 69, 96, 0.3);
  background: var(--bg-card-hover);
}

.gear-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.gear-card-bonuses {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gear-bonus-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.gear-bonus-count {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: rgba(233, 69, 96, 0.15);
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  color: var(--accent);
}

.gear-bonus-text {
  color: var(--text-secondary);
  line-height: 1.4;
  font-size: 0.82rem;
}

/* Talent cards */
.talent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 1.1rem 1.25rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.talent-card:hover {
  border-color: rgba(233, 69, 96, 0.3);
  background: var(--bg-card-hover);
}

.talent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.talent-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.tier-badge.A { background: rgba(233, 69, 96, 0.2); color: var(--accent); border: 1px solid rgba(233, 69, 96, 0.4); }
.tier-badge.B { background: rgba(255, 107, 53, 0.2); color: var(--accent-hover); border: 1px solid rgba(255, 107, 53, 0.4); }
.tier-badge.C { background: rgba(160, 160, 176, 0.15); color: var(--text-secondary); border: 1px solid rgba(160, 160, 176, 0.3); }

.talent-slot-badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.talent-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =========================================
   BUILD DETAIL PAGE
   ========================================= */
.build-detail-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem;
}

.build-detail-header-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  text-decoration: none;
  margin-bottom: 1.25rem;
  display: inline-flex;
}

.back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(233, 69, 96, 0.05);
}

.build-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.build-detail-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.build-detail-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.build-patch-info {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.patch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.patch-badge span { color: var(--text-primary); font-weight: 600; }

/* Build detail 2-column layout */
.build-detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.build-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.build-panel-title {
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.build-panel-title-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* Gear loadout table */
.gear-loadout-table {
  width: 100%;
  border-collapse: collapse;
}

.gear-loadout-table td {
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  font-size: 0.85rem;
  vertical-align: middle;
}

.gear-loadout-table tr:last-child td {
  border-bottom: none;
}

.gear-loadout-table tr:hover td {
  background: rgba(233, 69, 96, 0.03);
}

.gear-slot-label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 90px;
}

.gear-slot-name {
  font-weight: 700;
  color: var(--text-primary);
}

.gear-slot-brand {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.gear-slot-attrs {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.gear-slot-attr {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.gear-slot-attr::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.gear-talent-inline {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.25);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

/* Weapon info in detail */
.weapon-detail-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.weapon-detail-item:last-child {
  border-bottom: none;
}

.weapon-role-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.weapon-detail-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.weapon-detail-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Skills list in detail */
.skills-list {
  padding: 0.75rem 0;
}

.skill-item {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.skill-item:last-child {
  border-bottom: none;
}

.skill-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.skill-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Specialization in detail */
.spec-item {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.spec-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.spec-weapon {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.spec-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* Tips section */
.tips-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.tips-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.tips-list {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tip-number {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: rgba(233, 69, 96, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.1rem;
}

.playstyle-text {
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =========================================
   PAGE HEADER (builds/gear pages)
   ========================================= */
.page-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem;
}

.page-header-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.35rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* =========================================
   LOADING STATE
   ========================================= */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  gap: 1rem;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  gap: 0.75rem;
  text-align: center;
}

.empty-state-icon {
  font-size: 3rem;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  opacity: 0.7;
  max-width: 300px;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  opacity: 0.6;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-secondary);
  opacity: 0.7;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  opacity: 1;
}

/* =========================================
   SEARCH IN TABS
   ========================================= */
.tab-search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.tab-search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--transition);
}

.tab-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.15);
}

.tab-filter-select {
  padding: 0.6rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--transition);
  min-width: 130px;
}

.tab-filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.tab-filter-select option {
  background: var(--bg-card);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .build-detail-layout {
    grid-template-columns: 1fr;
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
    z-index: 999;
  }

  .nav-mobile-toggle {
    display: block;
  }

  .nav-container {
    position: relative;
    flex-wrap: wrap;
  }

  .builds-grid {
    grid-template-columns: 1fr;
  }

  .gear-grid {
    grid-template-columns: 1fr;
  }

  .stats-container {
    gap: 1.5rem;
  }

  .hero-search {
    flex-direction: column;
    border-radius: var(--border-radius);
  }

  .hero-search button {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    width: 100%;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select,
  .filter-input {
    width: 100%;
  }

  .data-table-wrapper {
    overflow-x: auto;
  }

  .build-detail-title-row {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 400px;
    padding: 2.5rem 1rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .page-header {
    padding: 1.5rem 1rem;
  }

  .build-detail-layout {
    padding: 1.5rem 1rem;
  }

  .tips-section {
    padding: 0 1rem 1.5rem;
  }
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-gold { color: var(--gold); }

.font-mono { font-family: 'Fira Code', 'Consolas', 'Courier New', monospace; }
.font-bold { font-weight: 700; }
.font-800 { font-weight: 800; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.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;
}
