/* PumpPedia - Wikipedia-style CSS */

:root {
  /* Light Mode Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #eaecf0;
  --text-primary: #202122;
  --text-secondary: #54595d;
  --text-muted: #72777d;
  --border-color: #a2a9b1;
  --border-light: #c8ccd1;
  --link-color: #3366cc;
  --link-hover: #5b4fcf;
  --accent-color: #36c;
  --success-color: #14866d;
  --warning-color: #fc3;
  --danger-color: #d33;
  --infobox-bg: #f8f9fa;
  --infobox-header: #a2d39c;
  --code-bg: #f6f6f6;
  --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #0f3460;
  --text-primary: #e4e4e4;
  --text-secondary: #b8b8b8;
  --text-muted: #888888;
  --border-color: #404040;
  --border-light: #333333;
  --link-color: #6b9fff;
  --link-hover: #9db8ff;
  --accent-color: #6b9fff;
  --success-color: #4ade80;
  --warning-color: #fbbf24;
  --danger-color: #f87171;
  --infobox-bg: #16213e;
  --infobox-header: #2d5a3d;
  --code-bg: #1e1e1e;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-weight: normal;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.25em;
  margin-bottom: 0.5em;
  margin-top: 1em;
}

h1 {
  font-size: 2em;
  border-bottom: none;
  margin-top: 0;
}

h2 {
  font-size: 1.5em;
}

h3 {
  font-size: 1.2em;
  border-bottom: none;
}

h4 {
  font-size: 1.1em;
  border-bottom: none;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--link-hover);
}

p {
  margin-bottom: 1em;
}

/* Layout */
.wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  min-height: 100vh;
}

/* Header */
.site-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #14f195 0%, #9945ff 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: white;
}

.logo-text {
  font-size: 1.8em;
  font-weight: normal;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--link-color);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  gap: 5px;
}

.search-box input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  width: 250px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.search-box button {
  padding: 8px 15px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.search-box button:hover {
  opacity: 0.9;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  background: var(--bg-primary);
}

/* Sidebar */
.sidebar {
  width: 220px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  padding: 20px 15px;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 25px;
}

.sidebar-title {
  font-size: 0.9em;
  font-weight: bold;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 5px;
}

.sidebar-links a {
  display: block;
  padding: 5px 10px;
  font-size: 0.9em;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.sidebar-links a:hover {
  background-color: var(--bg-tertiary);
  text-decoration: none;
}

.sidebar-links a.active {
  background-color: var(--bg-tertiary);
  font-weight: bold;
}

/* Main Content */
.main-content {
  flex: 1;
  background-color: var(--bg-primary);
  padding: 20px 30px;
  min-width: 0;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.breadcrumb a {
  color: var(--text-muted);
}

/* Page Title */
.page-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.page-title h1 {
  margin: 0;
  padding: 0;
  border: none;
}

.token-ticker {
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.5em;
  color: var(--text-secondary);
  font-family: monospace;
}

/* Infobox */
.infobox {
  float: right;
  clear: right;
  width: 300px;
  margin: 0 0 20px 20px;
  border: 1px solid var(--border-color);
  background-color: var(--infobox-bg);
  font-size: 0.9em;
}

.infobox-header {
  background-color: var(--infobox-header);
  padding: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
}

.infobox-image {
  text-align: center;
  padding: 15px;
  background: var(--bg-tertiary);
}

.infobox-image .placeholder {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
}

.infobox table {
  width: 100%;
  border-collapse: collapse;
}

.infobox th, .infobox td {
  padding: 6px 10px;
  border-top: 1px solid var(--border-light);
  vertical-align: top;
  text-align: left;
}

.infobox th {
  width: 40%;
  background: var(--bg-secondary);
  font-weight: normal;
  color: var(--text-secondary);
}

.infobox td {
  background: var(--bg-primary);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: bold;
}

.status-graduated {
  background-color: #d4edda;
  color: #155724;
}

.status-active {
  background-color: #cce5ff;
  color: #004085;
}

.status-dead {
  background-color: #f8d7da;
  color: #721c24;
}

[data-theme="dark"] .status-graduated {
  background-color: #1d4a26;
  color: #7ee89a;
}

[data-theme="dark"] .status-active {
  background-color: #1a365d;
  color: #63b3ed;
}

[data-theme="dark"] .status-dead {
  background-color: #4a1c24;
  color: #fc8181;
}

/* Category Tags */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  font-size: 0.8em;
  color: var(--text-secondary);
}

/* Table of Contents */
.toc {
  background: var(--infobox-bg);
  border: 1px solid var(--border-light);
  padding: 15px;
  margin-bottom: 20px;
  display: inline-block;
  min-width: 200px;
}

.toc-title {
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.toc-list {
  list-style: none;
  counter-reset: toc-counter;
}

.toc-list li {
  counter-increment: toc-counter;
  margin-bottom: 5px;
}

.toc-list li::before {
  content: counter(toc-counter) ". ";
  color: var(--text-muted);
}

.toc-list a {
  font-size: 0.9em;
}

/* Token Grid */
.token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.token-card {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-primary);
  transition: box-shadow 0.2s, transform 0.2s;
}

.token-card:hover {
  box-shadow: 0 4px 12px var(--shadow);
  transform: translateY(-2px);
}

.token-card-header {
  background: linear-gradient(135deg, #14f195 0%, #9945ff 100%);
  padding: 20px;
  text-align: center;
  color: white;
}

.token-card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.token-card-name {
  font-size: 1.2em;
  margin-bottom: 5px;
}

.token-card-ticker {
  font-size: 0.9em;
  opacity: 0.9;
  font-family: monospace;
}

.token-card-body {
  padding: 15px;
}

.token-card-stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9em;
}

.token-card-stat .label {
  color: var(--text-muted);
}

.token-card-stat .value {
  font-weight: bold;
}

.token-card-footer {
  padding: 10px 15px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.token-card-link {
  font-size: 0.9em;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
  margin: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dotted var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: var(--accent-color);
  border-radius: 50%;
}

.timeline-date {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.timeline-content {
  font-size: 0.95em;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9em;
}

.comparison-table th,
.comparison-table td {
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  text-align: left;
}

.comparison-table th {
  background: var(--bg-secondary);
  font-weight: bold;
}

.comparison-table tr:nth-child(even) {
  background: var(--bg-secondary);
}

.comparison-table tr:hover {
  background: var(--bg-tertiary);
}

/* Filter Controls */
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.9em;
  color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9em;
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Quote Box */
.quote-box {
  border-left: 4px solid var(--accent-color);
  padding: 15px 20px;
  margin: 20px 0;
  background: var(--bg-secondary);
  font-style: italic;
}

.quote-source {
  margin-top: 10px;
  font-size: 0.9em;
  color: var(--text-muted);
  font-style: normal;
}

/* Warning/Note Boxes */
.note-box {
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 4px;
  border-left: 4px solid;
}

.note-box.warning {
  background: #fff3cd;
  border-color: var(--warning-color);
  color: #856404;
}

.note-box.danger {
  background: #f8d7da;
  border-color: var(--danger-color);
  color: #721c24;
}

.note-box.info {
  background: #d1ecf1;
  border-color: #17a2b8;
  color: #0c5460;
}

[data-theme="dark"] .note-box.warning {
  background: #3d3200;
  color: #ffc107;
}

[data-theme="dark"] .note-box.danger {
  background: #3d1c20;
  color: #f8d7da;
}

[data-theme="dark"] .note-box.info {
  background: #0c3d48;
  color: #d1ecf1;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 20px;
  text-align: center;
  font-size: 0.85em;
  color: var(--text-muted);
}

.footer-disclaimer {
  max-width: 800px;
  margin: 0 auto 15px;
  padding: 15px;
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .sidebar-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
  }

  .infobox {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .search-box input {
    width: 200px;
  }

  .main-content {
    padding: 15px;
  }

  .token-grid {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    display: block;
    overflow-x: auto;
  }

  .filter-controls {
    flex-direction: column;
  }
}

/* Utility Classes */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.mb-1 { margin-bottom: 0.5em; }
.mb-2 { margin-bottom: 1em; }
.mb-3 { margin-bottom: 1.5em; }
.mt-1 { margin-top: 0.5em; }
.mt-2 { margin-top: 1em; }
.mt-3 { margin-top: 1.5em; }

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Print Styles */
@media print {
  .sidebar, .site-header, .site-footer, .theme-toggle, .search-box {
    display: none;
  }

  .main-content {
    padding: 0;
  }

  .infobox {
    page-break-inside: avoid;
  }
}
