/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #0050bc;
  --primary-bright: #1d75fb;
  --primary-light: #e8f0fe;
  --bg: #F0E6FF;
  --bg-card: #fff;
  --ink: #352b42;
  --ink-muted: #6b5f7a;
  --border: #d8cfe6;
  --max-width: 720px;
  --heading-font: 'Permanent Marker', cursive;
  --radius: 12px;
}

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

a {
  color: var(--primary-bright);
}

a:hover {
  color: var(--primary);
}

/* --- Header --- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--primary);
  text-decoration: none;
  margin-right: auto;
}

.site-header nav > a:not(.logo):not(.cta-button):not(.lang-switch) {
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
}

.site-header nav > a:not(.logo):not(.cta-button):not(.lang-switch):hover {
  color: var(--primary-bright);
}

.lang-switch {
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.lang-switch:hover {
  color: var(--primary-bright);
}

.cta-button {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, var(--primary-bright), var(--primary));
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 80, 188, 0.25);
  transition: opacity 0.15s, box-shadow 0.15s;
}

.cta-button:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0, 80, 188, 0.35);
  color: #fff;
}

/* --- Content --- */
.content {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.content > h1 {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.site-description {
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

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

.post-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(53, 43, 66, 0.08);
  transition: box-shadow 0.15s, transform 0.15s;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(53, 43, 66, 0.14);
  transform: translateY(-1px);
}

.post-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

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

.post-card h2 a:hover {
  color: var(--primary-bright);
}

.post-card time {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.post-card p {
  margin: 0.5rem 0;
  color: var(--ink-muted);
}

.post-card a:last-child {
  font-size: 0.9rem;
  color: var(--primary-bright);
  text-decoration: none;
  font-weight: 500;
}

.empty-state {
  color: var(--ink-muted);
  font-style: italic;
  padding: 2rem 0;
}

/* --- Single Post --- */
.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.translation-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--primary-bright);
  text-decoration: none;
}

.post-content h2 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.3rem;
  font-family: var(--heading-font);
  font-weight: 400;
}

.post-content h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.1rem;
  font-family: var(--heading-font);
  font-weight: 400;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1rem 1.5rem;
}

.post-content blockquote {
  border-left: 3px solid var(--primary-bright);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--ink-muted);
}

.post-content code {
  background: var(--primary-light);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
}

.post-content pre {
  background: #f5f2fa;
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* --- Game CTA --- */
.game-cta {
  margin: 2rem 0;
  text-align: center;
}

.game-cta .cta-button {
  padding: 0.75rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

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

.post-nav a {
  color: var(--primary-bright);
  text-decoration: none;
}

.post-nav a:hover {
  color: var(--primary);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  margin-top: 3rem;
}

.footer-games {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.footer-games a {
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.footer-games a:hover {
  color: var(--primary-bright);
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .content > h1 {
    font-size: 1.6rem;
  }

  .post-header h1 {
    font-size: 1.4rem;
  }

  .footer-games {
    gap: 0.5rem;
  }
}
