:is(#peeksee-addition-game, #peeksee-multiplication-game, #peeksee-subtraction-game) {
  width: 100%;
}

:is(#peeksee-addition-game, #peeksee-multiplication-game, #peeksee-subtraction-game),
:is(#peeksee-addition-game, #peeksee-multiplication-game, #peeksee-subtraction-game) * {
  box-sizing: border-box;
  text-decoration: none !important;
}

.peeksee-game {
  position: relative;
  display: grid;
  grid-template-columns: minmax(560px, 2fr) minmax(340px, 1fr);
  gap: 52px;
  width: 100%;
  min-height: 560px;
  padding: 34px 18px 26px;
  overflow: hidden;
  font-family: "Fredoka Regular", Fredoka, Arial, sans-serif;
  color: #17112f;
  background: transparent;
}

.game-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.question-card {
  position: relative;
  width: 100%;
  max-width: 680px;
  min-height: 390px;
  padding: 58px 50px 34px;
  border: 2px solid rgba(151, 71, 255, 0.58);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 10px 25px rgba(67, 34, 112, 0.14),
    inset 0 0 28px rgba(255, 255, 255, 0.8);
  text-align: center;
}
#peeksee-multiplication-game .question-card{
  border: 2px solid #F78701 !important;    
}
#peeksee-subtraction-game .question-card{
  border: 2px solid #038746 !important;    
}

.question-badge {
  position: absolute;
  top: -18px;
  left: 18px;
  right: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.question-badge-main,
.question-level-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.question-badge-main {
  min-width: 145px;
  color: #4916d8;
  background: linear-gradient(180deg, #ffc928 0%, #ffac00 100%);
  box-shadow: 0 5px 0 rgba(255, 158, 0, 0.25);
}

.question-level-chip {
  color: #ffffff;
  background: linear-gradient(180deg, #9a48ff 0%, #6e25dc 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.25),
    0 5px 0 rgba(87, 24, 192, 0.35);
}

.difficulty-title {
  margin: 34px 0 28px;
  color: #17112f;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 36px;
  font-weight: 700;
}

.difficulty-buttons {
  display: grid;
  gap: 16px;
}

.difficulty-button {
  width: 100%;
  min-height: 74px;
  padding: 14px 18px;
  border: 2px solid rgba(151, 71, 255, 0.42);
  border-radius: 16px;
  color: #17112f;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 25px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 4px 0 rgba(151, 71, 255, 0.13),
    0 10px 18px rgba(70, 30, 110, 0.05);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
#peeksee-multiplication-game .difficulty-button{    
  border: 2px solid #F78701 !important;
  box-shadow:
    0 4px 0 #FFE9CC,
    0 10px 18px #FDF8F0;
}
#peeksee-subtraction-game .difficulty-button{
  border: 2px solid #038746 !important;    
   box-shadow:
    0 4px 0 #CFE3E7,
    0 10px 18px #FDF8F0;
}


.difficulty-button span {
  display: block;
  margin-top: 5px;
  color: #7c35ff;
  font-family: "Fredoka Regular", Fredoka, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
}
#peeksee-multiplication-game .difficulty-button span{
    color:#F78701;
}
#peeksee-subtraction-game .difficulty-button span{
    color:#038746;
}

.difficulty-button:hover {
  transform: translateY(-2px);
  border-color: #9747ff;
  background: #fbf7ff;
  box-shadow:
    0 6px 0 rgba(151, 71, 255, 0.18),
    0 12px 20px rgba(70, 30, 110, 0.09);
}

.selected-level {
  display: none;
}

.question-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 8px 0 34px;
  color: #17112f;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 66px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
}

.question-mark {
  color: #8338ff;
}

.answers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 18px 20px;
  margin-bottom: 34px;
}

.answer-button {
  min-height: 78px;
  border: 2px solid rgba(151, 71, 255, 0.42);
  border-radius: 15px;
  color: #17112f;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 4px 0 rgba(151, 71, 255, 0.13),
    0 10px 18px rgba(70, 30, 110, 0.05);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.answer-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #9747ff;
  box-shadow:
    0 6px 0 rgba(151, 71, 255, 0.18),
    0 12px 20px rgba(70, 30, 110, 0.09);
}

.answer-button:disabled {
  cursor: default;
}

.answer-button.correct {
  color: #039548;
  border-color: #039548;
  background: #f1fff6;
}

.answer-button.wrong {
  color: #f9497a;
  border-color: #f9497a;
  background: #fff2f6;
}

.game-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.next-button,
.restart-page-button {
  text-decoration: none !important;
}

.next-button,
.restart-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease,
    border-color 0.15s ease,
    filter 0.15s ease;
}

.next-button {
  gap: 12px;
  min-width: 256px;
  min-height: 52px;
  padding: 13px 22px 13px 28px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(180deg, #9a48ff 0%, #6e25dc 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    0 6px 0 #5718c0,
    0 12px 22px rgba(93, 34, 180, 0.25);
}

.next-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.next-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.34),
    0 8px 0 #5718c0,
    0 14px 24px rgba(93, 34, 180, 0.28);
}

.next-button:not(:disabled):active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    0 2px 0 #5718c0,
    0 6px 14px rgba(93, 34, 180, 0.2);
}

.restart-page-button {
  gap: 8px;
  width: fit-content;
  min-width: 0;
  min-height: 38px;
  margin: 14px auto 0;
  padding: 8px 15px;
  border: 2px solid rgba(151, 71, 255, 0.28);
  border-radius: 999px;
  color: #6e25dc;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 3px 0 rgba(151, 71, 255, 0.16),
    0 8px 16px rgba(93, 34, 180, 0.08);
}

.restart-page-button:hover {
  transform: translateY(-1px);
  border-color: rgba(151, 71, 255, 0.5);
  filter: brightness(1.02);
}

.restart-page-button:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 1px 0 rgba(151, 71, 255, 0.16),
    0 5px 12px rgba(93, 34, 180, 0.08);
}

.next-icon,
.restart-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
}

.next-icon {
  width: 28px;
  height: 28px;
  background: #ffffff;
}

.restart-icon {
  width: 22px;
  height: 22px;
  background: #f4ecff;
}

.next-icon::before,
.restart-icon::before {
  content: "";
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.next-icon::before {
  width: 17px;
  height: 17px;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.8 3.9L11.9 9L6.8 14.1' stroke='%236E25DC' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.restart-icon::before {
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8.9A5.5 5.5 0 1 1 12.9 5' stroke='%236E25DC' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M13.1 2.7V5.5H10.3' stroke='%236E25DC' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.bottom-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 470px);
  margin: 36px auto 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 22px rgba(80, 36, 130, 0.08);
  overflow: hidden;
}

.bottom-check,
.bottom-trophy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-weight: 700;
}

.bottom-check {
  width: 24px;
  height: 24px;
  color: #ffffff;
  background: #08a95a;
}

.bottom-trophy {
  width: 32px;
  height: 32px;
  border: 3px solid #ffc400;
  background: #fff8db;
  font-size: 18px;
}

.bottom-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
}

.bottom-dot {
  flex: 0 1 13px;
  width: 13px;
  max-width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #efe2ff;
}

.bottom-dot.active {
  background: #b16cff;
  box-shadow: 0 0 0 3px #ead8ff;
}

.bottom-dot.correct {
  background: #08a95a;
}

.bottom-dot.wrong {
  background: #f9497a;
}

.panda-zone {
  position: relative;
  z-index: 2;
  min-width: 340px;
  padding-top: 0;
  text-align: center;
}

.speech-bubble {
  position: relative;
  width: 190px;
  min-height: 112px;
  margin: 0 auto 0;
  padding: 25px 18px;
  border-radius: 50%;
  color: #17112f;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(70, 30, 90, 0.1);
  text-align: center;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -17px;
  width: 28px;
  height: 28px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 30% 100%);
}

.speech-bubble::before {
  content: "⭐";
  position: absolute;
  right: -4px;
  bottom: 8px;
  font-size: 27px;
  transform: rotate(12deg);
}

.panda-image {
  display: block;
  width: min(34vw, 430px);
  max-width: 100%;
  height: auto;
  margin: -4px auto 0;
}

.result-title {
  margin-top: 34px;
  color: #17112f;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 38px;
  line-height: 34px;
  font-weight: 700;
}

.result-score {
  margin: 16px 0 10px;
  color: #7c35ff;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 56px;
}

.result-level {
  margin-bottom: 24px;
  color: #17112f;
  font-size: 18px;
  font-weight: 400;
}

.results-recap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
  text-align: left;
}

.results-column {
  padding: 14px;
  border: 2px solid rgba(151, 71, 255, 0.22);
  border-radius: 16px;
  background: #fbf7ff;
}

.results-column h3 {
  margin: 0 0 10px;
  color: #7c35ff;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.results-column ul {
  display: grid;
  gap: 8px;
  max-height: 190px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.results-column li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ffffff;
  font-size: 15px;
}

.results-column strong {
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-weight: 700;
}

.results-column em {
  color: #f9497a;
  font-size: 13px;
  font-style: normal;
}

.empty-result {
  color: #777777;
}

.end-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.next-level-button {
  min-width: 250px;
}

.max-level-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  color: #6e25dc;
  background: #f4ecff;
  font-family: "Fredoka Bold", Fredoka, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .peeksee-game {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
  }

  .question-card {
    max-width: 620px;
  }

  .panda-zone {
    min-width: 280px;
  }

  .panda-image {
    width: 300px;
  }
}

@media (max-width: 820px) {
  .peeksee-game {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
    padding: 8px 16px;
  }

  .game-main {
    order: 1;
  }

  .panda-zone {
    order: 2;
    min-width: 0;
  }

  .speech-bubble {
    width: 190px;
  }

  .panda-image {
    width: 260px;
  }

  .bottom-progress {
    order: -1;
    width: min(100%, 430px);
    margin: 0 auto 40px;
  }

  .bottom-dot {
    flex-basis: 11px;
    width: 11px;
    max-width: 11px;
    height: 11px;
  }
}

@media (max-width: 600px) {
  .peeksee-game {
    padding: 0 10px 14px;
    gap: 12px;
  }

  .question-card {
    min-height: auto;
    padding: 44px 14px 20px;
    border-radius: 20px;
  }

  .question-badge {
    top: -15px;
    left: 12px;
    right: 12px;
    gap: 8px;
  }

  .question-badge-main,
  .question-level-chip {
    min-height: 31px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
  }

  .question-badge-main {
    min-width: 112px;
  }

  .difficulty-title {
    margin-top: 22px;
    font-size: 28px;
  }

  .difficulty-button {
    min-height: 68px;
    font-size: 22px;
  }

  .question-text {
    gap: 8px;
    margin: 4px 0 22px;
    font-size: 42px;
  }

  .answers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
  }

  .answer-button {
    min-height: 62px;
    font-size: 28px;
  }

  .game-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .next-button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
  }

  .bottom-progress {
    width: 100%;
    margin: 0 auto 25px;
    gap: 7px;
    padding: 8px;
  }

  .bottom-dots {
    gap: 4px;
  }

  .bottom-dot {
    flex-basis: 8px;
    width: 8px;
    max-width: 8px;
    height: 8px;
  }

  .bottom-dot.active {
    box-shadow: 0 0 0 2px #ead8ff;
  }

  .bottom-check {
    width: 22px;
    height: 22px;
  }

  .bottom-trophy {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  :is(#peeksee-addition-game, #peeksee-multiplication-game, #peeksee-subtraction-game) .panda-zone {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "bubble panda"
      "restart restart";
    align-items: end;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: -18px;
    padding-right: 0;
    column-gap: 0;
  }

  .speech-bubble {
    grid-area: bubble;
    justify-self: end;
    width: 156px;
    min-height: 84px;
    margin: 0 -6px 14px 0;
    padding: 18px 14px;
    font-size: 13px;
  }

  .speech-bubble::before {
    right: auto;
    left: -2px;
    bottom: 8px;
    font-size: 22px;
    transform: rotate(-12deg);
  }

  .speech-bubble::after {
    right: -13px;
    bottom: 16px;
    width: 26px;
    height: 26px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
  }

  .panda-image {
    grid-area: panda;
    justify-self: end;
    width: 158px;
    margin: -28px 0 0;
  }

  :is(#peeksee-addition-game, #peeksee-multiplication-game, #peeksee-subtraction-game) .restart-page-button {
    grid-area: restart;
    justify-self: stretch;
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 44px;
    margin: 10px 0 0;
    padding: 10px 14px;
    font-size: 14px;
  }

  :is(#peeksee-addition-game, #peeksee-multiplication-game, #peeksee-subtraction-game) .restart-page-button[hidden] {
    display: none !important;
  }

  .end-actions {
    margin-top: 18px;
  }

  .next-level-button {
    width: 100%;
    min-width: 0;
  }

  .max-level-message {
    width: 100%;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.35;
  }

  .results-recap {
    grid-template-columns: 1fr;
  }

  .results-column ul {
    max-height: 150px;
  }
}

@media (max-width: 380px) {
  .question-text {
    font-size: 36px;
  }

  .question-badge-main,
  .question-level-chip {
    font-size: 11px;
    padding-inline: 8px;
  }

  .question-badge-main {
    min-width: 104px;
  }

  .answer-button {
    min-height: 58px;
    font-size: 25px;
  }

  .bottom-dot {
    flex-basis: 6px;
    width: 6px;
    max-width: 6px;
    height: 6px;
  }

  .speech-bubble {
    width: 140px;
    font-size: 12px;
  }

  .panda-image {
    width: 132px;
  }
}