/* ── Posts list ──────────────────────────────────────────── */

.post-cards-section {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}

.post-card:first-child {
  border-top: 1px solid var(--border-color, #e0e0e0);
}

.post-card:hover {
  opacity: 0.75;
}

.post-card-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 75px;
  border-radius: 3px;
  overflow: hidden;
  background: #f0f0f0;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.post-card-body {
  flex: 1;
  min-width: 0;
}

.post-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.post-card-desc {
  font-size: 0.9rem;
  color: #888;
  margin: 0.3rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.colorscheme-dark .post-card {
  border-color: #444;
}

body.colorscheme-dark .post-card-thumb {
  background: #2a2a2a;
}

body.colorscheme-dark .post-card-thumb-placeholder {
  background: linear-gradient(135deg, #333 0%, #222 100%);
}

body.colorscheme-dark .post-card-desc {
  color: #888;
}

/* ── Games grid ──────────────────────────────────────────── */

.games-section {
  margin-top: 1.5rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.game-card {
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-cover-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f5f5f5;
}

.game-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.game-cover-link:hover .game-cover {
  opacity: 0.9;
}

.game-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.game-title {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
}

.game-title a {
  color: inherit;
  text-decoration: none;
}

.game-title a:hover {
  text-decoration: underline;
}

.game-desc {
  font-size: 0.9rem;
  margin: 0;
  color: #666;
  flex: 1;
}

/* ── Game tags ───────────────────────────────────────────── */

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.game-tag {
  font-size: 0.72rem;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.65;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

/* ── Game buttons ────────────────────────────────────────── */

.game-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.game-btn {
  font-size: 0.8rem;
  padding: 4px 12px;
  border: 1px solid currentColor;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.game-btn:hover {
  background: currentColor;
}

.game-btn:hover { color: #fff; }

/* ── Game single page ────────────────────────────────────── */

.game-page-header {
  margin-bottom: 1.5rem;
}

.game-page-header h1 {
  margin-bottom: 0.4rem;
}

.game-page-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.game-status {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.status-released  { background: #e6f4ea; color: #2d7a44; }
.status-in-progress { background: #fff3cd; color: #856404; }
.status-jam       { background: #e8eaf6; color: #3949ab; }

.game-page-cover {
  width: 100%;
  max-width: 800px;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  display: block;
}

/* ── YouTube video embed (game single page) ──────────────── */

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 800px;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Unity embed ─────────────────────────────────────────── */

.unity-embed-wrapper {
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 4px;
  overflow: hidden;
}

/* ── Lightbox ────────────────────────────────────────────── */

.lightbox-trigger img {
  cursor: zoom-in;
  display: block;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay:target {
  display: flex;
}

.lightbox-overlay img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  cursor: zoom-out;
}

/* ── Dark theme overrides ────────────────────────────────── */

body.colorscheme-dark .game-card,
body.colorscheme-dark .unity-embed-wrapper {
  border-color: #444;
}

body.colorscheme-dark .game-desc {
  color: #aaa;
}

body.colorscheme-dark .status-released  { background: #1a3a22; color: #6fcf97; }
body.colorscheme-dark .status-in-progress { background: #3a3010; color: #f2c94c; }
body.colorscheme-dark .status-jam       { background: #1a1f4a; color: #a5b4fc; }
