/* ============================
   Wordle Blog — Dark Theme
   ============================ */

:root {
  --bg: #121213;
  --bg-secondary: #1a1a1b;
  --bg-card: #242424;
  --border: #3a3a3c;
  --text: #ffffff;
  --text-muted: #818384;
  --green: #538d4e;
  --green-light: #6aaa64;
  --yellow: #b59f3b;
  --yellow-light: #c9b458;
  --gray: #3a3a3c;
  --gray-light: #818384;
  --accent: #538d4e;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-light);
  text-decoration: none;
  letter-spacing: 0.5px;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover { color: var(--text); }

/* Main */
main { padding: 2rem 0 4rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a { color: var(--green-light); text-decoration: none; }

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  letter-spacing: 2px;
}

.hero p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 1.5rem;
  font-size: 0.95rem;
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Post list */
.post-list { display: flex; flex-direction: column; gap: 1rem; }

.post-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.post-preview:hover { border-color: var(--green); }

.post-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.post-preview-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-preview h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.post-preview h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-preview h2 a:hover { color: var(--green-light); }

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

.mini-grid {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 0.5rem;
}

.view-all { text-align: center; margin-top: 2rem; }
.view-all a { color: var(--green-light); text-decoration: none; }

/* Badges */
.result-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.result-solved { background: var(--green); color: #fff; }
.result-failed { background: var(--gray); color: #fff; }
.wordle-number { color: var(--green-light); font-weight: 600; }

/* Post */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-title { font-size: 1.75rem; margin-bottom: 0.75rem; }

/* Wordle Grid */
.wordle-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  margin: 2rem auto;
  width: fit-content;
}

.wordle-row { display: flex; gap: 6px; }

.tile {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  letter-spacing: 0;
}

.tile.green  { background: var(--green);  color: #fff; }
.tile.yellow { background: var(--yellow); color: #fff; }
.tile.gray   { background: var(--gray);   color: #fff; }

/* Share block */
.share-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 1.5rem auto;
  width: fit-content;
  font-size: 1.3rem;
  line-height: 1.4;
  text-align: center;
}

.share-block pre {
  font-family: inherit;
  white-space: pre;
  background: none;
  border: none;
}

/* Post content */
.post-content {
  font-size: 1rem;
  line-height: 1.75;
  color: #d7dadc;
}

.post-content p { margin-bottom: 1.25rem; }
.post-content h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; color: var(--text); }
.post-content h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.post-content strong { color: var(--text); }
.post-content em { color: var(--text-muted); }
.post-content code {
  background: var(--bg-card);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

/* Post nav */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.post-nav a { color: var(--green-light); text-decoration: none; }
.post-nav a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 480px) {
  .tile { width: 46px; height: 46px; font-size: 1.2rem; }
  .hero h1 { font-size: 1.4rem; }
  .stats-bar { flex-direction: column; gap: 0.5rem; }
}
