﻿:root {
  --canvas-width: 672px;
  --canvas-height: 648px;
  --page-bg-1: #c9f1ff;
  --page-bg-2: #6ecfff;
  --frame-shadow: 0 20px 45px rgba(0, 47, 87, 0.22);
  --panel-bg: rgba(255, 255, 255, 0.96);
  --panel-border: #1690d6;
  --text: #083456;
  --hit-highlight: rgba(255, 215, 83, 0.42);
  --cell-highlight: rgba(255, 230, 124, 0.36);
  --grid-line: rgba(15, 40, 68, 0.45);
  --grid-strong: #1c2330;
}

* {
  box-sizing: border-box;
}

body {
margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: var(--text);
}

button {
  font: inherit;
}

.page-shell {
  min-height: auto;
  display: grid;
  place-items: start center;
  padding: 0 24px 24px;
}
.layout-stage {
  width: min(100%, calc(var(--canvas-width) + 48px));
  display: grid;
  place-items: center;
}

.canvas-viewport {
  position: relative;
  width: var(--canvas-width);
  height: var(--canvas-height);
  max-width: 100%;
}

.game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--canvas-width);
  height: var(--canvas-height);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--frame-shadow);
  transform-origin: top left;
}

.ui-element {
  position: absolute;
}

.ui-element.is-hidden,
.hit-button.is-hidden {
  display: none;
}

.image-element img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}

.is-frame {
  pointer-events: none;
}

.board-grid {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  z-index: 8;
  background: #ffffff;
  border: 3px solid rgba(0, 0, 0, 0.2);
}

.board-cell {
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  border-top: 1px solid var(--grid-line);
  border-left: 1px solid var(--grid-line);
  background: transparent;
  padding: 0;
  overflow: hidden;
}

.board-cell.edge-top {
  border-top: 0;
}

.board-cell.edge-left {
  border-left: 0;
}

.board-cell.is-selected {
  background: var(--cell-highlight);
  box-shadow: inset 0 0 0 3px rgba(255, 184, 0, 0.85);
}

.board-cell.is-locked {
  background: rgba(216, 244, 255, 0.75);
}

.board-cell.is-wrong {
  background: rgba(255, 168, 168, 0.45);
}

.board-cell.is-hinting {
  background: rgba(180, 255, 205, 0.38);
}

.board-cell.has-shape {
  background-clip: padding-box;
}

.board-shape {
  width: auto;
  height: auto;
  max-width: 74%;
  max-height: 74%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.16));
}

.board-shape.is-hint {
  opacity: 0.72;
}

.board-shape--1 {
  transform: translateY(3px);
}

.board-divider {
  position: absolute;
  background: var(--grid-strong);
  z-index: 9;
  pointer-events: none;
}

.board-divider--vertical {
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-2px);
}

.board-divider--horizontal {
  left: 0;
  right: 0;
  height: 4px;
  transform: translateY(-2px);
}

.board-divider--thin-vertical {
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--grid-line);
  transform: translateX(-0.5px);
}

.hit-button {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  z-index: 30;
  touch-action: none;
}

.text-button {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-weight: 700;
  text-transform: lowercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.start-hit.text-button {
  font-size: 30px;
}

.difficulty-hit.text-button {
  font-size: 24px;
}

.hit-button:hover,
.hit-button:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  outline: none;
}

.hit-button.is-selected,
.hint-hit.is-used,
.control-hit.is-active {
  background: var(--hit-highlight);
}

.shape-hit {
  border-radius: 18px;
}

.difficulty-hit {
  border-radius: 16px;
}

.difficulty-hit.is-selected {
  background: transparent !important;
  box-shadow: none !important;
}
.shape-hit.is-selected {
  background: transparent !important;
  box-shadow: inset 0 0 0 3px rgba(255, 211, 77, 0.95);
}

.image-element.is-symbol-selected::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 2px rgba(255, 211, 77, 0.55);
}

.image-element.is-symbol-selected img {
  position: relative;
  z-index: 1;
}
.hint-hit.is-used {
  opacity: 0.9;
  background: rgba(8, 95, 154, 0.68);
  box-shadow: inset 0 0 0 3px rgba(5, 52, 85, 0.55);
}

.info-display {
  position: absolute;
  z-index: 31;
  display: grid;
  place-items: center;
  color: #0a4a73;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  pointer-events: none;
}

.timer-display {
  font-size: 20px;
}

.score-display {
  font-size: 22px;
}

.panel-element {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 34px 28px 24px;
  border: 4px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel-bg);
  box-shadow: 0 14px 28px rgba(0, 47, 87, 0.18);
  text-align: center;
  z-index: 40;
}

.panel-element[hidden] {
  display: none;
}

.panel-element__close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 97, 151, 0.12);
  color: #0c6197;
  font-size: 24px;
  line-height: 1;
}

.panel-element__title {
  font-size: 28px;
  font-weight: 700;
}

.panel-element__body {
  font-size: 18px;
  line-height: 1.6;
}

#textFramePanel {
  padding: 20px 20px 16px;
  gap: 2px;
}

#textFramePanel .panel-element__title {
  font-size: 22px;
}

#textFramePanel .panel-element__body {
  font-size: 15px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .page-shell {
    padding: 10px;
  }

  .layout-stage {
    width: 100%;
  }
}



.board-cell.is-celebrating {
  background: #0b8fe3;
  transition: background-color 140ms ease;
}




















