/* Discord Forum Backup - Modern Dark Theme */
:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #222222;
  --surface-hover: #2a2a2a;
  --text: #e8e8e8;
  --text-secondary: #999;
  --accent: #7c5cff;
  --accent-hover: #9b7fff;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --blue: #60a5fa;
  --border: #2a2a2a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* === TOP BAR === */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.searchbox { display: flex; gap: 0.5rem; align-items: center; }
.searchbox input, .searchbox select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.searchbox input { min-width: 280px; }
.searchbox input:focus, .searchbox select:focus {
  outline: none;
  border-color: var(--accent);
}
.searchbox button {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.searchbox button:hover { background: var(--accent-hover); }

/* === NAV LINKS === */
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* === CONTAINER === */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* === CARDS === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s, transform 0.1s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* === STATS BAR === */
.stats-bar {
  display: flex;
  gap: 2rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.stats-bar span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.stats-bar span strong {
  color: var(--text);
  margin-right: 0.3rem;
}

/* === THREAD LIST === */
.thread-list { list-style: none; }
.thread-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s, background 0.2s;
}
.thread-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}
.thread-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}
.thread-meta {
  color: var(--text-secondary);
  font-size: 0.82rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* === MESSAGES === */
.messages { list-style: none; }
.message {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 0.5rem;
}
.msg-head {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.msg-head strong { color: var(--accent); font-weight: 600; }
.msg-body {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 0.95rem;
  line-height: 1.7;
}
.permalink {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  transition: opacity 0.2s;
}
.permalink:hover { opacity: 1; }

/* === ATTACHMENTS === */
.attachments {
  list-style: none;
  padding: 0.75rem 0 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.attachments li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  transition: border-color 0.2s;
}
.attachments li:hover { border-color: var(--accent); }
.attachments img {
  max-width: 400px;
  max-height: 300px;
  border-radius: 6px;
  display: block;
}
.attachment-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
}
.attachment-file .icon { font-size: 1.2rem; }
.attachment-file .name { font-weight: 500; font-size: 0.9rem; }
.attachment-file .meta { font-size: 0.75rem; color: var(--text-secondary); }
.attachment-file .actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}
.attachment-file .actions a {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.attachment-file .actions a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* === FILE PREVIEW === */
.file-preview {
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 0.5rem;
  max-height: 300px;
  overflow: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #c9d1d9;
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-green { border-color: var(--green); color: var(--green); }
.badge-blue { border-color: var(--blue); color: var(--blue); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-download { background: var(--accent); color: white; border-color: var(--accent); }
.btn-download:hover { background: var(--accent-hover); }

/* === DATA TABLE === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.data-table th {
  background: var(--surface-2);
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-hover); }

/* === DOWNLOAD INFO BOX === */
.download-info, .info-box {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid #7c5cff33;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.info-box strong { color: var(--text); display: block; margin-bottom: 0.5rem; font-size: 0.95rem; }
.info-box ul { margin: 0; padding-left: 1.2rem; }
.info-box li { margin-bottom: 0.3rem; }
.info-box code {
  background: var(--surface-2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--green);
}

/* === BREADCRUMBS === */
.breadcrumbs {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { color: var(--accent-hover); }

/* === PAGINATION === */
.pagination {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1.5rem 0;
}
.pagination a {
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.pagination a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* === SEARCH RESULTS === */
.results { list-style: none; }
.results li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 0.5rem;
}
.excerpt mark {
  background: var(--yellow);
  color: #1e1f22;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
}

/* === SERVER CARDS === */
.server-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.5rem;
  border: 2px solid var(--border);
}

/* === FOOTER === */
.foot {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* === FILES PREVIEW === */
.files-preview {
  font-size: 0.82rem;
  margin-top: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

/* === MUTED === */
.muted { color: var(--text-secondary); font-size: 0.82rem; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .topbar { flex-direction: column; gap: 0.5rem; padding: 0.5rem 1rem; }
  .searchbox { width: 100%; }
  .searchbox input { min-width: auto; flex: 1; }
  .container { padding: 0 0.75rem; margin: 1rem auto; }
  .stats-bar { flex-direction: column; gap: 0.5rem; }
  .attachments img { max-width: 100%; }
}
