
:root {
  --cloud-ink: #173d55;
  --app-gradient: linear-gradient(180deg, #a6dfff 0%, #e2f4ff 36%, #fffae9 77%, #fff9ef 100%);
  --bg-gradient: radial-gradient(ellipse at 20% 15%, #fff9e9 0, transparent 45%), linear-gradient(140deg, #b9e6fc, #edf6ed 58%, #fae8d2);
}
#phone-screen { background: var(--app-gradient); }
.cloud-home#screen-home {
  padding: 12px 18px calc(100px + var(--sa-bottom));
  color: var(--cloud-ink);
  background: radial-gradient(ellipse at 5% 36%, #ffffffa6, transparent 32%), var(--app-gradient);
  isolation: isolate;
  scroll-padding-bottom: calc(100px + var(--sa-bottom));
}
#screen-home #shared-topbar { padding-bottom: 6px; }
.cloud-home > * { flex-shrink: 0; }
.cloud-home button { font-family: var(--font-bangla); cursor: pointer; }
.cloud-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cloud-profile { display: flex; flex: 1 1 auto; align-items: center; gap: 9px; background: none; border: 0; color: inherit; text-align: left; min-width: 0; padding: 0; cursor: pointer; }
.cloud-avatar-wrap { position: relative; display: flex; flex: 0 0 49px; }
#home-user-avatar { width: 49px; height: 49px; border-radius: 50%; border: 3px solid #fffcf4; object-fit: cover; background: #fff7de; box-shadow: 0 3px 0 #6badd056, 0 5px 12px #42758d24; }
.cloud-identity { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
#home-user-name { font-size: 13px; font-weight: 800; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cloud-league { display: flex; align-items: center; gap: 4px; color: #42647b; font-size: 10px; line-height: 1.3; white-space: nowrap; }
.cloud-league b { font-weight: 600; }
.cloud-level-caption { font-family: var(--font-english); }
.cloud-league #home-league-trophy { display: none; }
.cloud-wallets { display: flex; flex-direction: column; gap: 5px; flex: 0 0 auto; }
.cloud-wallet { display: flex; align-items: center; gap: 4px; min-height: 29px; min-width: 119px; padding: 2px 3px 2px 5px; background: #fffdf2ed; border: 1px solid #ffffff; border-radius: 20px; box-shadow: 0 2px 0 #7cb4ce55; font: 700 12px var(--font-english); }
.cloud-wallet > span:nth-child(2) { flex: 1; min-width: 0; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cloud-wallet button { position: relative; border: 0; border-radius: 50%; width: 23px; height: 23px; color: white; background: linear-gradient(#56c49b, #218a72); box-shadow: inset 0 1px 1px #fff8, 0 2px 2px #25897033; font: 700 19px var(--font-english); line-height: 1; }
.cloud-wallet button::after { content: ''; position: absolute; inset: -3px -4px; }
.cloud-wallet--pass button { background: linear-gradient(#aa9ae6, #7667b4); }
.cloud-coin { width: 21px; height: 21px; border-radius: 50%; background: #ffd35e; border: 2px solid #f5b730; color: #ad6715; display: grid; place-items: center; font-size: 13px; box-shadow: inset 0 1px 1px #fffa; }
.cloud-gem { font-size: 23px; line-height: 21px; color: #9381d9; text-shadow: 1px 2px 0 #c9b8f4; }
.cloud-level { display: flex; align-items: center; width: 100%; height: 8px; margin: 0; padding: 0; border: 0; background: transparent; text-align: left; line-height: 0; cursor: pointer; }
.cloud-xp-track { display: block; height: 8px; width: 100%; background: #ffffffd9; border: 1px solid #93c7d9; border-radius: 10px; box-shadow: inset 0 1px 2px #4a859a26; overflow: hidden; }
.cloud-xp-track i { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, #ffc749, #70c88e); }
.cloud-settings { position: relative; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #3f6c84; background: #ffffff60; display: grid; place-items: center; pointer-events: auto; }
.cloud-notification { position: absolute; right: 0; top: 0; width: 11px; height: 11px; border: 2px solid white; border-radius: 50%; background: #f17b80; }
.cloud-hero { position: relative; height: 205px; margin: -12px -8px 0; text-align: center; }
.cloud-hero-art { position: absolute; top: 6px; left: 50%; width: min(100%, 292.5px); height: 195px; transform: translateX(-50%); pointer-events: none; }
.cloud-island { display: block; width: 100%; height: 100%; object-fit: contain; mask-image: radial-gradient(ellipse 18% 17% at 52% 12%, transparent 94%, #000 101%); }
.cloud-hero-cloud { position: absolute; top: 9px; left: 38%; width: 28%; height: auto; animation: cloudHeroFloat 5s ease-in-out infinite; }
@keyframes cloudHeroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.cloud-hero h1 { position: absolute; top: 89px; left: 12%; right: 12%; color: #fff0b6; font: 800 28px/1.3 'Anek Bangla', var(--font-bangla); letter-spacing: -.8px; text-shadow: 0 2px 0 #7c431e, 0 3px 0 #925627, 0 4px 6px #69431770; }
.cloud-hero p { position: absolute; bottom: 0; left: 0; right: 0; color: #426473; font-size: 12px; font-weight: 600; }
.cloud-sky-puff { position: absolute; width: 64px; height: 23px; border-radius: 50px; background: #ffffffa6; box-shadow: 0 8px 15px #fff5; z-index: -1; }
.cloud-sky-puff::before { content: ''; position: absolute; width: 31px; height: 31px; border-radius: 50%; background: #ffffffe6; left: 11px; top: -13px; }
.cloud-sky-puff--left { top: 55px; left: -8px; transform: scale(.85); }
.cloud-sky-puff--right { top: 28px; right: 0; transform: scale(.65); }
.cloud-section-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; padding: 13px 3px 9px; color: #50727d; }
.cloud-section-spark { color: #d3a751; font-size: 16px; }
#home-modes.cloud-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; width: 100%; }
.cloud-mode { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; border: 1px solid #fff9; border-radius: 24px; padding: 5px 7px 13px; color: #24474d; box-shadow: inset 0 2px 2px #ffffff9c, inset 0 -3px 1px #498a7924, 0 5px 8px #58828816; min-height: 145px; }
.cloud-mode--solo { background: linear-gradient(145deg, #b6efda, #85d8bc); }
.cloud-mode--friends { background: linear-gradient(145deg, #ffdfaf, #ffc48f); color: #684128; }
.cloud-mode--knowledge { background: linear-gradient(145deg, #e3d8ff, #c5b4ec); color: #443e72; }
.cloud-mode--couple { background: linear-gradient(145deg, #ffdfdf, #f6b7cb); color: #773f58; }
.cloud-mode img { display: block; width: 119px; height: 80px; object-fit: contain; pointer-events: none; }
.cloud-mode strong { font-size: 20px; font-weight: 800; line-height: 1.5; }
.cloud-mode small { font-size: 10px; line-height: 1.7; font-weight: 500; }
.cloud-mode-tag { position: absolute; top: 8px; left: 10px; font-size: 8px; color: #833f59; padding: 1px 5px; background: #ffffff85; border-radius: 10px; }
.cloud-mode .fee-pill { margin: 4px 0 0; font-size: 10px; }
.cloud-mode:focus-visible, .cloud-poll:focus-visible { outline: 3px solid #156da6; outline-offset: 3px; }
@media (hover: hover) { .cloud-mode:hover { transform: translateY(-3px); box-shadow: inset 0 2px 2px #ffffff9c, inset 0 -3px 1px #498a7924, 0 9px 15px #58828829; } }
.cloud-poll { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 16px; padding: 6px 14px 6px 7px; min-height: 74px; border: 1px solid #fff; border-radius: 22px; background: linear-gradient(120deg, #fffefa, #eff7ff); box-shadow: inset 0 -3px 1px #cedee873, 0 4px 9px #4d708314; color: #234f70; text-align: left; }
.cloud-poll img { width: 61px; height: 61px; object-fit: contain; }
.cloud-poll > span:nth-child(2) { flex: 1; }
.cloud-poll strong, .cloud-poll small { display: block; }
.cloud-poll strong { font-size: 18px; line-height: 1.5; font-weight: 800; }
.cloud-poll small { font-size: 10px; color: #587586; line-height: 1.7; }
.cloud-poll-arrow { font: 34px var(--font-english); }
.cloud-poll .cloud-notification { top: 10px; right: 10px; }
.cloud-footer { text-align: center; padding-top: 16px; }
.cloud-footer p { font-size: 11px; color: #6a858b; }
.cloud-footer p span { color: #d98691; }
.cloud-footer #build-chip { margin: 5px 0 0; padding: 2px 8px; background: none; border: 0; font: 9px var(--font-english); color: #6a7d84; min-height: 24px; }

.app-nav__btn--cloud { display: none; }
#phone-screen:has(#screen-home.active) .app-nav { border-radius: 25px 25px 0 0; background: #fffcf8; padding-top: 7px; box-shadow: 0 -4px 18px #67899412; border-top: 1px solid white; }
#phone-screen:has(#screen-home.active) .app-nav__btn--back { display: none; }
#phone-screen:has(#screen-home.active) .app-nav__btn--cloud { display: flex; }
#phone-screen:has(#screen-home.active) .app-nav__tile { width: 40px; height: 36px; background: none; box-shadow: none; color: #8c91a0; border-radius: 12px; }
#phone-screen:has(#screen-home.active) .app-nav__btn--home .app-nav__tile { color: #2994cd; background: #d9f0fc; box-shadow: inset 0 1px 1px #fff, 0 2px 0 #bfdeed; }
#phone-screen:has(#screen-home.active) .app-nav__label { color: #65798c; font-weight: 600; }
#phone-screen:has(#screen-home.active) .app-nav__btn--home .app-nav__label { color: #1871a5; }
.app-nav__btn--cloud-board { order: 1; }
#phone-screen:has(#screen-home.active) .app-nav__btn--store { order: 2; }
#phone-screen:has(#screen-home.active) .app-nav__btn--settings { order: 3; }

.glass-card { border-color: #fff; box-shadow: inset 0 1px 0 #fff, 0 5px 18px #4c829015; }
#screen-game .question-card { background: linear-gradient(145deg, #fffcf0, #fff0d4); border: 3px solid #f2d3a2; border-radius: 25px; box-shadow: inset 0 1px 0 #fff, 0 5px 0 #dcb98855, 0 12px 24px #72867a13; color: #594a32; }
#screen-game .game-header { background: #d1eeff !important; }
#screen-game .answer-input { border-radius: 20px; background: #fffefa; border-color: #d5e7df; }
#screen-couple { background: linear-gradient(#dcedff, #fff2ed 45%, #fffaec); }
.couple-home-icon, .couple-art { color: #c36f96; }
@media (max-width: 480px) {
  .cloud-home#screen-home { padding-top: 15px; }
}
@media (max-width: 360px) {
  .cloud-home#screen-home { padding-left: 13px; padding-right: 13px; }
  .cloud-mode strong { font-size: 18px; }
  .cloud-mode small { font-size: 9px; }
  .cloud-mode { border-radius: 21px; }
  .cloud-hero h1 { font-size: 27px; }
}
@media (max-height: 740px) {
  .cloud-hero { height: 180px; margin-top: -12px; }
  .cloud-hero-art { width: min(100%, 255px); height: 170px; }
  .cloud-hero h1 { top: 77px; font-size: 25px; }
  .cloud-hero p { font-size: 11px; }
  .cloud-mode { min-height: 145px; }
  .cloud-mode img { height: 80px; }
}

#screen-game .question-card {
  position: relative;
  overflow: visible;
  background: url('assets/cloud-play/question-frame.webp') center / 100% 100% no-repeat;
  padding: 43px 60px 42px;
  border: 0;
  border-radius: 0;
  min-height: 212px;
  box-shadow: none;
  margin-top: 9px !important;
}
#screen-game #game-question-text {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
#screen-game .question-card::before, #screen-game .question-card::after { display: none; }
#screen-game .timer-badge {
  position: absolute;
  z-index: 3;
  top: -24px;
  right: 9px;
  width: 76px;
  height: 86px;
  background: url('assets/cloud-play/timer.webp') center / contain no-repeat;
  filter: drop-shadow(0 4px 5px #31749d5e);
}
#screen-game .timer-badge::before {
  content: '';
  position: absolute;
  left: 50%; top: 54%;
  width: 53%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  border: 2px solid #204c75;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 1px 2px #d7e7f2;
}
#screen-game .timer-badge > svg { opacity: 0; pointer-events: none; }
#screen-game #timer-text {
  left: 50% !important; top: 54% !important;
  width: 53% !important; height: 53% !important;
  transform: translate(-50%, -50%);
  z-index: 2;
  padding: 0 !important;
  font: 850 24px/1 var(--font-english) !important;
  color: #183e5b !important;
  background: transparent !important;
}
#screen-game .user-badge { display: none !important; }


#screen-loading { background: var(--app-gradient) !important; }
#screen-loading .loading-island-art { position: relative; width: min(100%, 315px); height: 210px; margin: 0 auto -14px; }
#screen-loading .loading-island { display: block; width: 100%; height: 100%; object-fit: contain; }
#loading-island-title { position: absolute; top: 43%; left: 26%; width: 45%; color: #fff0b6; font: 800 23px/1.3 'Anek Bangla', var(--font-bangla); text-shadow: 0 2px 0 #7c431e, 0 3px 4px #69431780; white-space: nowrap; }
#loading-island-title[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .cloud-hero-cloud { animation: none; } }
#screen-loading #loading-title { color: #256183 !important; text-shadow: 0 2px 0 #fff !important; }
#screen-loading #loading-sub { color: #50727d !important; }
#screen-loading #loading-percentage { color: #256183 !important; }
#screen-loading > div:nth-of-type(2) { background: rgba(255,255,255,.72) !important; border-color: #fff !important; box-shadow: inset 0 1px 2px #4a859a24; }
.modal-content { border-radius: 27px; border-color: #fff; box-shadow: 0 18px 55px #22465d35, inset 0 2px 0 #ffffffc9; }
#screen-login .login-logo-container::before { content: ''; display: block; width: 100%; height: 170px; background: url('assets/cloud-play/hero.webp') center / contain no-repeat; margin: 0 auto 4px; }
#screen-login .login-logo { color: #256183; text-shadow: 0 2px 0 #fff; }
#screen-login .login-logo-container { margin-bottom: 20px; }
#screen-login { justify-content: flex-start; padding-top: 28px; }
#screen-login .login-illustration { display: none; }
#screen-login .login-logo-container { animation: none; flex-shrink: 0; }
#screen-login .login-buttons-container { flex-shrink: 0; margin-top: 15px; }
#screen-login .btn-login { border-radius: 19px; box-shadow: inset 0 1px 0 #fff9, 0 4px 0 #76a8a52a; }
#screen-login .btn-guest { background: linear-gradient(#90ddc4, #60c6a6); color: #174c43; border: 1px solid #c7f4e6; }
#screen-gk-quiz .glass-card:has(#gkq-question) { background: url('assets/cloud-play/question-frame.webp') center / 100% 100% no-repeat; padding: 38px 48px 39px !important; border: 0; box-shadow: none; min-height: 205px; flex: 0 0 auto; display: flex; align-items: center; }
#gkq-question { min-width: 0; width: 100%; overflow-wrap: anywhere; }
#screen-couple .couple-art { font-size: 0; height: 92px; background: url('assets/cloud-play/couple.webp') left center / contain no-repeat; }
#screen-gk {
  padding: 14px 15px calc(102px + var(--sa-bottom)) !important;
  color: var(--cloud-ink);
  background:
    radial-gradient(circle at 12% 22%, #ffffffaa 0 8%, transparent 22%),
    linear-gradient(180deg, #a6dfff 0%, #e7f6ff 43%, #fff9e9 100%);
  overflow-x: hidden;
}
#screen-gk .res-strip { position: relative; z-index: 5; margin-bottom: 8px; }
#screen-gk .hdr-row2 { position: relative; z-index: 5; margin-bottom: 0; }


.gk-treehouse {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 610px;
  margin: -4px -8px 0;
  padding: 68px 12px 62px;
}
.gk-treehouse::before,
.gk-treehouse::after {
  content: '';
  position: absolute;
  z-index: -2;
  width: 82px;
  height: 31px;
  border-radius: 999px;
  background: #ffffffb8;
  box-shadow: 0 9px 20px #fff8;
}
.gk-treehouse::before { top: 70px; left: -34px; }
.gk-treehouse::after { top: 154px; right: -43px; transform: scale(.72); }
.gk-treehouse__scene {
  position: absolute;
  z-index: -1;
  top: 18px;
  left: 50%;
  width: 116%;
  height: 590px;
  object-fit: contain;
  transform: translateX(-50%);
  pointer-events: none;
}
.gk-treehouse__title {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 10%;
  right: 10%;
  min-height: 78px;
  padding: 9px 18px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff0bc;
  text-align: center;
  background: linear-gradient(180deg, #b96b31, #8d4d25);
  border: 3px solid #d98a49;
  border-radius: 18px 18px 24px 24px;
  box-shadow: inset 0 2px 0 #f6bc77, inset 0 -4px 0 #6e391e, 0 8px 16px #59432635;
  transform-origin: 50% -18px;
}
.gk-treehouse__title::before,
.gk-treehouse__title::after {
  content: '';
  position: absolute;
  top: -20px;
  width: 4px;
  height: 24px;
  border-radius: 3px;
  background: #75502f;
}
.gk-treehouse__title::before { left: 24%; transform: rotate(7deg); }
.gk-treehouse__title::after { right: 24%; transform: rotate(-7deg); }
.gk-treehouse__title strong {
  font: 800 29px/1.25 'Anek Bangla', var(--font-bangla);
  letter-spacing: -.5px;
  text-shadow: 0 2px 0 #6b351d, 0 4px 8px #4d2d2366;
}
.gk-treehouse__title span { color: #fff7dc; font-size: 11px; font-weight: 700; }
.gk-treehouse-modes {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding-top: 120px;
}
#screen-gk .gk-treehouse .gk-mode-btn {
  width: 88%;
  min-height: 104px;
  margin: 0;
  padding: 15px 42px 15px 82px;
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
  border: 3px solid;
  border-radius: 25px;
  color: #244a3c;
  text-align: left;
  box-shadow: inset 0 2px 1px #fff, inset 0 -4px 0 #54714c26, 0 9px 20px #36573e30;
  transform-origin: center;
}
#screen-gk .gk-mode-btn--knockout { align-self: flex-start; background: linear-gradient(145deg, #fffef5, #eaffdf); border-color: #66b75e; }
#screen-gk .gk-mode-btn--classic { align-self: flex-end; background: linear-gradient(145deg, #fffdf9, #f1e6ff); border-color: #a678dc; color: #573a83; }
#screen-gk .gk-mode-btn--textbook { align-self: center; background: linear-gradient(145deg, #fffef9, #e5f2ff); border-color: #5f9fde; color: #245a8b; }
.gk-mode-copy { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 3px; }
.gk-mode-copy strong { font-size: 22px; font-weight: 900; line-height: 1.25; }
.gk-mode-copy small { font-size: 11.5px; font-weight: 700; line-height: 1.45; opacity: .82; }
.gk-mode-go {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffffc9;
  color: currentColor;
  font: 900 28px/1 var(--font-english);
  box-shadow: 0 3px 9px #294d4930;
}
.gk-mode-art {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 64px;
  height: 64px;
  margin-top: -32px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.gk-mode-art--shield {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #ff6c72;
  font-size: 16px;
  background: linear-gradient(145deg, #f7d66f, #e7a92d);
  clip-path: polygon(50% 0, 92% 15%, 85% 68%, 50% 100%, 15% 68%, 8% 15%);
  filter: drop-shadow(0 4px 4px #2f5e3433);
}
.gk-mode-art--shield::before { content: ''; position: absolute; inset: 6px; clip-path: inherit; background: linear-gradient(160deg,#64c77c,#218c56); z-index: -1; }
.gk-mode-art--shield i { font-style: normal; text-shadow: 0 2px 0 #a62b42; }
.gk-mode-art--brain::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 2px dashed #c69af0;
  border-radius: 50%;
  opacity: .75;
}
.gk-mode-art--brain img { width: 70px; height: 58px; object-fit: contain; filter: drop-shadow(0 5px 5px #5a36763a); }
.gk-mode-art--book { perspective: 150px; filter: drop-shadow(0 5px 5px #244f7433); }
.gk-mode-art--book i {
  position: absolute;
  top: 11px;
  width: 29px;
  height: 40px;
  border: 2px solid #4d8bc8;
  background: repeating-linear-gradient(180deg,#fffdf0 0 7px,#b7d2e7 8px 9px);
}
.gk-mode-art--book i:first-child { left: 4px; border-radius: 7px 2px 3px 8px; transform: rotate(-7deg); transform-origin: right center; }
.gk-mode-art--book i:nth-child(2) { right: 4px; border-radius: 2px 7px 8px 3px; transform: rotate(7deg); transform-origin: left center; }
.gk-mode-art--book b { position: absolute; top: 10px; bottom: 10px; left: 31px; width: 3px; border-radius: 3px; background: #2f6ca9; }
#screen-gk .gk-treehouse .fee-emboss { right: -34px; bottom: 9px; width: 125px; color: #fff; background: #30546a8f; }


#screen-gk.active .gk-treehouse__scene { animation: gkTreehouseGrow .9s cubic-bezier(.2,.8,.2,1) both; }
#screen-gk.active .gk-treehouse__title { animation: gkTreehouseSign .9s cubic-bezier(.22,1.25,.36,1) .12s both; }
#screen-gk.active .gk-mode-btn--knockout { animation: gkModeLeafIn .72s cubic-bezier(.2,.9,.2,1) .34s backwards; }
#screen-gk.active .gk-mode-btn--classic { animation: gkModeLeafIn .72s cubic-bezier(.2,.9,.2,1) .48s backwards; }
#screen-gk.active .gk-mode-btn--textbook { animation: gkModeLeafIn .72s cubic-bezier(.2,.9,.2,1) .62s backwards; }
.gk-mode-btn::after {
  content: '';
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -35%;
  width: 18%;
  background: linear-gradient(90deg,transparent,#fff9,transparent);
  transform: rotate(18deg);
  pointer-events: none;
}
.gk-mode-btn--knockout::after { animation: gkPremiumSweep 4.8s ease-in-out 1.2s infinite; }
.gk-mode-btn--classic::after { animation: gkPremiumSweep 5.4s ease-in-out 2.1s infinite; }
.gk-mode-btn--textbook::after { animation: gkPremiumSweep 5.8s ease-in-out 2.9s infinite; }
.gk-mode-art--shield { animation: gkShieldFloat 2.8s ease-in-out 1.1s infinite; }
.gk-mode-art--shield i:nth-child(1) { animation: gkHeartBeat 2.4s ease-in-out 1.2s infinite; }
.gk-mode-art--shield i:nth-child(2) { animation: gkHeartBeat 2.4s ease-in-out 1.35s infinite; }
.gk-mode-art--shield i:nth-child(3) { animation: gkHeartBeat 2.4s ease-in-out 1.5s infinite; }
.gk-mode-art--brain::before { animation: gkBrainHalo 8s linear infinite; }
.gk-mode-art--brain img { animation: gkBrainFloat 3.2s ease-in-out infinite; }
.gk-mode-art--book i:nth-child(2) { animation: gkPageTurn 3.8s ease-in-out 1.2s infinite; }

@keyframes gkTreehouseGrow { from { opacity: 0; transform: translateX(-50%) translateY(24px) scale(.9); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
@keyframes gkTreehouseSign { 0% { opacity: 0; transform: translateY(-24px) rotate(-6deg); } 58% { opacity: 1; transform: translateY(0) rotate(2.5deg); } 78% { transform: rotate(-1.2deg); } 100% { opacity: 1; transform: rotate(0); } }
@keyframes gkModeLeafIn { from { opacity: 0; transform: translateY(24px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes gkPremiumSweep { 0%,68% { left:-35%; opacity:0; } 74% { opacity:.9; } 88%,100% { left:125%; opacity:0; } }
@keyframes gkShieldFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1deg); } }
@keyframes gkHeartBeat { 0%,72%,100% { transform: scale(1); } 78% { transform: scale(1.28); } 84% { transform: scale(.94); } 90% { transform: scale(1.12); } }
@keyframes gkBrainHalo { to { transform: rotate(360deg); } }
@keyframes gkBrainFloat { 0%,100% { transform: translateY(1px) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1.5deg); } }
@keyframes gkPageTurn { 0%,65%,100% { transform: rotate(7deg) rotateY(0); } 76% { transform: rotate(4deg) rotateY(-34deg); } 88% { transform: rotate(7deg) rotateY(0); } }

@media (hover:hover) {
  #screen-gk .gk-treehouse .gk-mode-btn:hover { transform: translateY(-3px); box-shadow: inset 0 2px 1px #fff, inset 0 -4px 0 #54714c26, 0 14px 26px #36573e3d; }
}
@media (max-height: 740px) {
  .gk-treehouse { min-height: 560px; padding-top: 62px; }
  .gk-treehouse__scene { height: 540px; }
  .gk-treehouse-modes { padding-top: 104px; gap: 12px; }
  #screen-gk .gk-treehouse .gk-mode-btn { min-height: 92px; }
}
@media (max-width: 350px) {
  #screen-gk .gk-treehouse .gk-mode-btn { width: 93%; padding-left: 72px; }
  .gk-mode-copy strong { font-size: 20px; }
  .gk-treehouse__title strong { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  #screen-gk.active .gk-treehouse__scene,
  #screen-gk.active .gk-treehouse__title,
  #screen-gk.active .gk-mode-btn,
  .gk-mode-btn::after,
  .gk-mode-art--shield,
  .gk-mode-art--shield i,
  .gk-mode-art--brain::before,
  .gk-mode-art--brain img,
  .gk-mode-art--book i:nth-child(2) { animation: none !important; }
}
@media (min-width: 481px) and (max-width: 960px) and (max-height: 500px) {
  #phone-container { width: min(100%, 520px); height: 100dvh; padding: 0; border-radius: 0; zoom: 1 !important; box-shadow: none; }
  #phone-screen { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #home-modes .cloud-mode { transition: none; }
  #home-modes .cloud-mode:hover, #home-modes .cloud-mode:active { transform: none; }
}


#screen-gk-quiz {
  isolation: isolate;
  overflow-x: hidden;
  padding: 14px 17px calc(35px + var(--sa-bottom)) !important;
  color: #173d55;
  background:
    radial-gradient(ellipse at 20% 22%, #ffffffa6 0 10%, transparent 27%),
    radial-gradient(ellipse at 86% 36%, #ffffff8c 0 9%, transparent 25%),
    linear-gradient(180deg, #80c9f7 0%, #c2e8ff 43%, #fff1d4 78%, #eff7db 100%);
}
#screen-gk-quiz::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 130px;
  height: 92px;
  background: url('assets/cloud-play/cloud.webp') center / contain no-repeat;
  opacity: .8;
  pointer-events: none;
}
#screen-gk-quiz > * { position: relative; z-index: 1; flex-shrink: 0; }
.gkq-header { display: flex; align-items: center; gap: 10px; min-height: 62px; }
#screen-gk-quiz .btn-back-premium { flex: 0 0 40px; width: 40px; height: 40px; background: #f8fdff; }
.gkq-heading { flex: 1; min-width: 0; text-align: center; line-height: 1.25; }
.gkq-heading-main { font-size: 21px; font-weight: 850; color: #fff; text-shadow: 0 2px 0 #3177ac, 0 3px 8px #194d8480; }
#gkq-title { font-size: 11px; font-weight: 750; color: #205579; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#gkq-sub { font-size: 10px; font-weight: 600; color: #456d7e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#gkq-sub:empty { display: none; }
#screen-gk-quiz #gkq-pass-pill { flex: 0 0 auto; min-width: 74px; height: 31px; padding: 2px 2px 2px 7px; border: 1px solid #fff; background: #fffdf3f2; border-radius: 20px; box-shadow: 0 2px 0 #518cad66; color: #1a4968; font-size: 12px; }
#screen-gk-quiz #gkq-pass-pill .res__icon { width: 15px; height: 15px; fill: #8e79d6; }
#screen-gk-quiz #gkq-pass-pill .res__add { width: 23px; height: 23px; background: linear-gradient(#53c399,#20886f); border: 0; border-radius: 50%; color: #fff; }
.gkq-progress-head { display: flex; align-items: center; gap: 8px; margin: 13px 1px 5px; min-height: 24px; color: #fff; text-shadow: 0 1px 2px #246b9999; font-weight: 800; font-size: 12px; }
#gkq-count { white-space: nowrap; }
#gkq-count::before { content: 'প্রশ্ন '; }
#gkq-knockout-score { align-items: center; gap: 3px; padding: 3px 7px; color: #fff4ba; background: #22669a70; border: 1px solid #ffffff7a; border-radius: 20px; font-size: 10px; }
#gkq-tally { margin-left: auto; color: #fff3a2; white-space: nowrap; font-size: 11px; }
.gkq-progress-track { height: 8px; background: #4786b1b8; border: 1px solid #3685b1aa; border-radius: 99px; box-shadow: inset 0 2px 3px #2b6e9870; overflow: hidden; }
#gkq-progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#fff,#e5fbff); box-shadow: 0 0 5px #fff9; transition: width .3s ease; }
#screen-gk-quiz .gkq-map { min-height: 31px; margin: 6px 0 1px; padding: 3px 2px; opacity: .8; }
#screen-gk-quiz .gkq-node { width: 18px; height: 18px; flex-basis: 18px; border-radius: 5px; }
#screen-gk-quiz .gkq-node span { font-size: 8px; }
#screen-gk-quiz .gkq-link { height: 2px; }
.gkq-board-wrap { margin: 11px -5px 13px; }
#screen-gk-quiz .gkq-board { width: 100%; min-height: 205px; margin: 0 !important; justify-content: center; filter: drop-shadow(0 8px 7px #73604b26); }
#gkq-question { padding: 7px 2px; max-width: 100%; text-align: center; color: #332919 !important; font-size: 16px; line-height: 1.42; font-weight: 700; }
.gkq-clock { position: absolute; top: -21px; right: -1px; width: 76px; height: 86px; background: url('assets/cloud-play/timer.webp') center / contain no-repeat; filter: drop-shadow(0 4px 5px #31749d5e); }
.gkq-clock::before { content: ''; position: absolute; left: 50%; top: 54%; width: 53%; aspect-ratio: 1; transform: translate(-50%, -50%); box-sizing: border-box; border: 2px solid #204c75; border-radius: 50%; background: #fff; box-shadow: inset 0 1px 2px #d7e7f2; }
.gkq-clock svg { position: absolute; inset: 16px auto auto 17px; opacity: 0; pointer-events: none; }
#gkq-timer { position: absolute; left: 50%; top: 54%; width: 53%; height: 53%; transform: translate(-50%, -50%); display: grid; place-items: center; padding: 0; font: 850 24px/1 var(--font-english); color: #183e5b; background: none !important; }
#screen-gk-quiz #gkq-options { gap: 8px !important; }
#screen-gk-quiz .gkq-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 55px; padding: 8px 38px 8px 12px; border: 1.5px solid #dbe1eb; border-radius: 999px; color: #233b58; background: linear-gradient(180deg,#fffefe,#f6f8ff); box-shadow: inset 0 2px 0 #fff, 0 3px 4px #5b85a02b; }
#screen-gk-quiz .gkq-opt::before { content: attr(data-letter); display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 50%; color: #fff; font: 750 17px var(--font-english); background: linear-gradient(160deg,#8baded,#385ead); border: 1px solid #fff; box-shadow: 0 2px 4px #2853895c; }
#screen-gk-quiz .gkq-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#screen-gk-quiz .gkq-opt.is-right { background: linear-gradient(180deg,#e0fff0,#c4f2db); border-color: #8cdbbd; color: #205542; }
#screen-gk-quiz .gkq-opt.is-right::before { background: linear-gradient(#58b984,#138761); }
#screen-gk-quiz .gkq-opt.is-right::after { content: '✓'; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #158461; color: #fff; font: 800 15px var(--font-english); }
#screen-gk-quiz .gkq-opt.is-wrong { background: #fff0ef; border-color: #e98b89; color: #8b3432; }
#screen-gk-quiz .gkq-opt.is-wrong::before { background: linear-gradient(#e18986,#bb5454); }
#screen-gk-quiz .gkq-opt.is-dim { opacity: .55; }
#screen-gk-quiz #gk-help-row { margin-top: 10px !important; }
#screen-gk-quiz #gkq-feedback { border-radius: 20px !important; }
#screen-gk-quiz #gkq-next { border-radius: 24px !important; background: linear-gradient(#42bb8c,#119269) !important; }

#screen-gk-quiz[data-mode="classic"] .gkq-progress-head { margin-top: 5px; }
#screen-gk-quiz[data-mode="knockout"] .gkq-map { min-height: 23px; margin: 2px 0 0; }
#screen-gk-quiz[data-mode="knockout"] .gkq-board-wrap { margin-top: 0; }

#screen-gk-quiz[data-mode="knockout"] #gk-help-row { display: flex; align-items: stretch; justify-content: flex-start; flex-wrap: nowrap; gap: 5px; }
#screen-gk-quiz[data-mode="knockout"] #gk-help-row .help-btn { flex: 0 0 auto; width: fit-content; min-width: 0; min-height: 39px; justify-content: center; gap: 2px; padding: 9px 5px; font-size: clamp(8px,2.5vw,10px); }
#screen-gk-quiz[data-mode="knockout"] #gk-help-row .help-btn svg { width: 9px; height: 9px; flex: 0 0 9px; }
#screen-gk-quiz[data-mode="knockout"] #gk-help-row .help-btn__cost { padding: 1px 3px; font-size: 9px; }
#screen-gk-quiz .gkq-opt.is-timeout { padding-right: 43px; }
#screen-gk-quiz[data-mode="knockout"] .gkq-opt.is-right.is-timeout { border: 2px solid #eeaaaa; box-shadow: inset 0 0 0 1px #fff9, 0 2px 6px #d77b7b40; }
#screen-gk-quiz .gkq-opt.is-timeout::after { display: none; }
#screen-gk-quiz .gkq-timeout-mark { position: absolute; right: 12px; top: 50%; width: 24px; height: 24px; transform: translateY(-50%); color: #dc2626; pointer-events: none; }
#screen-gk-quiz .gkq-timeout-mark svg { display: block; width: 100%; height: 100%; }

#screen-gk-quiz:not(.gkq-help-ready) #gk-help-row { visibility: hidden; pointer-events: none; }
#screen-gk-quiz.gkq-help-enter #gk-help-row .help-btn { animation: gkHelpWave .54s cubic-bezier(.2,.8,.2,1) both; }
#screen-gk-quiz.gkq-help-enter #gk-help-row .help-btn:nth-child(2) { animation-delay: .09s; }
#screen-gk-quiz.gkq-help-enter #gk-help-row .help-btn:nth-child(3) { animation-delay: .18s; }
@keyframes gkHelpWave { from { opacity: 0; transform: translateX(-12px) translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #screen-gk-quiz.gkq-help-enter #gk-help-row .help-btn { animation: none; } }
@media (max-width: 350px) {
  #screen-gk-quiz { padding-left: 11px !important; padding-right: 11px !important; }
  #screen-gk-quiz .gkq-board { min-height: 190px; padding: 36px 46px !important; }
  .gkq-clock { width: 70px; height: 79px; }
  #screen-game .timer-badge { width: 70px; height: 79px; }
  #screen-gk-quiz .gkq-opt { min-height: 52px; gap: 9px; padding-left: 9px; }
}
