*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-hover: #1a1a1a;
  --border: #222222;
  --text: #e5e5e5;
  --text-muted: #888888;
  --text-dim: #555555;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --yellow: #eab308;
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Hero */
.hero {
  margin-bottom: 64px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.9;
  margin-bottom: 24px;
}

.subtitle a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

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

.has-tooltip {
  position: relative;
  color: var(--text);
  border-bottom: 1px dotted var(--text-muted);
  cursor: help;
}

.has-tooltip .tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  width: max-content;
  line-height: 1.6;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* Invisible bridge that fills the gap between trigger and tooltip */
.has-tooltip .tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

.has-tooltip .tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}

.has-tooltip:hover .tooltip {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.has-tooltip .tooltip a {
  color: var(--accent);
  text-decoration: none;
}

.has-tooltip .tooltip a:hover {
  text-decoration: underline;
}

/* Live Feed */
.live-feed-section {
  margin-bottom: 48px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--green);
}

.last-updated {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Statistics Content */
.statistics-content {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.stat-headline {
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.6;
}

.stat-subtitle {
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.stat-number {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.stat-cards-wrapper {
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.stat-cards-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
}

.stat-cards-wrapper > .stat-card {
  width: 100%;
  box-sizing: border-box;
}

.stat-cards-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.2s, background 0.2s;
}

.stat-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}

.stat-group {
  min-width: 0;
}

.stat-card:hover {
  border-color: #333;
  background: var(--surface-hover);
}

.stat-card-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  opacity: 0.85;
}

.stat-card-icon svg {
  width: 100%;
  height: 100%;
}

.stat-card-body {
  flex: 1;
  min-width: 0;
}

.stat-card-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  white-space: nowrap;
}

.stat-card-value.stat-value-secondary {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.stat-card-value.stat-value-dim {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-style: italic;
}

.stat-thanks {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-style: italic;
}

.stat-detail {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.8;
}

.loading-text {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Submit Report */
.submit-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: var(--accent-hover);
}

.submit-btn .btn-arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.2s;
}

.submit-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* Sections */
.status-section,
.archive-section {
  margin-bottom: 64px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Tabs */
.archive-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Tables */
.data-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 500;
  text-align: left;
  padding: 10px 14px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.data-table th .th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

.data-table th .th-sort:hover {
  color: var(--text);
}

.sort-icon {
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1;
}

.sort-icon.active {
  color: var(--accent);
}

.data-table th .col-filter {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 4px 8px;
  font-size: 0.75rem;
  margin-top: 6px;
  margin-bottom: 6px;
  outline: none;
  transition: border-color 0.2s;
}

.data-table th .col-filter-dropdown {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
  cursor: pointer;
  text-overflow: ellipsis;
  overflow: hidden;
  width: auto;
  min-width: 100%;
}

.data-table th .col-filter:focus {
  border-color: var(--accent);
}

.data-table th .col-filter::placeholder {
  color: var(--text-dim);
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table td.wrap-cell {
  white-space: normal;
  word-break: break-word;
}

.data-table th.auto-fit-col,
.data-table td.auto-fit-col {
  width: 1%;
  white-space: nowrap;
  max-width: none;
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table a {
  color: var(--accent);
  text-decoration: none;
}

.data-table a:hover {
  text-decoration: underline;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-info {
  white-space: nowrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-controls button {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}

.pagination-controls button:disabled {
  opacity: 0.3;
  cursor: default;
}

.pagination-controls button.active-page {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.placeholder-text {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.tba-message {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 0;
}

.archive-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
}

.archive-link:hover {
  text-decoration: underline;
}

/* Status indicators */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge.removed,
.status-badge.banned {
  background: var(--green-dim);
  color: var(--green);
}

.status-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: var(--yellow);
}

.status-badge.denied {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 32px 16px 60px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .archive-tabs {
    gap: 6px;
  }

  .tab-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .data-table td,
  .data-table th {
    padding: 8px 10px;
  }

  .pagination {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

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

  .stat-groups {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
