/* miladychan — black + yellow 4chan-core */
:root {
  --bg: #0a0a0a;
  --bg-soft: #141007;
  --panel: #1a1405;
  --panel-hi: #241b08;
  --border: #3a2d05;
  --yellow: #ffd700;
  --yellow-hi: #fff36b;
  --yellow-dim: #8a7000;
  --text: #f7e9a0;
  --text-dim: #9a8b3a;
  --quote: #80e07c;
  --reply-link: #ffa500;
  --danger: #ff4040;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", "DejaVu Sans Mono", monospace;
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(255,215,0,0.08), transparent 60%),
    repeating-linear-gradient(0deg, #0a0a0a 0 2px, #0c0a04 2px 4px);
}

a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--yellow-hi); text-decoration: underline; }

/* ---------- header ---------- */
.topbar {
  background: linear-gradient(180deg, #1a1405 0%, #0a0a0a 100%);
  border-bottom: 2px solid var(--yellow);
  padding: 14px 20px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent 0 14px,
    rgba(255,215,0,0.04) 14px 28px
  );
  pointer-events: none;
}

.logo {
  font-family: "Impact", "Arial Black", sans-serif;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--yellow);
  text-shadow:
    0 0 1px #000,
    2px 2px 0 #000,
    4px 4px 0 #1a1405,
    0 0 22px rgba(255,215,0,0.45);
  margin: 0;
}
.logo .slash { color: var(--text); }
.logo .b { color: var(--yellow-hi); }

.tagline {
  color: var(--text-dim);
  font-size: 12px;
  margin: 4px 0 0;
  font-style: italic;
}

.stats {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}
.stats b { color: var(--yellow); }

/* ---------- container ---------- */
.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
}

.crumbs {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.crumbs a { color: var(--yellow); }

/* ---------- form ---------- */
.post-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--yellow);
  padding: 12px;
  margin-bottom: 18px;
}

.post-form h3 {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.post-form .row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.post-form label {
  display: inline-block;
  min-width: 70px;
  color: var(--text-dim);
  font-size: 12px;
  padding-top: 4px;
}

.post-form input[type="text"],
.post-form textarea {
  flex: 1 1 200px;
  background: #000;
  color: var(--yellow);
  border: 1px solid var(--border);
  padding: 5px 7px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  caret-color: var(--yellow-hi);
}

.post-form input[type="text"]:focus,
.post-form textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow);
}

.post-form textarea {
  min-height: 90px;
  resize: vertical;
  font-family: inherit;
}

.post-form .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.post-form button {
  background: var(--yellow);
  color: #000;
  border: 1px solid #000;
  padding: 7px 18px;
  font-family: inherit;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
}
.post-form button:hover { background: var(--yellow-hi); }
.post-form button:active { transform: translate(2px, 2px); box-shadow: none; }
.post-form button:disabled { background: var(--yellow-dim); cursor: wait; }

.post-form .sage-label {
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.post-form .error {
  color: var(--danger);
  font-size: 12px;
  margin-left: 8px;
}

/* ---------- threads ---------- */
.thread-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--yellow);
  background: var(--bg-soft);
  margin-bottom: 14px;
  padding: 10px 12px;
}

.post {
  padding: 4px 0;
}

.post-head {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.post-head .subject {
  color: var(--yellow-hi);
  font-weight: bold;
  font-size: 13px;
  margin-right: 6px;
}

.post-head .author {
  color: #86c07c;
  font-weight: bold;
}
.post-head .trip {
  color: var(--yellow-dim);
  font-weight: bold;
}
.post-head .date { margin-left: 6px; }
.post-head .num {
  margin-left: 6px;
  color: var(--yellow);
}
.post-head .num a { color: var(--yellow); }

.post-body {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  color: var(--text);
  padding-left: 12px;
  border-left: 2px dashed rgba(255,215,0,0.15);
  margin: 4px 0 2px;
}

.post-body .greentext {
  color: var(--quote);
}
.post-body .reply-link {
  color: var(--reply-link);
  text-decoration: underline;
}

.post-image {
  float: left;
  margin: 4px 12px 6px 0;
  max-width: 220px;
  max-height: 220px;
  border: 1px solid var(--border);
  background: #000;
}
.post-image img {
  max-width: 220px;
  max-height: 220px;
  display: block;
}

.thread-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
  border-top: 1px dotted var(--border);
  padding-top: 6px;
  clear: both;
}
.thread-meta a { color: var(--yellow); font-weight: bold; }

.reply {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 8px 10px;
  margin: 6px 0 6px 24px;
  position: relative;
}
.reply::before {
  content: ">>";
  position: absolute;
  left: -22px;
  top: 8px;
  color: var(--yellow-dim);
  font-weight: bold;
}

.loading, .empty {
  text-align: center;
  color: var(--text-dim);
  padding: 24px;
  font-style: italic;
}

/* ---------- footer ---------- */
.foot {
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
  padding: 24px 12px 30px;
  border-top: 1px dashed var(--border);
  margin-top: 30px;
}
.foot .hearts { color: var(--yellow); }

/* responsive */
@media (max-width: 640px) {
  .logo { font-size: 30px; }
  .post-form label { min-width: 0; flex-basis: 100%; }
  .reply { margin-left: 12px; }
  .post-image, .post-image img { max-width: 140px; max-height: 140px; }
}
