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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #0f0f1a;
  color: #e0dcd0;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: #d4a574;
  text-decoration: none;
}

a:hover {
  color: #e8c48a;
  text-decoration: underline;
}

/* === Header === */
.site-header {
  background: linear-gradient(180deg, #1a1a2e 0%, #141428 100%);
  border-bottom: 1px solid #2a2a3e;
  padding: 1.5rem 1rem;
  text-align: center;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #d4a574;
  letter-spacing: 0.5px;
}

.site-subtitle {
  font-size: 0.9rem;
  color: #8a8a9e;
  margin-top: 0.25rem;
}

/* === Navigation === */
.nav-bar {
  background: #141428;
  border-bottom: 1px solid #2a2a3e;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-links {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
}

.nav-links a {
  color: #b0a89e;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #d4a574;
  background: rgba(212, 167, 116, 0.08);
  text-decoration: none;
}

/* === Main Layout === */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* === Homepage — Category Section === */
.category-section {
  margin-bottom: 2.5rem;
}

.category-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #d4a574;
  border-bottom: 1px solid #2a2a3e;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* === Article Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.15s;
}

.card:hover {
  border-color: #4a3a2e;
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.85rem;
  color: #8a8a9e;
  line-height: 1.5;
}

.card .card-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #6a6a7e;
}

.card .card-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: rgba(212, 167, 116, 0.12);
  color: #c49a6e;
}

/* === Article Page === */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.article-content {
  max-width: 720px;
}

.breadcrumb {
  font-size: 0.82rem;
  color: #6a6a7e;
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: #6a6a7e;
}

.breadcrumb a:hover {
  color: #d4a574;
}

.breadcrumb span {
  color: #8a8a9e;
}

.article-content h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #e0dcd0;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-meta {
  font-size: 0.82rem;
  color: #6a6a7e;
  margin-bottom: 2rem;
}

.article-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #d4a574;
  margin: 2rem 0 0.75rem;
}

.article-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #c0b8a8;
  margin: 1.5rem 0 0.5rem;
}

.article-content p {
  margin-bottom: 1rem;
  font-size: 0.98rem;
}

.article-content ul,
.article-content ol {
  margin: 0.75rem 0 1rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.article-content strong {
  color: #e8dcc8;
  font-weight: 700;
}

/* === Sidebar === */
.sidebar {
  position: sticky;
  top: 4rem;
  align-self: start;
}

.sidebar-section {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.sidebar-section h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #d4a574;
  margin-bottom: 0.75rem;
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  margin-bottom: 0.4rem;
}

.sidebar-list a {
  font-size: 0.85rem;
  color: #b0a89e;
  display: block;
  padding: 0.25rem 0;
  transition: color 0.15s;
}

.sidebar-list a:hover {
  color: #d4a574;
  text-decoration: none;
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #2a2a3e;
  color: #5a5a6e;
  font-size: 0.8rem;
  margin-top: 3rem;
}

/* === Homepage Intro === */
.intro-text {
  text-align: center;
  margin-bottom: 2.5rem;
}

.intro-text h2 {
  font-size: 1.5rem;
  color: #e0dcd0;
  margin-bottom: 0.5rem;
}

.intro-text p {
  color: #8a8a9e;
  font-size: 0.9rem;
}

/* === Character Info Panel === */
.char-panel {
  background: linear-gradient(135deg, #1a1a2e 0%, #1e1e36 100%);
  border: 1px solid #2a2a3e;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
}

.char-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  flex-shrink: 0;
}

.char-icon.geo  { background: linear-gradient(135deg, #6b5b30, #9a7b3a); color: #f0d080; }
.char-icon.pyro { background: linear-gradient(135deg, #6b2020, #9a3030); color: #f08060; }
.char-icon.cryo { background: linear-gradient(135deg, #2a4a6b, #3a6a9a); color: #a0d8f0); }
.char-icon.hydro{ background: linear-gradient(135deg, #1a3a6b, #2a5a9a); color: #80c8f0); }

.char-stars {
  color: #d4a574;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 0.25rem;
}

.char-name-badge {
  font-size: 1.5rem;
  font-weight: 800;
  color: #e0dcd0;
  margin-bottom: 0.25rem;
}

.char-subtitle {
  font-size: 0.85rem;
  color: #8a8a9e;
  margin-bottom: 0.6rem;
}

.char-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.char-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.char-tag.element-geo  { background: rgba(240, 208, 128, 0.15); color: #f0d080; }
.char-tag.element-pyro { background: rgba(240, 128, 96, 0.15);  color: #f08060; }
.char-tag.element-cryo { background: rgba(160, 216, 240, 0.15); color: #a0d8f0; }
.char-tag.weapon       { background: rgba(180, 160, 140, 0.12); color: #b4a08c; }
.char-tag.role         { background: rgba(160, 200, 140, 0.14); color: #a0c88c; }

/* === Stat Priority Table === */
.stat-table-wrap {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.stat-table thead th {
  background: #1a1a2e;
  color: #d4a574;
  font-weight: 700;
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #3a3a4e;
}

.stat-table tbody td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid #1a1a2e;
  color: #c0b8a8;
}

.stat-table tbody tr:nth-child(even) td {
  background: rgba(26, 26, 46, 0.4);
}

.stat-table .stat-priority {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0.4rem;
}

.stat-table .prio-1 { background: #d4a574; color: #1a1a2e; }
.stat-table .prio-2 { background: #a0a0a0; color: #1a1a2e; }
.stat-table .prio-3 { background: #8a6a4a; color: #e0dcd0; }
.stat-table .prio-4 { background: #5a5a5a; color: #c0b8a8; }

/* === Weapon Compare Card === */
.weapon-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.weapon-card {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 1.25rem;
}

.weapon-card.premium {
  border-color: rgba(212, 167, 116, 0.3);
  background: linear-gradient(135deg, #1e1a26 0%, #1a1a2e 100%);
}

.weapon-card .w-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.weapon-card.premium .w-label { color: #d4a574; }
.weapon-card.f2p .w-label     { color: #7ec99e; }

.weapon-card .w-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e0dcd0;
  margin-bottom: 0.4rem;
}

.weapon-card .w-sub {
  font-size: 0.82rem;
  color: #8a8a9e;
  line-height: 1.4;
}

/* === Divider === */
.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2a2a3e, transparent);
  margin: 2rem 0;
}

/* === Team Comp Visual === */
.team-row {
  display: flex;
  gap: 0.6rem;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}

.team-slot {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  text-align: center;
  min-width: 80px;
}

.team-slot .ts-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e0dcd0;
}

.team-slot .ts-role {
  font-size: 0.7rem;
  color: #8a8a9e;
  margin-top: 0.15rem;
}

.team-slot.highlight {
  border-color: rgba(212, 167, 116, 0.3);
  background: #1e1a26;
}

/* === Mobile tweaks for new elements === */
@media (max-width: 768px) {
  .char-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .char-icon {
    margin: 0 auto;
  }

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

  .weapon-compare {
    grid-template-columns: 1fr;
  }
}

/* === Utility === */
.tag-build    { color: #7eb8da; }
.tag-meta     { color: #c98bdb; }
.tag-f2p      { color: #7ec99e; }
.tag-tierlist { color: #d4a574; }

/* === Responsive === */
@media (max-width: 768px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: 2;
  }

  .site-title {
    font-size: 1.4rem;
  }

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

  .nav-links {
    gap: 0.75rem;
    font-size: 0.82rem;
  }
}
