/* Saxperience Archive – simple forum browse */

:root {
  --bg: #1a1b1e;
  --bg-card: #25262b;
  --border: #373a40;
  --text: #e8e8e8;
  --text-muted: #909296;
  --accent: #4dabf7;
  --accent-hover: #74c0fc;
  --error: #fa5252;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--accent);
}

.header-inner nav {
  display: flex;
  gap: 1rem;
}

.header-inner nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.header-inner nav a:hover {
  color: var(--accent);
}

.search-form {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
}

.search-form input {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  min-width: 160px;
}

.search-form button {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

.search-form button:hover {
  background: var(--border);
}

.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem;
}

h2:first-child {
  margin-top: 0;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

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

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

.error {
  color: var(--error);
}

.forum-list,
.thread-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.forum-list li,
.thread-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.forum-list li:last-child,
.thread-list li:last-child {
  border-bottom: none;
}

.forum-list a,
.thread-list a {
  color: var(--accent);
  text-decoration: none;
}

.forum-list a:hover,
.thread-list a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  background: var(--border);
  border-radius: 3px;
  margin-left: 0.5rem;
}

/* Search */
.search-form.inline {
  margin: 0 0 1rem;
}

.search-form.inline input {
  min-width: 280px;
}

.search-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

.search-results li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.search-results a {
  color: var(--accent);
  text-decoration: none;
}

.search-results a:hover {
  text-decoration: underline;
}

.snippet {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

/* Thread / posts */
.post-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.post-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.post-num {
  font-weight: 600;
  color: var(--text-muted);
}

.author-link,
.author-name {
  font-weight: 600;
}

.author-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

.author-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.post-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: auto;
}

.post-body {
  font-size: 0.95rem;
  word-wrap: break-word;
}

.post-body img {
  max-width: 100%;
  height: auto;
}

.post-body a {
  color: var(--accent);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  padding: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text);
}

#profile-body .loading {
  color: var(--text-muted);
}

#profile-body .profile-username {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

#profile-body .profile-signature {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

#profile-body .profile-signature img {
  max-width: 100%;
  height: auto;
}
