* {
  box-sizing: border-box;
}

.game-page {
  position: relative;

  width: 100%;
  height: 100%;
  min-height: 0;

  overflow: hidden;

  background-image: url("../assets/images/backgrounds/game-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.game-page > #steps-overlay,
.game-page > #settings-overlay,
.game-page > #win-overlay,
.game-page > #lose-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  background: rgba(0, 0, 0, 0.28);
}

.game-page > #steps-overlay[hidden],
.game-page > #settings-overlay[hidden],
.game-page > #win-overlay[hidden],
.game-page > #lose-overlay[hidden] {
  display: none;
}

#settings-overlay .settings-content {
  position: relative;
}

#steps-overlay .store-shell {
  position: relative;
}

.game-background {
  position: absolute;
  inset: 0;

  pointer-events: none;
  z-index: 0;
}
.shell-header {
  align-items: flex-start;
}

.game-ground {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 220px;
}

.bg-decoration {
  position: absolute;

  width: 70px;
  height: 70px;

  border-radius: 15px;

  background: rgba(255, 255, 255, 0.13);
}

.bg-piece-1 {
  left: 5%;
  top: 20%;
}

.bg-piece-2 {
  right: 10%;
  top: 15%;
}

.bg-piece-3 {
  right: 4%;
  top: 40%;
}

.game-topbar {
  position: relative;
  z-index: 5;

  max-width: 980px;

  margin: 35px auto 45px;

  transform: translateY(30px);
}

.game-status-bar {
  position: relative;

  width: 100%;
  min-height: 100px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 24px;

  padding: 14px 28px 14px 135px;

  background: #36aef4;

  border: 4px solid #ffffff;
  border-radius: 32px;

  box-shadow:
    0 0 0 4px #67ddff,
    0 0 18px rgba(103, 221, 255, 0.85),
    0 10px 22px rgba(0, 80, 150, 0.2);
}

.status-character {
  position: absolute;

  left: -50px;
  bottom: -18px;

  z-index: 4;
}

.status-character-image {
  width: 175px;
  height: 175px;

  object-fit: contain;
  display: block;
}

.status-item {
  position: relative;

  overflow: visible;

  width: 245px;
  height: 55px;

  padding: 8px 50px 8px 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  box-sizing: border-box;

  background: linear-gradient(to bottom, #ffffff, #eef9ff);

  border: 3px solid #ffffff;
  border-radius: 24px;

  box-shadow:
    0 0 0 3px #8adfff,
    0 0 12px rgba(72, 202, 255, 0.5),
    0 5px 10px rgba(0, 83, 150, 0.16);

  color: #0e5599;

  font-size: 21px;
  font-weight: 900;
}

.status-icon {
  position: absolute;

  right: -18px;
  top: 50%;

  transform: translateY(-50%);

  width: 75px;
  height: 75px;

  object-fit: contain;

  flex-shrink: 0;
}

.timer-status strong {
  color: #ef3f42;
}

.game-area {
  position: relative;
  z-index: 4;

  max-width: 1200px;

  margin: 0 auto;

  display: grid;

  grid-template-columns:
    minmax(370px, 1fr)
    minmax(370px, 1fr)
    110px;

  gap: 35px;

  align-items: center;

  transform: translate(-90px, 40px);
}

.original-image {
  width: 100%;
  height: 100%;

  object-fit: contain;
  display: block;
}

.original-image-panel,
.puzzle-panel {
  position: relative;

  background: rgba(255, 255, 255, 0.96);

  border: 4px solid #ffffff;
  border-radius: 32px;

  padding: 38px 20px 20px;

  box-shadow:
    0 0 0 3px #8edfff,
    0 8px 22px rgba(0, 92, 170, 0.18);
}

.panel-title {
  position: absolute;

  top: -34px;
  left: 50%;

  transform: translateX(-50%);

  min-width: 310px;
  height: 66px;

  padding: 0 25px;

  border-radius: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 20px;

  color: white;

  border: 4px solid white;

  box-shadow: 0 6px 15px rgba(0, 70, 140, 0.15);
}

.panel-title h2 {
  margin: 0;

  font-size: 26px;
}

.blue-title {
  background: linear-gradient(to bottom, #318ef0, #1768c8);
}

.original-image-placeholder {
  width: 100%;
  height: 100%;

  aspect-ratio: 1 / 1;

  border-radius: 20px;

  border: 3px dashed rgba(30, 115, 190, 0.45);

  background: linear-gradient(135deg, #e7f5fe, #caeafb);

  position: relative;

  overflow: hidden;
}

.original-image-placeholder::before {
  content: "";

  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(20, 85, 150, 0.55);

  font-size: 24px;
  font-weight: bold;
}

.puzzle-board {
  width: 100%;

  aspect-ratio: 1 / 1;

  display: grid;

  gap: 5px;

  border-radius: 20px;

  overflow: hidden;

  background: #d5e6ef;

  padding: 4px;

  direction: ltr;
}

.puzzle-6 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.game-tile {
  position: relative;

  border-radius: 7px;

  border: 2px dashed rgba(0, 100, 180, 0.35);

  background-color: #d6effd;
  background-repeat: no-repeat;

  cursor: pointer;
}

.game-tile::before {
  content: "";

  position: absolute;
  inset: 0;

  background: rgba(255, 255, 255, 0.05);
}

.empty-tile {
  background-image: none !important;
  background: #d5e6ef;

  border: 2px dashed rgba(0, 100, 180, 0.35);

  cursor: default;
}

.game-footer {
  position: absolute !important;

  left: 0 !important;
  right: auto !important;

  top: 50% !important;
  bottom: auto !important;

  margin: 0 !important;

  display: grid !important;
  grid-template-columns: 1fr !important;

  gap: 70px !important;

  transform: translateY(-50%) !important;

  z-index: 5;
}

.game-footer-button {
  width: 170px;
  height: 90px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  padding: 0;
  margin: 0;

  border: none;
  border-radius: 22px;

  background: transparent;
  box-shadow: none;

  text-decoration: none;
  cursor: pointer;

  transform: scale(1.4);
  transition: transform 0.12s ease;

  overflow: visible;
}

.footer-button-icon,
.start-game-button img {
  width: 84px;
  height: 84px;

  object-fit: contain;
  display: block;

  transform: none;
}

.game-footer-button:active {
  transform: translateY(3px) scale(0.9) !important;
}

.level-status-blue {
  background: linear-gradient(to bottom, #38aaf3, #176fca);
}

.level-status-green {
  background: linear-gradient(to bottom, #35d59a, #149b6c);
}

.level-status-yellow {
  background: linear-gradient(to bottom, #ffd83d, #e5a800);

  color: #7a5200;
}

.level-status-orange {
  background: linear-gradient(to bottom, #ffb52e, #f07a0b);
}

.level-status-red {
  background: linear-gradient(to bottom, #ff5964, #df3345);
}

.level-status-purple {
  background: linear-gradient(to bottom, #b96cff, #7b2fd0);
}

.level-status-indigo {
  background: linear-gradient(to bottom, #6f7cff, #3f46c8);
}

.level-status-dark {
  background: linear-gradient(to bottom, #4c5568, #171d2b);
}

.level-name {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;
}

.game-difficulty {
  font-size: 26px;
  font-weight: 900;
}

.level-star {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.original-image-panel .panel-title,
#level-status-title {
  width: 310px;
  min-width: 310px;
  max-width: 310px;

  height: 66px;
  min-height: 66px;
  max-height: 66px;

  padding: 0 12px;

  box-sizing: border-box;
}

#level-status-title {
  gap: 10px;
}

.original-image-panel .panel-title h2,
#level-status-title .game-difficulty {
  margin: 0;

  font-size: 22px;
  font-weight: 900;

  font-family: inherit;

  line-height: 1;
}

.shell-nav-group {
  display: flex;
  flex-direction: row;
  align-items: center;

  gap: 10px;

  pointer-events: auto;
}

.game-steps {
  background-image: url("../assets/images/ui/steps-panel.webp");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;

  position: absolute !important;

  left: auto !important;
  right: 10px !important;
  top: 350px !important;

  z-index: 20;

  margin: 0 !important;
  transform: none !important;
}
.game-footer-button {
  transform: none !important;
}

.footer-button-icon,
.start-game-button img {
  transform: scale(1.4) !important;
}

.game-footer-button:active {
  transform: translateY(3px) scale(0.9) !important;
}

.game-area {
  width: 1235px !important;
  max-width: 1235px !important;

  grid-template-columns: 600px 600px !important;
  gap: 35px !important;

  position: absolute !important;
  left: 49% !important;
  top: 28% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;

  transform: translateX(-50%) !important;
}

.original-image-panel,
.puzzle-panel {
  width: 550px !important;
  height: 550px !important;
}
.original-image-placeholder,
.puzzle-board {
  width: 484px !important;
  height: 484px !important;
  margin: 0 auto !important;
}
.original-image-panel,
.puzzle-panel {
  scale: 1.1;
  transform-origin: center;
}
