/* =========================
   GAME.PHP SEO BLOCK
   ========================= */
.game-seo {
  width: min(1180px, calc(100% - 40px));
  margin: 56px auto 40px;
  padding: 34px 28px;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.96), rgba(5, 9, 20, 0.98));
  border-radius: 24px;
  border: 1px solid rgba(255, 159, 26, 0.12);
  box-shadow:
    0 0 50px rgba(255, 255, 255, 0.04),
    0 0 80px rgba(249, 115, 22, 0.06),
    inset 0 0 25px rgba(255, 255, 255, 0.03);
  color: #d1d5db;
  font-family: 'Orbitron', sans-serif;
  line-height: 1.7;
  text-align: left;
}

.game-seo h2 {
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  color: #ff9f1a;
  margin-bottom: 20px;
}

.game-seo h3 {
  font-size: 1.08rem;
  color: #f8fafc;
  margin: 28px 0 12px;
}

.game-seo p {
  font-size: 14px;
  color: #d1d5db;
  margin-bottom: 1.15em;
}

.game-seo strong {
  color: var(--primary);
  font-weight: bold;
}

.game-seo.hide-seo {
  display: none;
}

/* ===== SECTION ===== */
#nicknameSection,
#gameSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ===== GRID ===== */
#nicknameSection #nicknameScreen {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(400px, 520px) minmax(420px, 1fr);
  gap: 24px;
  align-items: start;
  position: relative;
  box-sizing: border-box;
}

/* ===== CARD ===== */
.game-hero-card,
.game-side-column,
.player-profile-card {
  position: relative;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.96), rgba(5, 9, 20, 0.98));
  border-radius: 24px;
  border: 1px solid rgba(255, 159, 26, 0.14);
  box-shadow:
    0 0 24px rgba(255, 140, 0, 0.10),
    0 0 70px rgba(249, 115, 22, 0.05);
}

.game-hero-card::before,
.game-side-column::before,
.player-profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  background: linear-gradient(
    90deg,
    rgba(255, 159, 26, 0.9),
    rgba(255, 211, 46, 0.25),
    transparent
  );
  pointer-events: none;
}

.game-hero-card {
  padding: 16px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.game-side-column {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.player-profile-card {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding: 24px;
  font-family: 'Segoe UI', sans-serif;
}

/* ===== H1 ACCESSIBILITY SAFE ===== */
h1.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ===== TITLE ===== */
#nicknameScreen h2 {
  margin: 4px 0 10px;
  font-size: clamp(1.2rem, 1.8vw, 1.1rem);
  line-height: 1.1;
  font-weight: 800;
  color: #ffe082;
  text-align: center;
  text-shadow:
    0 0 10px rgba(255, 213, 74, 0.16),
    0 0 22px rgba(255, 159, 26, 0.10);
  max-width: 680px;
}

/* ===== DESCRIPTION ===== */
.game-hero-description {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.7;
  max-width: 52ch;
  text-align: center;
  color: #cbd5e1;
}

/* ===== FORM ===== */
.game-hero-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ===== INPUT & BUTTON RESET BASE ===== */
input,
button {
  width: 100%;
}

button {
  padding: 14px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ===== ANTI MOBILE SELECTION / LONG PRESS ===== */
html,
body,
#mainContent,
#gameSection,
#gameSection #gameContainer,
canvas {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* ===== CANVAS ===== */
#gameSection #gameContainer {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  display: block;
  margin: 30px auto;
  background-color: var(--bg-dark);
  border-radius: 16px;
  box-shadow:
    0 0 30px rgba(249, 115, 22, 0.4),
    inset 0 0 20px rgba(0, 0, 0, 0.8);
  width: 100%;
  height: auto;
  max-height: 100%;
}

#lastScore {
  margin-top: 14px;
  font-size: 14px;
  color: #32ffd2;
  text-shadow: 0 0 6px rgba(50, 255, 210, 0.6);
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip-text {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  background-color: #111;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  max-width: min(260px, 90vw);
  white-space: normal;
  text-align: center;
  z-index: 99999;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.tooltip strong {
  text-decoration: underline dotted;
}

.ninja-rank {
  margin-left: 0;
  font-size: 0.85em;
  opacity: 0.9;
}

/* ===== TABLET ===== */
@media (max-width: 1180px) {
  #nicknameSection #nicknameScreen,
  .game-seo {
    width: calc(100% - 28px);
  }
}

@media (max-width: 980px) {
  #nicknameSection #nicknameScreen {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .game-hero-card,
  .game-side-column,
  .player-profile-card {
    width: 100%;
    max-width: 100%;
  }

  .game-side-column {
    padding: 14px;
  }

  .player-profile-card {
    padding: 16px 14px;
  }

  .game-hero-card {
    padding: 14px 18px 18px;
  }

  #nicknameScreen h2 {
    font-size: clamp(1.55rem, 4.5vw, 2.1rem);
    margin: 4px 0 10px;
  }

  .game-hero-description {
    font-size: 14px;
    max-width: 100%;
  }
}

/* ===== MOBILE ===== */
@media (max-width: 600px) and (orientation: portrait) {
  #mainContent {
    width: 100%;
    padding: 6px;
  }

  #nicknameSection #nicknameScreen {
    width: 95%;
    margin-top: 4px;
    gap: 12px;
  }

  .game-hero-card {
    padding: 12px 14px 16px;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  #nicknameScreen h2 {
    font-size: clamp(1.35rem, 7vw, 1.95rem);
    line-height: 1.12;
    margin: 2px 0 8px;
    text-shadow: none !important;
  }

  .game-hero-description {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
  }

  canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 100%;
    border-radius: 12px;
  }

  .game-seo {
    width: calc(100% - 12px);
    padding: 16px 12px;
    border-radius: 16px;
    box-shadow: none !important;
    background: #0f1726 !important;
  }

  .game-seo h2 {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
    margin-bottom: 12px;
  }

  .game-seo p {
    font-size: 12px;
    margin-bottom: 1em;
  }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 430px) {
  #nicknameScreen h2 {
    font-size: clamp(1.15rem, 7.4vw, 0.45rem);
  }

  .game-hero-description {
    font-size: 11px;
  }
}