/* ===== Supermario-Bros.com – public site ===== */
:root {
  --red: #e52521;
  --red-dark: #a3150f;
  --yellow: #fbd000;
  --yellow-dark: #c99a00;
  --green: #43b047;
  --green-dark: #2a7c2d;
  --blue: #049cd8;
  --sky-top: #3f6fe0;
  --sky-bottom: #9fd3ff;
  --navy: #14224a;
  --ink: #1d2433;
  --muted: #5b6478;
  --card: #ffffff;
  --line: #e3e8f2;
  --radius: 16px;
  --shadow: 0 6px 0 rgba(20, 34, 74, .18), 0 18px 40px rgba(20, 34, 74, .18);
  --pixel: 'Press Start 2P', monospace;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0, var(--sky-bottom) 900px, #cfe9ff 1600px, #e9f5ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-bottom: 40px; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(880px, 100% - 32px); }
.center { text-align: center; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--red);
  border-bottom: 6px solid var(--red-dark);
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
}
.site-header::after {
  content: ""; display: block; height: 10px;
  background:
    linear-gradient(90deg, transparent 31px, rgba(0,0,0,.35) 31px 33px, transparent 33px) 0 0/64px 10px,
    #c84c0c;
  border-bottom: 2px solid #5c1e00;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.logo { text-decoration: none; display: inline-flex; align-items: center; }
.logo img { max-height: 52px; width: auto; }
.logo-text {
  font-family: var(--pixel);
  font-size: clamp(13px, 2.1vw, 20px);
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 #000;
  white-space: nowrap;
}
.logo-small .logo-text { font-size: 14px; }
.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  font-family: var(--pixel);
  font-size: 11px;
  color: #fff;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 10px;
  text-shadow: 2px 2px 0 rgba(0,0,0,.45);
  transition: background .15s, transform .15s;
}
.main-nav a:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); color: #fff; }
.main-nav a.active { background: var(--yellow); color: var(--ink); text-shadow: none; box-shadow: 0 4px 0 var(--yellow-dark); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; width: 26px; height: 3px; background: #fff; margin: 5px 0; border-radius: 2px; }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--red-dark); flex-direction: column; padding: 10px 16px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; text-align: center; color: #fff; }
.hero h1, .page-hero h1 {
  font-family: var(--pixel);
  font-size: clamp(20px, 4vw, 40px);
  line-height: 1.4;
  margin: 0 0 18px;
  color: var(--yellow);
  text-shadow: 4px 4px 0 var(--red-dark), 7px 7px 0 rgba(0,0,0,.35);
}
.hero-sub { font-size: clamp(17px, 2vw, 21px); font-weight: 700; max-width: 720px; margin: 0 auto 14px; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.hero-rating { display: inline-flex; gap: 8px; align-items: center; background: rgba(0,0,0,.25); color: #fff; padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.hero-rating:hover { color: var(--yellow); }
.page-hero { padding: 48px 0 28px; text-align: center; color: #fff; }
.page-hero p { font-size: 19px; font-weight: 700; margin: 0; text-shadow: 0 2px 6px rgba(0,0,0,.3); }

.clouds span {
  position: absolute; width: 140px; height: 44px; background: #fff; border-radius: 40px; opacity: .9;
  animation: drift 60s linear infinite;
}
.clouds span::before, .clouds span::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.clouds span::before { width: 64px; height: 64px; left: 22px; top: -30px; }
.clouds span::after { width: 48px; height: 48px; left: 72px; top: -20px; }
.clouds span:nth-child(1) { top: 40px; left: -160px; }
.clouds span:nth-child(2) { top: 110px; left: -160px; transform: scale(.7); animation-duration: 80s; animation-delay: -30s; }
.clouds span:nth-child(3) { top: 20px; left: -160px; transform: scale(.55); animation-duration: 95s; animation-delay: -60s; }
@keyframes drift { to { left: 110%; } }
@media (prefers-reduced-motion: reduce) { .clouds span { animation: none; display: none; } }

/* ---------- Cards & prose ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 36px);
  margin: 0 0 28px;
  border: 3px solid var(--navy);
}
.prose h2 {
  font-family: var(--pixel); font-size: clamp(14px, 1.8vw, 18px); line-height: 1.6;
  color: var(--red); margin: 1.8em 0 .7em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 20px; margin: 1.4em 0 .4em; color: var(--navy); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: 16px; }
.prose th, .prose td { border: 2px solid var(--line); padding: 10px 14px; text-align: left; }
.prose th { background: var(--navy); color: #fff; }
.prose tr:nth-child(even) td { background: #f5f8ff; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose blockquote { border-left: 6px solid var(--yellow); margin: 1em 0; padding: 6px 18px; background: #fffbe6; border-radius: 0 10px 10px 0; }
.prose img { border-radius: 12px; }
kbd {
  display: inline-block; min-width: 1.9em; padding: 1px 7px; text-align: center;
  font: 700 14px/1.6 'Segoe UI Symbol', 'Segoe UI', Arial, 'Noto Sans Symbols 2', sans-serif; background: #fff; border: 2px solid var(--navy); border-radius: 7px;
  box-shadow: 0 3px 0 var(--navy);
}
.pixel-title { font-family: var(--pixel); font-size: clamp(14px, 1.8vw, 18px); color: var(--navy); margin: 0 0 18px; line-height: 1.5; }
.section { margin: 40px 0; }
.section .pixel-title, .section-head .pixel-title { color: #fff; text-shadow: 3px 3px 0 var(--navy); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.section-head .pixel-title { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 800 16px var(--body); color: var(--ink); text-decoration: none; cursor: pointer;
  background: #fff; border: 3px solid var(--navy); border-radius: 12px;
  padding: 10px 20px; box-shadow: 0 5px 0 var(--navy);
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--navy); color: var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--navy); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { color: #fff; background: #f23a2f; }
.btn-small { padding: 6px 14px; font-size: 14px; }

/* ---------- Game ---------- */
.game-card {
  margin: 0 auto 28px;
  background: var(--navy);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 10px 0 #0b1530, 0 30px 60px rgba(0,0,0,.35);
  border: 4px solid #0b1530;
}
.game-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #5c94fc url('../img/game-poster.png') center/cover no-repeat;
  image-rendering: pixelated;
  border-radius: 12px;
  overflow: hidden;
}
.game-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.game-start {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at center, rgba(20,34,74,.35), rgba(20,34,74,.8));
  color: #fff;
}
.play-icon {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  font-size: 40px; background: var(--red); border: 5px solid #fff;
  box-shadow: 0 6px 0 var(--red-dark), 0 0 0 10px rgba(255,255,255,.15);
  transition: transform .15s; padding-left: 8px;
}
.game-start:hover .play-icon { transform: scale(1.08); }
.play-text { font-family: var(--pixel); font-size: clamp(14px, 2.4vw, 22px); text-shadow: 3px 3px 0 #000; }
.play-hint { font-weight: 700; opacity: .9; }
.game-bar { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 12px 4px 2px; }
.game-btn {
  font: 400 11px var(--pixel); color: #fff; background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.3); border-radius: 10px; padding: 10px 16px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.game-btn:hover { background: rgba(255,255,255,.18); border-color: var(--yellow); }
.game-frame:fullscreen { border-radius: 0; aspect-ratio: auto; }
/* Phones held upright: a taller frame so the touch buttons sit below the game, not on top of it. */
@media (pointer: coarse) and (orientation: portrait) and (max-width: 820px) {
  .game-frame { aspect-ratio: 3 / 4; background-color: #10142a; background-size: contain; background-position: center top; }
  .game-frame:fullscreen { aspect-ratio: auto; }
  .play-hint { display: none; }
}

/* ---------- How to play ---------- */
.howto { background: #fffbe6; border-color: var(--yellow-dark); }
.howto .pixel-title { color: var(--red); }
.howto-body p:last-child { margin-bottom: 0; }

/* ---------- Posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; margin-bottom: 28px; }
.post-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 3px solid var(--navy);
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s;
}
.post-card:hover { transform: translateY(-4px); }
.post-card-img { display: block; aspect-ratio: 16/10; background: var(--sky-top); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 72%; image-rendering: pixelated; transition: transform .3s; }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-placeholder { display: grid; place-items: center; height: 100%; font: 48px var(--pixel); color: var(--yellow); }
.post-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card-body time { font-size: 14px; color: var(--muted); font-weight: 700; }
.post-card-body h3 { font-size: 20px; line-height: 1.35; margin: 6px 0 10px; }
.post-card-body h3 a { color: var(--ink); text-decoration: none; }
.post-card-body h3 a:hover { color: var(--red); }
.post-card-body p { margin: 0 0 14px; color: var(--muted); font-size: 16px; flex: 1; }
.read-more { font-weight: 800; text-decoration: none; }

.breadcrumbs { color: #fff; font-weight: 700; margin: 24px 0 14px; font-size: 15px; }
.breadcrumbs a { color: #fff; }
.post { margin-top: 0; }
.post-header h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.25; margin: 0 0 8px; color: var(--navy); }
.post-meta { color: var(--muted); font-weight: 700; margin: 0 0 20px; }
.post-image { width: 100%; border-radius: 14px; margin-bottom: 20px; image-rendering: pixelated; max-height: 440px; object-fit: cover; }
.share { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 28px; padding-top: 18px; border-top: 2px dashed var(--line); font-weight: 800; }
.share a { background: #eef4ff; padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(120deg, #fffbe6, #fff); flex-wrap: wrap; }
.cta h2 { font-family: var(--pixel); font-size: 16px; color: var(--red); margin: 0 0 6px; }
.cta p { margin: 0; }

/* ---------- Gallery ---------- */
.gallery-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.gallery-thumb { background: #fff; border: 3px solid var(--navy); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); text-align: center; box-shadow: 0 4px 0 var(--navy); transition: transform .15s; }
.gallery-thumb:hover { transform: translateY(-3px) rotate(-1deg); color: var(--red); }
.gallery-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; image-rendering: pixelated; }
.gallery-thumb span { display: block; padding: 6px; font-weight: 800; font-size: 14px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }
.chip { font: 800 15px var(--body); padding: 8px 18px; border-radius: 999px; border: 3px solid var(--navy); background: #fff; cursor: pointer; box-shadow: 0 3px 0 var(--navy); }
.chip.active, .chip:hover { background: var(--yellow); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.gallery-item { margin: 0; background: #fff; border: 3px solid var(--navy); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.gallery-item:hover { transform: translateY(-4px); }
.gallery-item[hidden] { display: none; }
.gallery-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-open img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; image-rendering: pixelated; }
.gallery-item figcaption { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.gallery-item figcaption strong { font-size: 18px; }
.gallery-item figcaption span:last-child { color: var(--muted); font-size: 15px; line-height: 1.5; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; background: var(--green); color: #fff; padding: 2px 10px; border-radius: 999px; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,16,36,.88); display: grid; place-items: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(640px, 100%); background: #fff; border-radius: var(--radius); overflow: hidden; border: 4px solid var(--navy); }
.lightbox img { display: block; width: 100%; image-rendering: pixelated; }
.lightbox figcaption { padding: 14px 20px 20px; display: flex; flex-direction: column; }
.lightbox figcaption strong { font-size: 20px; }
.lightbox-close { position: absolute; top: 14px; right: 18px; font-size: 40px; line-height: 1; background: none; border: 0; color: #fff; cursor: pointer; }

/* ---------- Comments ---------- */
.comments-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.comments-head h2 { font-family: var(--pixel); font-size: clamp(14px, 1.8vw, 18px); color: var(--navy); margin: 0; line-height: 1.6; }
.count-badge { display: inline-block; background: var(--red); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 11px; vertical-align: middle; }
.rating-summary { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.stars { color: #f5b301; letter-spacing: 1px; font-size: 18px; }
.stars-off { color: #d5dae4; }
.comment-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start;
  background: #eeeeee; border-radius: 10px; padding: 14px;
}
.comment-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .comment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .comment-grid { grid-template-columns: 1fr; padding: 10px; } }
.comment {
  background: #fff; border-radius: 6px; padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08); min-width: 0;
}
.comment header { margin: 0 0 4px; line-height: 1.5; font-size: 15px; color: #222; }
.comment-name { font-weight: 800; }
.comment time { font-size: 15px; color: #222; }
.comment .sep { color: #555; margin: 0 2px; }
.comment p { margin: 4px 0 0; font-size: 15px; line-height: 1.7; color: #222; overflow-wrap: anywhere; }
.comment .stars { font-size: 13px; display: block; margin: 2px 0 0; }
.comment-form, .contact-form { margin-top: 26px; padding-top: 22px; border-top: 3px dashed var(--line); }
.comment-form h3 { font-family: var(--pixel); font-size: 14px; color: var(--red); margin: 0 0 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-end { align-items: end; grid-template-columns: 1fr auto; }
@media (max-width: 640px) { .form-row, .form-row-end { grid-template-columns: 1fr; } }
.field { display: block; font-weight: 800; margin: 0 0 14px; border: 0; padding: 0; }
.field input, .field textarea, .field select { display: block; margin-top: 6px; }
.field legend { font-weight: 800; padding: 0; margin-bottom: 4px; }
.field input, .field textarea, .field select {
  font: 16px var(--body); padding: 11px 14px; border: 2px solid #c8d1e2; border-radius: 10px; background: #fff; width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px rgba(4,156,216,.15); }
.hint { font-weight: 600; color: var(--muted); font-size: 14px; }
.req { color: var(--red); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.star-picker { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-picker label { font-size: 32px; color: #d5dae4; cursor: pointer; transition: color .1s, transform .1s; line-height: 1; }
.star-picker label:hover, .star-picker label:hover ~ label, .star-picker input:checked ~ label { color: #f5b301; }
.star-picker input:focus-visible + label { outline: 3px solid var(--yellow); }
.captcha-math { margin-bottom: 0; }
.notice { padding: 12px 16px; border-radius: 12px; font-weight: 700; margin: 0 0 18px; }
.notice-success { background: #e7f8e8; color: #1d6b20; border: 2px solid #9fd8a1; }
.notice-error { background: #fde8e7; color: #9b1b16; border: 2px solid #f4a8a4; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 24px 0; }
.pagination a, .pagination span {
  min-width: 42px; padding: 8px 12px; text-align: center; border-radius: 10px; font-weight: 800; text-decoration: none;
  background: #fff; border: 2px solid var(--navy); color: var(--ink);
}
.pagination .current { background: var(--yellow); }
.pagination .dots { border: 0; background: none; color: #fff; }
.pagination a:hover { background: var(--red); color: #fff; }

/* ---------- Ads ---------- */
.ad-slot { text-align: center; margin: 20px auto; max-width: 100%; overflow: hidden; }
.ad-label { display: block; font: 9px var(--pixel); color: rgba(255,255,255,.85); letter-spacing: 2px; margin-bottom: 6px; text-shadow: 1px 1px 0 rgba(0,0,0,.4); }
.card .ad-label { color: var(--muted); text-shadow: none; }

/* ---------- Footer ---------- */
.disclaimer-note { text-align: center; color: var(--navy); font-size: 14px; max-width: 820px; margin: 10px auto 0; opacity: .85; }
.site-footer { background: var(--navy); color: #cdd6ee; margin-top: 30px; }
.footer-bricks {
  height: 48px;
  background:
    linear-gradient(#00000055 2px, transparent 2px) 0 0/48px 24px,
    linear-gradient(90deg, #00000055 2px, transparent 2px) 0 0/48px 24px,
    linear-gradient(90deg, #00000055 2px, transparent 2px) 24px 24px/48px 24px,
    #c84c0c;
  border-top: 4px solid #43b047;
  box-shadow: inset 0 4px 0 #2a7c2d;
}
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 36px; padding: 40px 0 30px; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; gap: 24px; } }
.footer-col h2 { font-family: var(--pixel); font-size: 12px; color: var(--yellow); margin: 0 0 14px; }
.footer-col p { margin: 12px 0 0; font-size: 15px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a, .socials a { color: #fff; text-decoration: none; font-weight: 700; }
.footer-links a:hover, .socials a:hover { color: var(--yellow); }
.socials { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.footer-disclaimer p { font-size: 14px; line-height: 1.6; }
.footer-bottom { background: #0b1530; padding: 16px 0; font-size: 14px; text-align: center; }

.img-404 { image-rendering: pixelated; border-radius: 16px; }
