/* FoxHunt3D v8.0.1 - peliopas ja näppäinasettelut */

#guideHudButton {
  right: 16px;
  top: 294px;
}

.game-guide-overlay {
  z-index: 120;
  padding: 14px;
  align-items: center;
}

.game-guide-card {
  width: min(1220px, 98vw);
  max-height: min(940px, calc(100vh - 20px));
  padding: 0;
  overflow: hidden;
  border-color: rgba(104, 226, 255, .28);
  background:
    linear-gradient(180deg, rgba(4, 13, 24, .985), rgba(5, 12, 22, .975)),
    radial-gradient(circle at 78% 12%, rgba(61, 188, 255, .18), transparent 35%);
}

.game-guide-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 20px 22px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background:
    linear-gradient(120deg, rgba(20, 49, 76, .72), rgba(9, 19, 33, .2)),
    url('assets/v640/branding/foxhunt3d-launch-screen.webp') center 34% / cover;
  position: relative;
  isolation: isolate;
}

.game-guide-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(3, 10, 19, .97) 0%, rgba(3, 10, 19, .82) 54%, rgba(3, 10, 19, .55) 100%);
}

.game-guide-header h2 {
  margin: 5px 0 4px;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.035em;
}

.game-guide-header p {
  max-width: 780px;
  margin: 0;
  color: rgba(225, 238, 250, .78);
  line-height: 1.45;
}

.game-guide-close {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  color: white;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.game-guide-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: rgba(5, 14, 25, .96);
}

.game-guide-tabs button {
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, .055);
  color: rgba(231, 242, 251, .82);
  font-weight: 850;
  cursor: pointer;
}

.game-guide-tabs button.active {
  border-color: rgba(104, 226, 255, .72);
  background: rgba(104, 226, 255, .15);
  color: #8beeff;
  box-shadow: 0 0 24px rgba(104, 226, 255, .12);
}

.game-guide-content {
  max-height: calc(100vh - 268px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 24px;
}

.game-guide-page { display: none; }
.game-guide-page.active { display: block; }

.guide-lead-grid,
.guide-quick-grid,
.guide-world-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.guide-panel,
.guide-step,
.guide-mode-card,
.guide-key-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(116, 227, 255, .16);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(17, 27, 44, .94), rgba(8, 14, 25, .96));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025), 0 13px 32px rgba(0, 0, 0, .18);
}

.guide-panel::before,
.guide-step::before,
.guide-mode-card::before,
.guide-key-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background:
    linear-gradient(90deg, rgba(104, 226, 255, .045) 0 1px, transparent 1px 15px),
    linear-gradient(rgba(255, 255, 255, .025) 0 1px, transparent 1px 15px);
  background-size: 15px 15px;
}

.guide-panel > *, .guide-step > *, .guide-mode-card > *, .guide-key-card > * { position: relative; z-index: 1; }

.guide-panel { padding: 18px; }
.guide-panel.hero { grid-column: 1 / -1; padding: 22px; }
.guide-panel h3, .guide-step h3, .guide-mode-card h3 { margin: 0 0 8px; color: #eff8ff; }
.guide-panel p, .guide-step p, .guide-mode-card p { margin: 0; color: rgba(222, 235, 247, .76); line-height: 1.55; }
.guide-panel strong { color: #7be8ff; }

.guide-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.guide-pill-row span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(104, 226, 255, .16);
  background: rgba(104, 226, 255, .08);
  color: #dff9ff;
  font-size: 12px;
  font-weight: 750;
}

.guide-step {
  min-height: 146px;
  padding: 17px 17px 17px 68px;
}
.guide-step-number {
  position: absolute;
  left: 16px;
  top: 17px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #6ee8ff, #3f8cff);
  color: #04101b;
  font-size: 19px;
  font-weight: 950;
  box-shadow: 0 0 24px rgba(69, 196, 255, .24);
}

.guide-mode-card {
  min-height: 188px;
  padding: 17px 17px 18px;
}
.guide-mode-card .guide-mode-label {
  display: inline-block;
  margin-bottom: 9px;
  color: #7be8ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.guide-controls-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 15px;
  padding: 14px 15px;
  border-radius: 15px;
  background: rgba(104, 226, 255, .06);
  border: 1px solid rgba(104, 226, 255, .15);
}
.guide-controls-toolbar label { min-width: min(330px, 100%); }
.guide-controls-toolbar label > span { margin-top: 0; }
.guide-controls-toolbar select { margin-top: 4px; }
.guide-controls-toolbar p { margin: 0; max-width: 650px; color: rgba(222, 235, 247, .7); font-size: 12px; line-height: 1.45; }

.guide-key-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.guide-key-card { padding: 16px; }
.guide-key-card.selected { border-color: rgba(255, 209, 102, .66); box-shadow: 0 0 28px rgba(255, 209, 102, .12); }
.guide-key-card h3 { margin: 0; font-size: 21px; }
.guide-key-card > p { margin: 5px 0 13px; color: rgba(222, 235, 247, .68); font-size: 12px; line-height: 1.45; }

.guide-key-table { display: grid; gap: 7px; }
.guide-key-row {
  display: grid;
  grid-template-columns: minmax(112px, .72fr) minmax(0, 1.45fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 7px 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
}
.guide-key-row kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-bottom-width: 3px;
  border-radius: 8px;
  background: rgba(8, 18, 30, .92);
  color: #f4fbff;
  font: 850 11px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}
.guide-key-row span { color: rgba(229, 239, 248, .78); font-size: 12px; line-height: 1.35; }

.game-guide-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  background: rgba(5, 13, 23, .98);
}
.game-guide-downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.game-guide-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 37px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  color: #dff7ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}
.game-guide-footer small { color: rgba(215, 229, 241, .55); text-align: right; }

.guide-keyboard-setting-group .guide-preset-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.guide-keyboard-setting-group .guide-preset-note { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

@media (max-width: 820px) {
  #guideHudButton { top: 238px; }
  .game-guide-overlay { padding: 4px; align-items: start; }
  .game-guide-card { width: 100%; max-height: calc(100vh - 8px); border-radius: 13px; }
  .game-guide-header { padding: 15px 15px 13px; }
  .game-guide-header p { display: none; }
  .game-guide-tabs { padding: 9px 10px; gap: 6px; }
  .game-guide-tabs button { flex: 1 1 auto; padding: 8px 9px; font-size: 11px; }
  .game-guide-content { max-height: calc(100vh - 235px); padding: 12px 11px 18px; }
  .guide-lead-grid, .guide-quick-grid, .guide-world-grid, .guide-key-layout { grid-template-columns: 1fr; }
  .guide-step { min-height: 128px; }
  .game-guide-footer { align-items: flex-start; flex-direction: column; }
  .game-guide-footer small { text-align: left; }
  .guide-keyboard-setting-group .guide-preset-summary { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  #guideHudButton { right: 12px; top: 188px; }
  .game-guide-header h2 { font-size: 28px; }
  .game-guide-close { width: 42px; height: 42px; }
  .guide-panel, .guide-step, .guide-mode-card, .guide-key-card { border-radius: 13px; }
  .guide-key-row { grid-template-columns: 98px 1fr; }
}

.game-guide-overlay {
  background: rgba(1, 7, 13, .82);
  backdrop-filter: blur(12px);
}

@media (max-height: 520px) and (orientation: landscape) {
  .game-guide-overlay { padding: 2px; align-items: start; }
  .game-guide-card { width: 100%; max-height: calc(100vh - 4px); border-radius: 12px; }
  .game-guide-header { padding: 7px 12px 6px; grid-template-columns: minmax(0, 1fr) 40px; }
  .game-guide-header .eyebrow { font-size: 8px; }
  .game-guide-header h2 { margin: 1px 0 0; font-size: 25px; }
  .game-guide-header p { display: none; }
  .game-guide-close { width: 38px; height: 38px; border-radius: 10px; font-size: 25px; }
  .game-guide-tabs { padding: 5px 8px; gap: 5px; flex-wrap: nowrap; overflow-x: auto; }
  .game-guide-tabs button { flex: 0 0 auto; padding: 6px 10px; font-size: 10px; }
  .game-guide-content { max-height: calc(100vh - 157px); padding: 8px 10px 12px; }
  .guide-controls-toolbar { margin-bottom: 8px; padding: 8px 10px; }
  .guide-controls-toolbar p { display: none; }
  .guide-key-layout { gap: 9px; }
  .guide-key-card { padding: 10px; }
  .guide-key-card h3 { font-size: 17px; }
  .guide-key-card > p { display: none; }
  .guide-key-row { min-height: 34px; padding: 4px 6px; grid-template-columns: 104px minmax(0, 1fr); }
  .guide-key-row kbd { min-height: 24px; font-size: 9px; }
  .guide-key-row span { font-size: 10px; }
  .game-guide-footer { padding: 5px 8px; min-height: 38px; }
  .game-guide-footer a { min-height: 28px; padding: 5px 8px; font-size: 9px; }
  .game-guide-footer small { display: none; }
}

.guide-v6-banner {
  display: block;
  width: 100%;
  max-height: 360px;
  margin: 0 0 16px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(104, 226, 255, .18);
}
