/* Run 3 site theme */
:root {
  --r3-bg: #f1f5f9;
  --r3-surface: #ffffff;
  --r3-text: #0f172a;
  --r3-muted: #475569;
  --r3-border: #e2e8f0;
  --r3-accent: #0891b2;
  --r3-accent-hover: #0e7490;
  --r3-deep: #0c4a6e;
  --r3-game-frame: #020617;
  --r3-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --r3-radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.site-run3 {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--r3-bg);
  color: var(--r3-text);
  line-height: 1.6;
}

.site-run3 header.site-header {
  background: var(--r3-surface);
  border-bottom: 1px solid var(--r3-border);
  box-shadow: var(--r3-shadow);
}

.site-run3 .navbar-brand.brand-run3 {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--r3-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.site-run3 .navbar-brand.brand-run3 img {
  width: 150px;
  height: 80px;
  object-fit: contain;
  display: block;
}

.site-run3 .navbar-nav .nav-link {
  color: var(--r3-muted);
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.site-run3 .navbar-nav .nav-link:hover {
  color: var(--r3-deep);
}

.site-run3 .navbar-toggler {
  border: 1px solid var(--r3-border);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
}

.site-run3 .navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.25);
}

.site-run3 .nav-toggle-bars {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--r3-text);
  box-shadow: 0 6px 0 var(--r3-text), 0 -6px 0 var(--r3-text);
  margin: 10px 0;
}

.site-run3 .hero-lead {
  font-size: 1.05rem;
  color: var(--r3-muted);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.site-run3 .btn-play-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--r3-accent), var(--r3-accent-hover));
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-run3 .btn-play-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.45);
}

/* Game area: center iframe + optional left/right ad columns */
.site-run3 .game-play-section {
  width: 100%;
  padding: 0 clamp(8px, 2vw, 20px);
  margin: 0 auto;
}

.site-run3 .game-layout {
  display: grid;
  gap: clamp(8px, 1.5vw, 16px);
  width: 100%;
  max-width: min(1600px, 100%);
  margin: 0 auto;
  align-items: start;
  grid-template-columns: 1fr;
  grid-template-areas:
    "center"
    "adleft"
    "adright";
}

@media (min-width: 992px) {
  .site-run3 .game-layout {
    grid-template-columns: minmax(120px, min(200px, 18vw)) minmax(0, 1fr) minmax(120px, min(200px, 18vw));
    grid-template-areas: "adleft center adright";
    align-items: stretch;
  }
}

.site-run3 .game-center-col {
  grid-area: center;
  min-width: 0;
  width: 100%;
}

.site-run3 .game-ad-left {
  grid-area: adleft;
}

.site-run3 .game-ad-right {
  grid-area: adright;
}

.site-run3 .game-shell-inner {
  width: 100%;
  max-width: min(960px, 100%);
  margin: 0 auto;
}

.site-run3 .game-frame-wrap {
  position: relative; /* anchor for absolute iframe */
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(72vh, calc((100vw - 40px) * 9 / 16));
  background: var(--r3-game-frame);
  border-radius: var(--r3-radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

@supports not (aspect-ratio: 16 / 9) {
  .site-run3 .game-frame-wrap {
    height: 0;
    padding-bottom: 56.25%;
    aspect-ratio: auto;
    max-height: none;
  }
  .site-run3 .game-frame-wrap iframe {
    position: absolute;
    inset: 0;
  }
}

.site-run3 .game-frame-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Fullscreen: only the game frame — fills viewport */
.site-run3 .game-frame-wrap:fullscreen,
.site-run3 .game-frame-wrap:-webkit-full-screen {
  max-height: none;
  border-radius: 0;
  aspect-ratio: auto;
  height: 100%;
  width: 100%;
}

.site-run3 .game-frame-wrap:fullscreen iframe,
.site-run3 .game-frame-wrap:-webkit-full-screen iframe {
  height: 100%;
  width: 100%;
}

/* Side ad columns */
.site-run3 .game-ad-col {
  display: flex;
  justify-content: center;
}

@media (min-width: 992px) {
  .site-run3 .game-ad-col {
    position: sticky;
    top: 72px;
    align-self: start;
  }
}

.site-run3 .game-ad-slot {
  width: 100%;
  max-width: 300px;
  min-height: 250px;
  background: var(--r3-surface);
  border: 1px dashed var(--r3-border);
  border-radius: var(--r3-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (min-width: 992px) {
  .site-run3 .game-ad-slot {
    min-height: min(600px, 50vh);
    max-width: 100%;
  }
}

.site-run3 .game-ad-placeholder {
  color: var(--r3-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem;
  text-align: center;
}

.site-run3 .game-ad-slot ins,
.site-run3 .game-ad-slot iframe {
  max-width: 100%;
}

.site-run3 .content-prose {
  background: var(--r3-surface);
  border-radius: var(--r3-radius);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
  border: 1px solid var(--r3-border);
  box-shadow: var(--r3-shadow);
}

.site-run3 .content-prose h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--r3-text);
}

.site-run3 .content-prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--r3-deep);
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--r3-border);
}

.site-run3 .content-prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--r3-text);
}

.site-run3 .content-prose p,
.site-run3 .content-prose li {
  color: var(--r3-muted);
}

.site-run3 .content-prose ul,
.site-run3 .content-prose ol {
  padding-left: 1.25rem;
}

.site-run3 .content-prose li {
  margin-bottom: 0.5rem;
}

.site-run3 .skim-list li {
  position: relative;
  padding-left: 0.25rem;
}

.site-run3 .site-footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
  color: var(--r3-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--r3-border);
  background: var(--r3-surface);
}

.site-run3 .fixed-bottom-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--r3-deep);
  color: #fff;
  text-align: center;
  padding: 12px;
  z-index: 1000;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-run3 .fixed-bottom-btn button {
  background: #fff;
  color: var(--r3-deep);
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
  margin-left: 12px;
  cursor: pointer;
}

/* Inner pages */
.site-run3 .page-header {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  background: var(--r3-surface);
  border-bottom: 1px solid var(--r3-border);
}

.site-run3 .page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--r3-text);
  margin-bottom: 0.5rem;
}

.site-run3 .page-header p {
  color: var(--r3-muted);
  margin: 0;
}

.site-run3 .content-section {
  background: var(--r3-surface);
  padding: 2.5rem 0 4rem;
  margin-bottom: 0;
}

.site-run3 .content-section .container > header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.site-run3 .faq-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-run3 .faq-card {
  background: var(--r3-surface);
  border-radius: var(--r3-radius);
  border: 1px solid var(--r3-border);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--r3-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-run3 .faq-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.site-run3 .faq-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--r3-deep);
  margin-bottom: 0.5rem;
}

.site-run3 .faq-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  color: var(--r3-muted);
}

.site-run3 .comments-section {
  border-top: 1px solid var(--r3-border);
  margin-top: 1rem;
  background: var(--r3-surface);
}

.site-run3 .comment-card {
  background: #fafbfc;
}
