/* ==========================================================================
   WeakLegacy2.online - Global Styles
   Pure CSS Design System - No JavaScript Required
   ========================================================================== */

/* ==========================================================================
   1.3.1 CSS Variables & Base Styles
   ========================================================================== */

:root {
  /* Color System */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #10b981;
  --secondary-hover: #059669;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;

  /* Accent Colors - For emphasis and CTAs */
  --accent-purple: #9333ea;
  --accent-purple-hover: #7e22ce;
  --accent-red: #dc2626;
  --accent-red-hover: #b91c1c;
  --accent-green: #16a34a;
  --accent-green-hover: #15803d;

  /* Background Colors */
  --bg-color: #f9fafb;
  --bg-white: #ffffff;
  --bg-gray-light: #f3f4f6;
  --bg-gray-dark: #e5e7eb;

  /* Text Colors */
  --text-color: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-light: #ffffff;

  /* Borders */
  --border-color: #e5e7eb;
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --border-radius-lg: 12px;

  /* Spacing (4px base) */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;        /* 16px */
  --font-size-lg: 1.125rem;      /* 18px */
  --font-size-xl: 1.25rem;       /* 20px */
  --font-size-2xl: 1.5rem;       /* 24px */
  --font-size-3xl: 1.875rem;     /* 30px */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Container */
  --container-max-width: 1200px;
  --container-padding: var(--spacing-md);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-color);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

/* Paragraphs & Lists */
p {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

ul, ol {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

li {
  margin-bottom: var(--spacing-sm);
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   1.3.2 Navigation Component
   ========================================================================== */

.main-nav {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--spacing-md) var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.nav-logo {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  background-color: var(--bg-gray-light);
  color: var(--primary-color);
  text-decoration: none;
}

/* ==========================================================================
   1.3.3 Card Components
   ========================================================================== */

.card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* 确保卡片填充整个网格单元 */
  height: 100%;
}

.card-link .card-icon {
  flex-shrink: 0;
}

.card-link .card-title {
  flex-shrink: 0;
}

.card-link p {
  flex-grow: 1;
  margin-bottom: 0;
}

.card-link .tier-preview {
  flex-shrink: 0;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* ==========================================================================
   1.3.4 Table Components
   ========================================================================== */

/* Table Wrapper for Mobile Responsiveness */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--spacing-md);
  border-radius: var(--border-radius);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--spacing-xl);
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Table Caption */
caption {
  caption-side: top;
  padding: var(--spacing-md);
  text-align: left;
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--text-color);
  background-color: var(--bg-gray-light);
}

thead {
  background-color: var(--primary-color);
  color: var(--text-light);
}

th {
  padding: 0.6rem;
  text-align: left;
  font-weight: 600;
  font-size: var(--font-size-base);
}

/* Sticky Table Header */
thead th {
  position: sticky;
  top: 0;
  background: var(--primary-color);
  z-index: 10;
  border-bottom: 2px solid var(--primary-hover);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-color);
}

/* Row headers with scope */
th[scope="row"] {
  background-color: var(--bg-gray-light);
  font-weight: 600;
}

/* Rare item highlight */
.rare {
  font-weight: 700;
  color: #d97706;
}

/* Boss link styling */
.boss-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.boss-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* On-page navigation */
.onpage {
  text-align: center;
  padding: var(--spacing-md);
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: var(--border-radius);
  margin: var(--spacing-lg) 0;
}

.onpage a {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.onpage a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* FAQ / Details styling */
.faq-item {
  background-color: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.faq-item summary {
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--text-color);
  padding: var(--spacing-xs);
  cursor: pointer;
  user-select: none;
}

.faq-item summary:hover {
  color: var(--primary-color);
}

.faq-item p {
  margin-top: var(--spacing-md);
  margin-bottom: 0;
  padding-left: var(--spacing-md);
  line-height: 1.6;
}

/* Code cells with monospace font */
td code,
td strong {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  background: #f3f4f6;
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  font-size: 0.9em;
}

/* No codes cell styling */
.no-codes-cell {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
}

.no-codes-cell a {
  font-weight: 500;
  text-decoration: underline;
}

tbody tr:hover {
  background-color: #f9fafb;
}

tbody tr:nth-child(odd) {
  background-color: var(--bg-white);
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

/* ==========================================================================
   1.3.5 Alert Components
   ========================================================================== */

.alert {
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid;
}

.alert-title {
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-lg);
}

.alert-danger {
  background-color: #fee2e2;
  border-color: var(--danger-color);
  color: #991b1b;
}

.alert-scam {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--danger-color);
  color: #7f1d1d;
}

.alert-warning {
  background-color: #fef3c7;
  border-color: var(--warning-color);
  color: #92400e;
}

.alert-info {
  background-color: #dbeafe;
  border-color: var(--info-color);
  color: #1e40af;
}

.alert-success {
  background-color: #d1fae5;
  border-color: var(--secondary-color);
  color: #065f46;
}

/* ==========================================================================
   1.3.6 Status Label Components
   ========================================================================== */

.status-active {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.status-expired {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  background-color: var(--text-muted);
  color: var(--text-light);
}

/* ==========================================================================
   1.3.7 Footer Component
   ========================================================================== */

.main-footer {
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) var(--container-padding);
  text-align: center;
  margin-top: var(--spacing-2xl);
}

.main-footer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   1.3.8 Utility Classes
   ========================================================================== */

/* Text Alignment */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Text Styles */
.text-muted { color: var(--text-secondary); }
.text-small { font-size: var(--font-size-sm); }
.text-large { font-size: var(--font-size-lg); }

/* Margin Bottom */
.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* Margin Top */
.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

/* ==========================================================================
   Main Content Container
   ========================================================================== */

.main-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--container-padding);
  min-height: calc(100vh - 200px);
}

.page-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-lg);
  color: var(--text-color);
}

.page-description {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

/* ==========================================================================
   1.3.9 Responsive Design - Media Queries
   ========================================================================== */

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --container-padding: var(--spacing-md);
  }

  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Mobile (<768px) */
@media (max-width: 768px) {
  :root {
    --font-size-3xl: 1.5rem;      /* 24px */
    --font-size-2xl: 1.25rem;     /* 20px */
    --spacing-2xl: 32px;
  }

  /* Navigation - Vertical Stack */
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-menu {
    width: 100%;
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .nav-menu a {
    display: block;
    width: 100%;
  }

  /* Card Grid - Single Column */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Main Content - Reduced Padding */
  .main-content {
    padding: var(--spacing-lg) var(--container-padding);
  }

  /* Tables - Smaller Font */
  table {
    font-size: var(--font-size-sm);
  }

  th, td {
    padding: var(--spacing-sm);
  }
}

/* Desktop (>1024px) */
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    /* 确保卡片等高 */
    grid-auto-rows: 1fr;
  }
}

/* ==========================================================================
   Tier List Page Styles
   ========================================================================== */

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.page-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.version-info {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-lg);
}

.version-info strong {
  color: var(--text-color);
  font-weight: 600;
}

/* Table of Contents Navigation */
.toc-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: var(--border-radius);
  margin: var(--spacing-lg) 0;
}

.toc-nav a {
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--primary-color);
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

.toc-nav a:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
}

.toc-sep {
  color: var(--text-secondary);
  margin: 0 var(--spacing-xs);
}

.update-timestamp {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-lg);
}

.intro-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.intro-text ul {
  margin-top: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

.intro-text li {
  margin-bottom: var(--spacing-sm);
}

/* Tier Explanation Section */
.tier-explanation {
  margin-bottom: var(--spacing-xl);
}

.tier-guide {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  max-width: 1000px;
  margin: 0 auto;
}

.tier-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  border-left: 4px solid;
  box-shadow: var(--shadow-sm);
}

.tier-item.tier-s { border-color: #ef4444; }
.tier-item.tier-a { border-color: #f59e0b; }
.tier-item.tier-b { border-color: #10b981; }
.tier-item.tier-c { border-color: #3b82f6; }
.tier-item.tier-d { border-color: #6b7280; }

.tier-badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: var(--font-size-lg);
  min-width: 60px;
  text-align: center;
  color: var(--text-light);
}

.tier-badge.tier-s,
.tier-s .tier-badge { background-color: #ef4444; }

.tier-badge.tier-a,
.tier-a .tier-badge { background-color: #f59e0b; }

.tier-badge.tier-b,
.tier-b .tier-badge { background-color: #10b981; }

.tier-badge.tier-c,
.tier-c .tier-badge { background-color: #3b82f6; }

.tier-badge.tier-d,
.tier-d .tier-badge { background-color: #6b7280; }

.tier-desc {
  flex: 1;
  line-height: 1.6;
}

/* Filter Navigation */
.filter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background-color: var(--bg-gray-light);
  border-radius: var(--border-radius);
}

.filter-link {
  padding: var(--spacing-xs) var(--spacing-md);
  background-color: var(--bg-white);
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.filter-link:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Tier List Table Styles */
.tier-row {
  transition: background-color 0.2s ease;
}

.tier-row:hover {
  background-color: var(--bg-gray-light) !important;
}

.tier-badge-cell {
  font-weight: 700;
  font-size: var(--font-size-lg);
  text-align: center;
  vertical-align: middle;
}

.tier-row.tier-s .tier-badge-cell { color: #ef4444; }
.tier-row.tier-a .tier-badge-cell { color: #f59e0b; }
.tier-row.tier-b .tier-badge-cell { color: #10b981; }
.tier-row.tier-c .tier-badge-cell { color: #3b82f6; }
.tier-row.tier-d .tier-badge-cell { color: #6b7280; }

/* Style Link Styling */
.style-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.style-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Beginner Badge */
.beginner-badge {
  display: inline-block;
  font-size: 1rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}

/* Beginner Recommendations Section */
.beginner-section {
  margin-bottom: var(--spacing-xl);
}

.beginner-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.beginner-highlight {
  border-left: 4px solid var(--primary-color);
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border: 2px solid #fbbf24;
  position: relative;
}

.beginner-star {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.beginner-cards .card {
  border-left: 4px solid var(--primary-color);
}

.beginner-cards .card h3 {
  color: var(--text-color);
  margin-bottom: var(--spacing-sm);
}

.beginner-cards .tier-badge {
  display: inline-block;
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-base);
  padding: var(--spacing-xs) var(--spacing-sm);
}

.beginner-cards p {
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

/* Detailed Styles Section */
.detailed-styles-section {
  margin-bottom: var(--spacing-xl);
}

.style-category {
  margin-bottom: var(--spacing-xl);
}

.category-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
}

.tier-s-bg { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.tier-a-bg { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.tier-b-bg { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.tier-c-bg { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.tier-d-bg { background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%); }

.style-detail {
  background-color: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid var(--primary-color);
}

.style-name {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

.style-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.style-info li {
  padding: var(--spacing-sm) 0;
  line-height: 1.6;
  border-bottom: 1px solid var(--bg-gray-light);
}

.style-info li:last-child {
  border-bottom: none;
}

.style-info strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Version Changes Section */
.changes-section {
  margin-bottom: var(--spacing-xl);
}

.changes-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.change-category {
  background-color: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.change-category h3 {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border-color);
}

.change-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.change-category li {
  padding: var(--spacing-sm) 0;
  line-height: 1.6;
  border-bottom: 1px solid var(--bg-gray-light);
}

.change-category li:last-child {
  border-bottom: none;
}

.change-category strong {
  color: var(--primary-color);
}

/* Disclaimer Section */
.disclaimer-section {
  margin-bottom: var(--spacing-xl);
}

/* Under Review Section */
.under-review-section {
  margin-bottom: var(--spacing-xl);
}

.under-review-list {
  margin-top: var(--spacing-lg);
}

.under-review-list .card {
  border-left: 4px solid var(--warning-color);
}

.under-review-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.under-review-list li {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.6;
}

.under-review-list li:last-child {
  border-bottom: none;
}

/* Methodology Section */
.methodology-section {
  margin-bottom: var(--spacing-xl);
}

.methodology-section .card {
  border-left: 4px solid var(--info-color);
}

.methodology-section h4 {
  color: var(--text-color);
  font-size: var(--font-size-lg);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.methodology-section ol,
.methodology-section ul {
  margin-top: var(--spacing-sm);
  line-height: 1.8;
}

.methodology-section li {
  margin-bottom: var(--spacing-sm);
}

/* Mobile Optimizations for Tier List */
@media (max-width: 768px) {
  .tier-guide {
    gap: var(--spacing-sm);
  }

  .tier-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tier-badge {
    margin-bottom: var(--spacing-sm);
  }

  .beginner-cards {
    grid-template-columns: 1fr;
  }

  .changes-content {
    grid-template-columns: 1fr;
  }

  /* Make tier list table more readable on mobile */
  table {
    font-size: 0.75rem;
  }

  th, td {
    padding: var(--spacing-xs);
  }

  .tier-badge-cell {
    font-size: var(--font-size-base);
  }
}

/* ==========================================================================
   Update Notes Page Styles
   ========================================================================== */

/* Latest Update Banner */
.latest-update {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 0.75rem;
  padding: 1rem;
  margin: 0.75rem 0 var(--spacing-xl);
}

.latest-update h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

.latest-update ul {
  margin: var(--spacing-md) 0;
  padding-left: var(--spacing-lg);
}

.latest-update li {
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

.latest-update .cta {
  margin-top: var(--spacing-md);
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* Version Overview Cards */
.version-cards {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: var(--spacing-xl);
}

.version-cards .card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.8rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.version-cards .card:hover {
  border-color: #c7d2fe;
  background: #f8fafc;
  transform: translateY(-2px);
}

.version-cards .card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-xs);
}

.version-cards .card p {
  margin-bottom: var(--spacing-xs);
  color: var(--text-secondary);
}

/* Table of Contents - Sticky */
.toc {
  position: sticky;
  top: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  margin: 0.75rem 0 var(--spacing-lg);
  z-index: 2;
  font-size: var(--font-size-sm);
  box-shadow: var(--shadow-sm);
}

.toc a {
  margin: 0 0.25rem;
  font-weight: 500;
}

/* Badge System */
.badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  font-weight: 600;
  margin-right: 0.3rem;
  display: inline-block;
}

.badge.new {
  background: #dcfce7;
  color: #166534;
}

.badge.buff {
  background: #e0f2fe;
  color: #075985;
}

.badge.nerf {
  background: #fee2e2;
  color: #991b1b;
}

.badge.bug {
  background: #fae8ff;
  color: #6b21a8;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 0.5rem;
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  background: #1e40af;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn.ghost {
  background: transparent;
  border: 1px solid #c7d2fe;
  color: #1d4ed8;
}

.btn.ghost:hover {
  background: #eff6ff;
  border-color: #1d4ed8;
}

/* Patch Table Styles */
table.patch {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
}

table.patch th,
table.patch td {
  padding: 0.6rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

table.patch th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

table.patch .row-new {
  background: #f0fdf4;
}

table.patch .row-buff {
  background: #f0f9ff;
}

table.patch .row-nerf {
  background: #fef2f2;
}

/* Version Header Enhancements */
.version-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

/* Version Navigation */
.version-nav {
  text-align: center;
  padding: var(--spacing-md);
  background-color: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.version-nav a {
  font-weight: 500;
  white-space: nowrap;
}

/* Permalink Styles */
.permalink {
  margin-left: 0.4rem;
  opacity: 0.6;
  text-decoration: none;
  font-size: 0.9em;
  color: var(--text-secondary);
}

.permalink:hover {
  opacity: 1;
  color: var(--primary-color);
}

/* Source Link */
.src {
  font-size: 0.9em;
  margin-left: 0.6rem;
  color: var(--text-secondary);
}

.src a {
  font-weight: 500;
}

/* Buff/Nerf Badges */
.buff-badge,
.nerf-badge {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.85em;
  font-weight: 600;
  margin-right: 0.3rem;
}

.buff-badge {
  background-color: #d1fae5;
  color: #065f46;
}

.nerf-badge {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Back to Top Link */
.back-to-top {
  text-align: center;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.back-to-top a {
  font-weight: 500;
  text-decoration: none;
}

.back-to-top a:hover {
  text-decoration: underline;
}

/* Version Note (for inline notes) */
.version-note {
  border-left: 4px solid var(--border-color);
  padding-left: 0.75rem;
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

/* Mobile Responsiveness for Update Notes */
@media (max-width: 768px) {
  .version-nav {
    font-size: var(--font-size-sm);
  }

  .version-nav a {
    display: inline-block;
    margin: 0.2rem;
  }

  .src {
    display: block;
    margin-left: 0;
    margin-top: var(--spacing-xs);
  }

  h3 .permalink {
    display: inline-block;
  }

  /* Latest Update Banner Mobile */
  .latest-update {
    padding: 0.75rem;
  }

  .latest-update h2 {
    font-size: var(--font-size-xl);
  }

  .latest-update .cta {
    flex-direction: column;
  }

  .latest-update .btn {
    width: 100%;
    text-align: center;
  }

  /* Version Cards Mobile */
  .version-cards {
    grid-template-columns: 1fr;
  }

  /* TOC Mobile */
  .toc {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  .toc a {
    display: inline-block;
    margin: 0.15rem;
  }

  /* Patch Table Mobile */
  table.patch {
    font-size: 0.8rem;
  }

  table.patch th,
  table.patch td {
    padding: 0.4rem;
  }

  .badge {
    font-size: 0.65rem;
    padding: 0.08rem 0.3rem;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .main-nav,
  .main-footer {
    display: none;
  }

  .main-content {
    padding: 0;
  }

  a {
    text-decoration: underline;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
  }
}

/* ==========================================================================
   Hero Section - Two Column Layout
   ========================================================================== */

/* Hero Grid Layout - Two Column Desktop, Single Column Mobile */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

/* Desktop: Two Column Layout */
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
  }
}

/* Large Desktop: 3:2 ratio for better text readability */
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 3fr 2fr;
  }
}

/* Hero Text Column */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.hero-text .page-title {
  margin-bottom: 0;
}

/* Hero Image Column */
.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-screenshot {
  margin: 0;
  width: 100%;
  max-width: 640px;
}

.screenshot-img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-img:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.screenshot-caption {
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Mobile: Image appears below text */
@media (max-width: 767px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: 2;
  }

  .hero-text {
    order: 1;
  }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Focus Visible States - WCAG 2.1 Compliance */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

/* Navigation CTA Button */
.nav-cta {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-hover) 100%);
  color: var(--text-light);
  font-weight: 600;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--accent-purple-hover) 0%, #6b21a8 100%);
  color: var(--text-light);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

.nav-cta:focus-visible {
  outline: 3px solid var(--accent-purple);
  outline-offset: 3px;
}

/* Enhanced Status Badge Contrast - WCAG AA Compliant */
.status-active {
  background-color: #059669; /* Darker green for better contrast */
  color: #ffffff;
  font-weight: 600;
}

/* Improved Link Contrast in Paragraphs */
p a,
li a {
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Skip to Main Content Link (for screen readers) */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  text-decoration: none;
  z-index: 100;
}

.skip-to-main:focus {
  top: 0;
}

/* Mobile Navigation Adjustments */
@media (max-width: 768px) {
  .nav-cta {
    width: 100%;
    text-align: center;
    margin-top: var(--spacing-sm);
  }

  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-menu {
    width: 100%;
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .nav-menu a {
    text-align: center;
    padding: var(--spacing-md);
  }
}

/* ==========================================================================
   Home Page Specific Styles
   ========================================================================== */

/* Hero Value Proposition */
.hero-value-prop {
  font-size: var(--font-size-lg);
  color: var(--text-color);
  line-height: 1.6;
  padding: var(--spacing-md);
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border-left: 4px solid var(--accent-purple);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
}

.hero-value-prop strong {
  color: var(--accent-purple);
  font-weight: 700;
}

/* Card Icons */
.card-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  text-align: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Tier Preview in Card */
.tier-preview {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.tier-preview strong {
  color: var(--text-color);
}

.version-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  background-color: var(--bg-gray-light);
  color: var(--text-secondary);
  border-radius: var(--border-radius-sm);
  font-size: 0.85em;
  font-weight: 500;
}

.tier-preview a {
  font-weight: 600;
  white-space: nowrap;
}

/* Update List with Badges */
.update-list {
  list-style: none;
  padding: 0;
  margin: var(--spacing-md) 0;
}

.update-list li {
  margin-bottom: var(--spacing-sm);
  padding-left: 0;
  line-height: 1.8;
}

/* Update Badges */
.update-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: var(--spacing-sm);
  vertical-align: middle;
}

.badge-new {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.badge-buffed {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.badge-nerfed {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.badge-changed {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.badge-fixed {
  background-color: #e0e7ff;
  color: #3730a3;
  border: 1px solid #a5b4fc;
}

/* Mobile adjustments for home page */
@media (max-width: 768px) {
  .hero-value-prop {
    font-size: var(--font-size-base);
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .card-icon {
    font-size: 2rem;
  }

  .tier-preview {
    font-size: 0.8rem;
  }

  .update-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }
}

/* ==========================================================================
   Codes Page Specific Styles
   ========================================================================== */

/* Inline Highlight Section - First Screen Priority */
.codes-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
}

.codes-inline .chip {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.copylike {
  font-family: ui-monospace, Menlo, Monaco, 'Courier New', monospace;
  background: #f3f4f6;
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  font-weight: 600;
  color: var(--text-color);
}

.codes-inline .more {
  margin: 0;
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
}

.codes-inline .more a {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
}

.codes-inline .more a:hover {
  text-decoration: underline;
}

/* Working Code Row Highlight */
tr.working {
  background: #f0fdf4 !important;
}

tr.working:hover {
  background: #dcfce7 !important;
}

/* Pending Code Row Highlight */
tr.pending {
  background: #fef9e7 !important;
}

tr.pending:hover {
  background: #fef3c7 !important;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.ok {
  background: #dcfce7;
  color: #166534;
}

.badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.badge.pending {
  background: #fef3c7;
  color: #92400e;
}

/* Note Styles */
.note {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0.5rem 0;
}

.note.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.note.info a {
  font-weight: 600;
  color: #1e40af;
  text-decoration: underline;
}

.note.info a:hover {
  color: #1e3a8a;
}

/* Mobile Optimizations for Codes Page */
@media (max-width: 768px) {
  .codes-inline {
    flex-direction: column;
    gap: 0.35rem;
  }

  .codes-inline .chip {
    width: 100%;
  }

  .copylike {
    font-size: 0.85em;
  }
}

/* ==========================================================================
   Safety Page Enhancements
   ========================================================================== */

/* Sticky Table of Contents */
.toc {
  position: sticky;
  top: 0.5rem;
  z-index: 3;
  background: var(--bg-white, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  margin: 0.75rem 0;
  font-size: 0.875rem;
}

.toc a {
  margin-right: 0.25rem;
  color: var(--primary-color);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* High-Contrast Warning Alert */
.alert.warn {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  margin: 1rem 0;
}

/* Button Row for Official Links */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

/* Button Variants */
.btn {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn.primary {
  background: #1d4ed8;
  color: #fff;
}

.btn.primary:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.btn.success {
  background: #16a34a;
  color: #fff;
}

.btn.success:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.btn.info {
  background: #0284c7;
  color: #fff;
}

.btn.info:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

/* Note Style */
.note {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0.5rem 0;
}

/* Scam Grid Layout */
.scam-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

.scam {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-white, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.scam:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.scam h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color, #1f2937);
}

.scam ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.scam li {
  margin-bottom: 0.25rem;
}

/* Mobile Optimizations for Safety Page */
@media (max-width: 768px) {
  .toc {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

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