:root {
  --bg: #0a1512;
  --bg-soft: #0f1f19;
  --panel: #122a21;
  --line: #234533;
  --text: #e8f3ea;
  --muted: #9fb8a6;
  --firefly: #ffd865;
  --coral: #ff6b57;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

body { -webkit-font-smoothing: antialiased; }

a { color: var(--firefly); }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}
.brand::before { content: "\2726 "; color: var(--firefly); }

.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.site-nav a:hover { color: var(--firefly); }

/* ---------- stage ---------- */
.stage-section { max-width: 1060px; margin: 0 auto; padding: 4px 20px 10px; }

.game-h1 {
  margin: 6px 0 14px;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.game-h1::after { content: " \2014 Hide & Seek"; font-size: 0.45em; color: var(--muted); font-weight: 600; letter-spacing: 0.08em; }

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cover { position: absolute; inset: 0; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,21,18,0.25) 0%, rgba(10,21,18,0.75) 100%);
}
.cover-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 16px;
}
.cover-tag {
  margin: 0; color: var(--firefly);
  font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}
.cover-hint { margin: 0; color: var(--muted); font-size: 14px; }

.play-btn {
  font-size: 20px; font-weight: 800; letter-spacing: 0.04em;
  color: #0a1512; background: var(--firefly);
  border: none; border-radius: 999px;
  padding: 14px 44px; cursor: pointer;
  box-shadow: 0 0 32px rgba(255, 216, 101, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.play-btn:hover { transform: scale(1.04); box-shadow: 0 0 44px rgba(255, 216, 101, 0.65); }

/* loader */
.loader {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 15px;
}
.stage[data-gf-state="loading"] .loader { display: flex; }
.stage[data-gf-state="loading"] .cover { display: none; }

.loader-firefly {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--firefly);
  box-shadow: 0 0 24px 8px rgba(255, 216, 101, 0.55);
  animation: drift 1.6s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate(0, 0) scale(0.8); opacity: 0.5; }
  50% { transform: translate(18px, -14px) scale(1.15); opacity: 1; }
  100% { transform: translate(-14px, 10px) scale(0.9); opacity: 0.65; }
}

/* action chips */
.stage-actions {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; flex-wrap: wrap;
}
.chip {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.chip:hover { border-color: var(--firefly); color: var(--firefly); }
.chip[aria-pressed="true"], .chip[data-gf-liked] {
  background: var(--firefly); color: #0a1512; border-color: var(--firefly);
}
.share-msg { color: var(--muted); font-size: 14px; }

/* ---------- content blocks ---------- */
.block {
  max-width: 800px;
  margin: 0 auto;
  padding: 26px 20px 8px;
}
.block h2 { font-size: 26px; margin: 0 0 12px; color: var(--text); }
.block h3 { font-size: 18px; margin: 0 0 6px; }
.block p { color: var(--muted); margin: 0 0 14px; }
.block p strong, .block li strong { color: var(--text); }
.block ul { padding-left: 20px; color: var(--muted); margin: 0 0 14px; }
.block li { margin-bottom: 10px; }

/* howto steps */
.howto { list-style: none; padding: 0; }
.howto li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.howto-num {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--firefly); color: #0a1512;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.howto p { margin: 0; }

/* controls table */
.ctrl-table-wrap { margin: 4px 0 10px; }
.ctrl-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}
.ctrl-table th, .ctrl-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  color: var(--muted);
}
.ctrl-table th {
  color: var(--text);
  font-weight: 700;
  background: var(--bg-soft);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.ctrl-table tr:last-child td { border-bottom: none; }
.ctrl-more { font-size: 14px; }

/* faq */
.qa { border-bottom: 1px solid var(--line); padding: 6px 0 14px; margin-bottom: 12px; }
.qa:last-child { border-bottom: none; }

/* game cards (similar games) */
.game-cards { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 12px; }
.game-cards li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.game-cards .fit {
  flex-shrink: 0;
  font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--firefly);
  border: 1px solid var(--firefly);
  border-radius: 999px; padding: 3px 10px;
  margin-top: 2px; white-space: nowrap;
}
.game-cards p { margin: 4px 0 0; }
.game-cards h3 { margin: 0; }
.game-cards h3 a { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--firefly); }
.game-cards h3 a:hover { color: var(--firefly); }
.game-cards .ext { color: var(--muted); font-weight: 400; font-size: 13px; }

/* troubleshooting */
.trouble-step {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
}
.trouble-step h3 { margin: 0 0 6px; }

/* ---------- comments ---------- */
.comments-block { padding-bottom: 40px; }
.comments-invite { color: var(--muted); }
.comment-form-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.comment-form { display: flex; flex-direction: column; gap: 10px; }
.comment-form input, .comment-form textarea {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 15px; font-family: inherit;
  resize: vertical;
}
.comment-form input:focus, .comment-form textarea:focus { outline: 1px solid var(--firefly); border-color: var(--firefly); }
.comment-form button {
  align-self: flex-start;
  background: var(--firefly); color: #0a1512;
  border: none; border-radius: 999px;
  padding: 9px 22px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.comment-msg { font-size: 14px; color: var(--muted); }

.comments { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.comments[data-gf-empty]::before {
  content: "No comments yet \2014 be the first to share your best run.";
  color: var(--muted); font-size: 15px;
}
.comment {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-name { font-weight: 700; color: var(--text); }
.comment-time { color: var(--muted); font-size: 13px; }
.comment-to { color: var(--firefly); font-size: 13px; }
.comment-owner-tag {
  display: none; background: var(--firefly); color: #0a1512;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  border-radius: 6px; padding: 2px 8px; text-transform: uppercase;
}
.comment[data-gf-owner] .comment-owner-tag { display: inline-block; }
.comment[data-gf-owner] { border-color: var(--firefly); }
.comment-text { margin: 8px 0 6px; color: var(--muted); white-space: pre-wrap; }
.comment-foot { display: flex; }
.comment-reply-btn {
  background: none; border: none; color: var(--firefly);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 0;
}
.comment-form[data-gf-replying] { border: 1px dashed var(--firefly); }
.comment-form [data-gf-reply-to] { color: var(--firefly); font-size: 13px; }
.replies { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; padding-left: 16px; border-left: 2px solid var(--line); }
.comment.reply { padding: 10px 12px; }
.comment-count-line { color: var(--muted); font-size: 14px; }

/* ---------- simple page ---------- */
.page-wrap { max-width: 800px; margin: 0 auto; padding: 10px 20px 50px; }
.page-wrap h1 { font-size: clamp(28px, 4.5vw, 38px); margin: 10px 0 18px; }
.page-wrap h2 { font-size: 22px; margin: 22px 0 10px; }
.page-wrap h3 { font-size: 18px; margin: 16px 0 8px; color: var(--text); }
.page-wrap p, .page-wrap li { color: var(--muted); }
.page-wrap strong { color: var(--text); }
.page-wrap table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 15px; }
.page-wrap th, .page-wrap td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; color: var(--muted); }
.page-wrap th { background: var(--bg-soft); color: var(--text); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  margin-top: 30px;
  padding: 30px 20px 24px;
}
.footer-brand { max-width: 1060px; margin: 0 auto 14px; }
.footer-logo { font-size: 20px; font-weight: 800; letter-spacing: 0.06em; }
.footer-logo::before { content: "\2726 "; color: var(--firefly); }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 560px; margin: 8px 0 0; }
.footer-links {
  max-width: 1060px; margin: 0 auto;
  display: flex; gap: 18px; flex-wrap: wrap;
}
.footer-links a { color: var(--muted); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--firefly); }
.footer-copy { max-width: 1060px; margin: 16px auto 0; color: var(--muted); font-size: 13px; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .site-header { padding: 12px 16px; }
  .site-nav { gap: 12px; }
  .stage-section { padding: 4px 16px 10px; }
  .block, .page-wrap { padding-left: 16px; padding-right: 16px; }
  .play-btn { font-size: 17px; padding: 12px 34px; }
  .howto li, .game-cards li { flex-direction: column; }
  .game-cards .fit { align-self: flex-start; }
}
