*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold:   #ffd700;
  --gold-dim: #e6c200;
  --red:    #ff3333;
  --red-soft: #ff6b6b;
  --white:  #ffffff;
  --dim:    #aaaaaa;
  --bg:     #0a0a0f;
  --card:   #12121a;
  --border: #2a2a3a;
  --glow:   rgba(255,215,0,0.25);
  --glass:  rgba(255,255,255,0.03);
  --glass-border: rgba(255,255,255,0.08);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--white);
  font-family: 'Press Start 2P', monospace;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse 120% 80% at 15% 20%, rgba(255,80,80,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 85% 80%, rgba(100,80,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(255,215,0,0.03) 0%, transparent 60%),
    var(--bg);
}

/* ── PAGE LAYOUT ── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 16px;
  gap: 18px;
}

/* ── HEADER ── */
.site-header {
  text-align: center;
  user-select: none;
}

.header-skull {
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1;
  filter: drop-shadow(0 0 12px var(--red));
  animation: skullPulse 2.5s ease-in-out infinite;
}

@keyframes skullPulse {
  0%,100% { filter: drop-shadow(0 0 10px var(--red)); }
  50%      { filter: drop-shadow(0 0 24px var(--red)) drop-shadow(0 0 40px rgba(255,0,0,0.4)); }
}

.site-title {
  font-size: clamp(10px, 2.8vw, 20px);
  color: var(--gold);
  letter-spacing: 4px;
  text-shadow: 0 0 18px rgba(255,215,0,0.5);
  margin: 10px 0 6px;
  line-height: 1.4;
}

.site-sub {
  font-size: clamp(6px, 1.5vw, 9px);
  color: var(--dim);
  letter-spacing: 2px;
  line-height: 1.4;
}

/* ── GAME WRAP ── */
.game-section {
  display: flex;
  justify-content: center;
  width: 100%;
}

.game-wrap {
  position: relative;
  width: min(500px, 96vw, 80vh);
  aspect-ratio: 1 / 1;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255,215,0,0.12),
    0 0 40px rgba(255,215,0,0.1),
    0 0 100px rgba(255,80,80,0.06),
    inset 0 0 80px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.04);
  background: linear-gradient(180deg, #0d0d12 0%, #050508 100%);
  overflow: hidden;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ── MOBILE OVERLAY ── */
.mobile-overlay {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 14px 14px;
}

/* Show on touch devices */
@media (hover: none) and (pointer: coarse) {
  .mobile-overlay { display: flex; }
}

/* D-PAD */
.dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: all;
}

.dpad-mid {
  display: flex;
  align-items: center;
  gap: 2px;
}

.dpad-center {
  width: 34px;
  height: 34px;
}

.dpad-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}

.dpad-btn:active {
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.12) 100%);
  transform: scale(0.94);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ACTION BUTTONS */
.action-cluster {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: all;
  align-items: center;
}

.act-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  border: 2px solid;
  transition: background 0.08s, transform 0.08s;
}

.btn-z {
  background: linear-gradient(180deg, rgba(255,215,0,0.28) 0%, rgba(255,180,0,0.12) 100%);
  border-color: rgba(255,215,0,0.6);
  color: var(--gold);
  box-shadow: 0 0 20px rgba(255,215,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-x {
  background: linear-gradient(180deg, rgba(220,220,220,0.18) 0%, rgba(180,180,180,0.08) 100%);
  border-color: rgba(200,200,200,0.45);
  color: #ccc;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}

.act-btn:active {
  transform: scale(0.94);
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.btn-z:active { background: linear-gradient(180deg, rgba(255,215,0,0.35) 0%, rgba(255,180,0,0.18) 100%); }
.btn-x:active { background: linear-gradient(180deg, rgba(220,220,220,0.25) 0%, rgba(180,180,180,0.12) 100%); }

/* ── FOOTER CONTROLS (keyboard hints – user-friendly, visible) ── */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 24px;
  font-size: clamp(6px, 1.4vw, 8px);
  color: #999;
  letter-spacing: 1px;
  user-select: none;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(255,215,0,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
  max-width: min(500px, 96vw);
  margin: 0 auto;
}
.controls-bar span {
  padding: 4px 10px;
  background: rgba(0,0,0,0.35);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}

/* Hide footer on touch devices */
@media (hover: none) and (pointer: coarse) {
  .controls-bar { display: none; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* ════════════════════════════════════════
   GLOBAL NAVIGATION
   ════════════════════════════════════════ */
.site-nav {
  width: 100%;
  background: rgba(10,10,18,0.85);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-brand {
  color: var(--gold);
  text-decoration: none;
  font-size: clamp(6px, 1.4vw, 9px);
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255,215,0,0.4);
  transition: text-shadow 0.2s;
}
.nav-brand:hover { text-shadow: 0 0 20px rgba(255,215,0,0.8); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  align-items: center;
}
.nav-links a {
  color: #e9e9e9;
  text-decoration: none;
  font-size: clamp(5px, 1.1vw, 7px);
  letter-spacing: 1px;
  line-height: 1.4;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── FAN BADGE ── */
.fan-badge {
  font-size: clamp(4px, 1vw, 6px);
  color: #444;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ════════════════════════════════════════
   HOME PAGE – Bad Time Simulator content block (bts)
   ════════════════════════════════════════ */
.bts-block {
  max-width: 700px;
  width: 100%;
  padding: 28px 20px 10px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.bts-block h2 {
  font-size: clamp(8px, 2vw, 13px);
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 2px;
  line-height: 1.4;
}
.bts-block p {
  font-family: Georgia, serif;
  font-size: clamp(11px, 1.8vw, 14px);
  color: #aaa;
  line-height: 1.5;
  margin-bottom: 18px;
}
.bts-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.bts-feat {
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.bts-feat strong {
  display: block;
  font-size: 6px;
  color: var(--gold);
  letter-spacing: 1px;
  line-height: 1.4;
  margin-bottom: 6px;
}
.bts-feat span {
  font-family: Georgia, serif;
  font-size: 11px;
  color: #777;
  line-height: 1.5;
}

/* Homepage FAQ (SEO block) */
.bts-faq {
  margin: 24px 0 20px;
  text-align: left;
}
.bts-faq .faq-item {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.bts-faq .faq-q {
  font-size: clamp(6px, 1.3vw, 8px);
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: normal;
}
.bts-faq .faq-a {
  font-family: Georgia, serif;
  font-size: clamp(10px, 1.5vw, 12px);
  color: #999;
  line-height: 1.5;
  margin: 0;
}

.disclaimer-text {
  font-size: 10px !important;
  color: #555 !important;
  border: 1px solid #222;
  border-radius: 4px;
  padding: 12px 14px;
  text-align: left;
  line-height: 1.5 !important;
}
.bts-cta {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.cta-link {
  font-size: 7px;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid rgba(255,215,0,0.4);
  padding: 8px 14px;
  border-radius: 8px;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  background: linear-gradient(180deg, rgba(255,215,0,0.06) 0%, transparent 100%);
  box-shadow: 0 0 16px rgba(255,215,0,0.08);
}
.cta-link:hover {
  background: linear-gradient(180deg, rgba(255,215,0,0.14) 0%, rgba(255,215,0,0.04) 100%);
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(255,215,0,0.18);
}

/* ════════════════════════════════════════
   GLOBAL SITE FOOTER BAR
   ════════════════════════════════════════ */
.site-footer-bar {
  width: 100%;
  background: linear-gradient(180deg, rgba(8,8,14,0.95) 0%, rgba(5,5,10,0.98) 100%);
  border-top: 1px solid var(--glass-border);
  padding: 18px 16px;
  margin-top: auto;
  box-shadow: 0 -1px 0 rgba(255,255,255,0.03);
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-summary-heading {
  width: 100%;
  font-size: clamp(6px, 1.2vw, 8px);
  color: var(--gold);
  letter-spacing: 2px;
  line-height: 1.4;
  margin-bottom: 6px;
  font-weight: normal;
}
.footer-summary {
  width: 100%;
  font-family: Georgia, serif;
  font-size: clamp(10px, 1.4vw, 12px);
  color: #afafaf;
  line-height: 1.5;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.footer-inner span,
.footer-inner a {
  font-size: clamp(4px, 1vw, 6px);
  color: #fff5f5;
  letter-spacing: 1px;
  line-height: 1.5;
  text-decoration: none;
}
.footer-inner a:hover { color: var(--gold); }
.footer-inner nav { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-disc { color: #333 !important; font-style: italic; }

/* ════════════════════════════════════════
   INNER PAGES (article / about / privacy)
   ════════════════════════════════════════ */
body.inner-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Breadcrumb */
.breadcrumb {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 18px 0;
  font-size: 6px;
  color: #444;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: #666; text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: #333; }

/* Article wrapper */
.article-wrap {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

/* Article typography */
.article-wrap h1 {
  font-size: clamp(11px, 2.5vw, 18px);
  color: var(--gold);
  letter-spacing: 2px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.article-meta {
  font-size: 6px;
  color: #555;
  letter-spacing: 1px;
  margin-bottom: 28px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  line-height: 1.5;
}
.article-wrap h2 {
  font-size: clamp(8px, 1.8vw, 12px);
  color: #e0e0e0;
  letter-spacing: 1px;
  line-height: 1.4;
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.article-wrap h3 {
  font-size: clamp(7px, 1.4vw, 10px);
  color: var(--gold);
  letter-spacing: 1px;
  line-height: 1.4;
  margin: 22px 0 8px;
}
.article-wrap p,
.article-wrap li {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(13px, 1.9vw, 15px);
  color: #999;
  line-height: 1.5;
  margin-bottom: 14px;
}
.article-wrap ul,
.article-wrap ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.article-wrap li { margin-bottom: 6px; }
.article-wrap strong { color: #ccc; }
.article-wrap em { color: var(--gold); font-style: normal; }
.article-wrap a { color: var(--gold); }
.article-wrap a:hover { text-decoration: underline; }

/* Tip / note box */
.tip-box {
  background: rgba(255,215,0,0.05);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  padding: 14px 18px;
  margin: 18px 0;
}
.tip-box p { margin: 0; font-size: 13px !important; color: #bbb !important; line-height: 1.5; }

/* Warning box */
.warn-box {
  background: rgba(255,50,50,0.05);
  border-left: 3px solid var(--red);
  border-radius: 0 4px 4px 0;
  padding: 14px 18px;
  margin: 18px 0;
}
.warn-box p { margin: 0; font-size: 13px !important; color: #aaa !important; line-height: 1.5; }

/* Attack card grid */
.attack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 18px 0 26px;
}
.attack-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 16px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.attack-card h4 {
  font-size: 7px;
  color: var(--gold);
  letter-spacing: 1px;
  line-height: 1.4;
  margin-bottom: 8px;
}
.attack-card p {
  font-size: 12px !important;
  margin: 0 !important;
  color: #777 !important;
  line-height: 1.5;
}

/* FAQ */
.faq-item { margin-bottom: 22px; }
.faq-item h3 { color: #ddd !important; }

/* Key badge */
.key {
  display: inline-block;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  font-family: monospace;
  color: #ccc;
}

/* Privacy sections */
.policy-section { margin-bottom: 32px; }
.policy-section h2 { margin-top: 0; }

/* Hero banner for inner pages */
.inner-hero {
  text-align: center;
  padding: 28px 16px 0;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.inner-hero .skull-sm { font-size: 28px; opacity: 0.5; }
.inner-hero h1 { margin-top: 8px; }

/* Play CTA button */
.play-cta {
  display: inline-block;
  margin-top: 30px;
  padding: 14px 28px;
  background: linear-gradient(180deg, rgba(255,215,0,0.18) 0%, rgba(255,180,0,0.08) 100%);
  border: 1px solid rgba(255,215,0,0.55);
  color: var(--gold);
  text-decoration: none;
  font-size: 8px;
  letter-spacing: 2px;
  border-radius: 10px;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: 0 0 24px rgba(255,215,0,0.12), inset 0 1px 0 rgba(255,255,255,0.15);
}
.play-cta:hover {
  background: linear-gradient(180deg, rgba(255,215,0,0.28) 0%, rgba(255,180,0,0.14) 100%);
  box-shadow: 0 0 32px rgba(255,215,0,0.22);
}

/* Responsive tweaks */
@media (max-width: 480px) {
  .nav-inner { padding: 8px 12px; }
  .article-wrap { padding: 20px 14px 40px; }
  .attack-grid { grid-template-columns: 1fr; }
}

/* ── Mobile: larger fonts for readability ── */
@media (max-width: 768px) {
  .site-title { font-size: 14px; }
  .site-sub { font-size: 10px; }
  .fan-badge { font-size: 8px; }

  .nav-brand { font-size: 10px; }
  .nav-links a { font-size: 9px; }

  .bts-block h2 { font-size: 13px; }
  .bts-block p { font-size: 14px; }
  .bts-feat strong { font-size: 9px; }
  .bts-feat span { font-size: 12px; }
  .bts-faq .faq-q { font-size: 10px; }
  .bts-faq .faq-a { font-size: 13px; }
  .disclaimer-text { font-size: 12px !important; }
  .cta-link { font-size: 9px; }

  .controls-bar { font-size: 10px; }

  .footer-summary-heading { font-size: 9px; }
  .footer-summary { font-size: 13px; }
  .footer-inner span,
  .footer-inner a { font-size: 9px; }

  .breadcrumb { font-size: 9px; }
  .article-wrap h1 { font-size: 16px; }
  .article-meta { font-size: 9px; }
  .article-wrap h2 { font-size: 12px; }
  .article-wrap h3 { font-size: 10px; }
  .article-wrap p,
  .article-wrap li { font-size: 14px; }
  .tip-box p,
  .warn-box p { font-size: 14px !important; }
  .attack-card h4 { font-size: 9px; }
  .attack-card p { font-size: 13px !important; }
  .play-cta { font-size: 9px; }
}
