@import url("warning.css");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden !important;
  font-family: Arial, Tahoma, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("../assets/images/backgrounds/body-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.game-frame-wrap {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  width: 1600px !important;
  height: 900px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
  transform-origin: center center !important;
  z-index: 10;
}

.game-shell {
  position: relative;
  width: 1600px !important;
  height: 900px !important;
  overflow: hidden;
  flex-shrink: 0;
}

.game-screen {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

.shell-header {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.shell-control {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  flex-shrink: 0 !important;
  transition: transform 0.1s ease;
}

.shell-control:active {
  transform: translateY(3px) scale(0.9);
}

.shell-control-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.shell-controls-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.fullscreen-button {
  position: absolute !important;
  top: 15px !important;
  right: -78px !important;
  width: 75px !important;
  height: 75px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 1000;
  flex-shrink: 0 !important;
  transition: transform 0.1s ease;
}

.fullscreen-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.game-frame-wrap:fullscreen {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none !important;
  transform-origin: center center !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: #000;
}

.game-frame-wrap:fullscreen .game-shell {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 1600px !important;
  height: 900px !important;
  flex-shrink: 0;
  transform-origin: center center !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

.game-frame-wrap:fullscreen .game-screen {
  border-radius: 0 !important;
}

.game-frame-wrap:fullscreen .fullscreen-button,
.game-frame-wrap:fullscreen .micalo-bottom-area {
  display: none !important;
}

.micalo-bottom-area {
  position: absolute !important;

  top: 880px !important;
  left: 50% !important;

  width: 970px !important;
  min-width: 970px !important;
  max-width: 970px !important;

  margin: 0 !important;
  box-sizing: border-box;

  transform: translateX(-50%) !important;

  z-index: 1000;
  flex-shrink: 0 !important;
}

.ad-area {
  width: 80% !important;
  height: 160px !important;
  overflow: hidden;
  transform: translateX(-15%);
}

.ad-area img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: fill;
}

.micalo-footer {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin-top: 0;
  font-size: 15px;
  line-height: 1.5;

  transform: translateY(-30px);
}

.home-page {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0 !important;
  overflow: hidden;
  background-image: url("../assets/images/backgrounds/home-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

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

.home-page > #settings-overlay[hidden] {
  display: none;
}

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

.home-content {
  position: relative;
  z-index: 5;
  display: grid !important;
  grid-template-columns: 280px 1fr 250px !important;
  align-items: center !important;
  gap: 28px !important;
  max-width: 1500px !important;
  margin: 10px auto 0 !important;
  transform: translate(-35px, 235px) !important;
}

.character-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  order: 0 !important;
  transform: translateX(-30px) !important;
}

.character-label {
  margin-top: -25px;
  padding: 10px 22px;
  text-align: center;
  border: 3px solid #f45900;
  border-radius: 20px;
  background-image: url("../assets/images/ui/micalo-panel.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 6px 14px rgba(0, 70, 140, 0.18),
    0 0 0 3px #1677c8;
  transform: rotate(-4deg);
}

.character-label span {
  display: block;
  color: #145a9c;
  font-size: 15px;
  font-weight: 800;
}

.character-label strong {
  display: block;
  margin-top: 4px;
  color: #f39a00;
  font-size: 28px;
  font-weight: 900;
  text-shadow: 0 2px 0 #ffffff;
}

.center-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  order: 0 !important;
  width: auto !important;
  transform: translateY(-60px) !important;
}

.logo-area {
  margin-bottom: 12px;
  text-align: center;
}

.game-subtitle {
  margin-top: 0;
  color: #f39a00;
  text-align: center;
  font-size: 42px !important;
  line-height: 1.1;
  font-weight: 900;
  text-shadow:
    0 3px 0 white,
    0 6px 10px rgba(0, 0, 0, 0.12);
}

.puzzle-preview {
  position: relative;
  width: 720px !important;
  aspect-ratio: 16 / 8.5;
  padding: 10px;
  border-radius: 26px;
  background: white;
  box-shadow:
    0 10px 30px rgba(0, 60, 130, 0.18),
    inset 0 0 0 2px rgba(255, 255, 255, 0.8);
  transform: translateX(-30px);
}

.preview-image {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  border-radius: 18px;
}

.puzzle-grid {
  position: absolute;
  inset: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  overflow: hidden;
  border-radius: 18px;
}

.puzzle-tile {
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.home-page .empty-tile {
  background: rgba(230, 225, 215, 0.9);
}

.floating-tile-image {
  position: absolute;
  right: -70px;
  bottom: -12px;
  width: 170px;
  height: 120px;
  object-fit: cover;
  border: 8px solid white;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transform: rotate(8deg);
}

.main-buttons {
  display: grid !important;
  grid-template-columns: repeat(3, 170px) !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  width: max-content !important;
  margin: 24px auto 0 !important;
  transform: translateX(-110px) !important;
}

.main-btn {
  width: 170px !important;
  height: 90px !important;
  min-height: 0 !important;
  padding: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible;
  flex-shrink: 0 !important;
  border: none;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
  transform: none !important;
}

.button-icon {
  width: 84px !important;
  height: 84px !important;
  object-fit: contain;
  display: block;
  transform: scale(1.4);
  transform-origin: center;
}

.main-btn:active {
  transform: translateY(3px) scale(0.9) !important;
}

.main-btn:active .button-icon {
  transform: scale(1.4) !important;
}

.background-elements {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.background-placeholder {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 260px;
}

.puzzle-decoration {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}

.puzzle-decoration-1 {
  left: 28%;
  top: 30px;
  transform: rotate(8deg);
}

.puzzle-decoration-2 {
  right: 24%;
  top: 20px;
  transform: rotate(-8deg);
}

.puzzle-decoration-3 {
  right: 15%;
  top: 170px;
  transform: rotate(14deg);
}

.character-image {
  width: 450px;
  height: auto;
  object-fit: contain;
  display: block;
}

.micalo-logo {
  width: 420px;
  height: auto;
  margin: 0 auto -30px;
  object-fit: contain;
  display: block;
  transform: scale(2) translateY(-50px);
}

body.home-theme .shell-header {
  direction: rtl;
}

.steps-wallet-card {
  width: 118px;
  padding: 12px 10px 10px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 8px;

  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.98),
    rgba(232, 248, 255, 0.96)
  );

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

  box-shadow:
    0 0 0 3px #8adfff,
    0 8px 20px rgba(0, 83, 150, 0.18);
}

.steps-wallet-balance {
  width: 100%;
  min-height: 58px;

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

  gap: 6px;
}

.steps-wallet-icon {
  width: 50px;
  height: 50px;

  display: block;
  object-fit: contain;

  flex-shrink: 0;
}

.steps-wallet-value {
  display: inline-flex;
  align-items: center;

  direction: ltr;

  color: #0e5599;

  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.steps-wallet-count,
.steps-wallet-times {
  font: inherit;
}

.steps-wallet-card .steps-store-link {
  width: 84px;
  height: 76px;

  margin: 0;
  padding: 7px 0 0;

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

  border: none;
  border-top: 2px solid rgba(22, 119, 200, 0.16);

  background: transparent;
  text-decoration: none;

  cursor: pointer;

  transition: transform 0.1s ease;
}

.steps-wallet-card .steps-store-link:active {
  transform: translateY(3px) scale(0.96);
}

.steps-wallet-card .levels-step-link-icon {
  width: 78px;
  height: 68px;

  display: block;
  object-fit: contain;
}

body.home-theme .shell-header .shell-controls-group {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

body.home-theme .shell-control {
  width: 60px !important;
  height: 60px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.home-theme .shell-control-icon {
  width: 60px !important;
  height: 60px !important;
  object-fit: contain !important;
}

.home-page > #help-overlay {
  position: absolute;
  inset: 0;
  z-index: 550;

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

  padding: 45px;

  background: rgba(0, 35, 75, 0.38);
}

.home-page > #help-overlay[hidden] {
  display: none;
}

.help-card {
  position: relative;

  width: 900px;
  max-height: 780px;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  padding: 28px 34px 24px;

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

  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.98),
    rgba(229, 247, 255, 0.98)
  );

  box-shadow:
    0 0 0 5px #43bdf4,
    0 18px 50px rgba(0, 55, 110, 0.3);
}

.help-close-button {
  position: absolute;
  top: 18px;
  left: 20px;

  width: 52px;
  height: 52px;

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

  padding: 0;

  border: none;
  border-radius: 50%;

  color: #ffffff;
  background: #ef5350;

  font-size: 38px;
  font-weight: 900;
  line-height: 1;

  cursor: pointer;

  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.18);
}

.help-close-button:active {
  transform: translateY(3px) scale(0.94);
}

.help-header {
  flex-shrink: 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  margin-bottom: 16px;

  text-align: center;
}

.help-logo {
  width: 190px;
  height: auto;

  display: block;
  object-fit: contain;

  margin-bottom: -10px;
}

.help-header h3 {
  margin: 0;

  color: #f39a00;

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

  text-shadow: 0 2px 0 #ffffff;
}

.help-content {
  flex: 1;
  min-height: 0;

  overflow-y: auto;

  padding: 5px 12px 10px;

  direction: rtl;
  scrollbar-width: none;
}
.help-content::-webkit-scrollbar {
  display: none;
}

.help-section {
  margin-bottom: 14px;
  padding: 15px 18px;

  border: 2px solid rgba(22, 119, 200, 0.16);
  border-radius: 18px;

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

.help-section h4 {
  margin: 0 0 8px;

  color: #1559a7;

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

.help-section p {
  margin: 0;

  color: #315d82;

  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
}

.help-footer {
  flex-shrink: 0;

  padding-top: 16px;
}

.help-social-links {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 18px;
}

.help-social-button {
  width: 58px;
  height: 58px;

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

  padding: 7px;

  border: 3px solid #ffffff;
  border-radius: 50%;

  background: #e6f6ff;

  box-shadow:
    0 0 0 2px #54bff1,
    0 5px 10px rgba(0, 70, 130, 0.16);

  transition: transform 0.1s ease;
}

.help-social-button img {
  width: 100%;
  height: 100%;

  display: block;
  object-fit: contain;
}

.help-social-button:active {
  transform: translateY(3px) scale(0.92);
}
.help-legal {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: #f28b00;
}
