:root {
  --bg-space: #060818;
  --bg-space-alt: #0a1030;
  --bg-panel: rgba(10, 14, 35, 0.82);
  --accent: #5c7aff;
  --accent-strong: #405bff;
  --text-primary: #f4f6ff;
  --text-secondary: rgba(244, 246, 255, 0.72);
  --border-soft: rgba(92, 122, 255, 0.25);
  --shadow-soft: 0 18px 45px rgba(9, 11, 28, 0.3);
  --shadow-strong: 0 8px 20px rgba(9, 11, 28, 0.2);
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: 'Roboto', sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(92, 122, 255, 0.18), transparent 45%),
              radial-gradient(circle at 80% 10%, rgba(92, 122, 255, 0.12), transparent 55%),
              linear-gradient(135deg, var(--bg-space), var(--bg-space-alt));
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-bottom: clamp(72px, 12vh, 128px);
}

.frameStyle {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.fullStyle {
  /* position: fixed; */
  /* border: 1px black solid; */
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.bgSpace {
  background: linear-gradient(180deg, rgba(9, 11, 35, 0.9) 0%, rgba(14, 18, 48, 0.75) 50%, rgba(6, 8, 24, 0.9) 100%);
  opacity: 0;
}

.bgEarth {
  background: radial-gradient(circle, rgba(17, 22, 56, 0.8) 0%, rgba(10, 13, 40, 0.9) 55%, rgba(6, 8, 24, 0.95) 100%);
}

.fullBg {
  width: 100%;
  height: 100%;
  margin: 0;
  position: absolute;
  left: 0;
  top: 0;
  z-index: -2;
}

#sotu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

#sotu canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

#buttons {
  position: fixed;
  top: clamp(18px, 2.5vw, 26px);
  right: clamp(18px, 5vw, 32px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
  z-index: 3;
}

#startBtn {
  width: clamp(200px, 32vw, 260px);
  padding: clamp(14px, 1.8vw, 18px) clamp(20px, 4vw, 28px);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: none;
  border-radius: 999px;
  box-shadow: 0 20px 40px rgba(92, 122, 255, 0.35);
  position: absolute;
  right: clamp(18px, 4vw, 32px) !important;
  bottom: clamp(18px, 4vw, 32px) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: transform 180ms ease, box-shadow 220ms ease;
  z-index: 3;
}

#startBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 56px rgba(92, 122, 255, 0.45);
}

#supportEmail,
#iosLink,
#youtubeLink {
  display: none !important;
}

.backarrow {
  position: fixed;
  font-family: 'Roboto', sans-serif;
  top: clamp(18px, 6vw, 40px);
  left: clamp(18px, 6vw, 36px);
  font-size: clamp(0.8rem, 2.8vw, 0.95rem);
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(9, 11, 35, 0.5);
  border: 1px solid rgba(244, 246, 255, 0.12);
  transition: color 180ms ease, background 180ms ease, border 180ms ease, transform 200ms ease;
  z-index: 3;
}

.backarrow:hover {
  color: var(--text-primary);
  background: rgba(92, 122, 255, 0.25);
  border-color: rgba(92, 122, 255, 0.45);
  transform: translateY(-2px);
}

dialog {
  background: rgba(255, 255, 255, 0.92);
  color: #121212;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  width: min(680px, 92vw) !important;
  height: auto !important;
  padding: clamp(24px, 4vw, 48px);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
  align-self: center;
}

.my-modal {
  position: relative;
  overflow: visible;
  padding: clamp(32px, 5vw, 48px) clamp(28px, 6vw, 52px);
  background: rgba(15, 18, 40, 0.72);
  border-radius: 26px;
  border: 1px solid rgba(122, 162, 255, 0.45);
  box-shadow:
    0 32px 85px rgba(6, 10, 30, 0.48),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
}

.my-modal::before {
  content: "";
  position: absolute;
  inset: -120px;
  background:
    radial-gradient(circle at 20% 0%, rgba(146, 219, 255, 0.25), transparent 60%),
    radial-gradient(circle at 80% 0%, rgba(210, 143, 255, 0.2), transparent 55%);
  filter: blur(70px);
  opacity: 0.8;
  z-index: -1;
}

.info-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 460px);
  width: auto;
}

.info-modal::backdrop {
  background: rgba(6, 8, 24, 0.65);
}

.info-shell {
  background: rgba(16, 20, 48, 0.78);
  border-radius: 24px;
  padding: clamp(20px, 6vw, 32px);
  box-shadow: 0 24px 48px rgba(7, 10, 24, 0.45);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vw, 18px);
  max-width: min(84vw, 420px);
}

#infoTitle {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  text-align: center;
  color: #f5f8ff;
  text-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(120, 172, 255, 0.42);
}

#infoBody {
  margin: 0;
  font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  line-height: 1.6;
  color: rgba(223, 232, 255, 0.78);
  white-space: pre-wrap;
  text-align: left;
}

#infoClose {
  border: none;
  border-radius: 999px;
  padding: clamp(10px, 3vw, 14px);
  font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 32px rgba(64, 91, 255, 0.35);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 200ms ease;
}

#infoClose:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(64, 91, 255, 0.45);
}

.thanks-note {
  margin: clamp(12px, 4vw, 20px) 0 0;
  text-align: center;
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  color: rgba(223, 232, 255, 0.78);
  letter-spacing: 0.05em;
}

.mobile-slider {
  position: fixed;
  left: 50%;
  bottom: calc(clamp(16px, 7vw, 36px) + 64px);
  transform: translateX(-50%);
  width: min(92vw, 420px);
  padding: clamp(12px, 4vw, 20px) clamp(16px, 6vw, 28px);
  border-radius: 999px;
  background: rgba(16, 20, 48, 0.82);
  box-shadow: 0 18px 40px rgba(7, 10, 24, 0.45);
  backdrop-filter: blur(18px);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 2.4vw, 14px);
  z-index: 12;
}

.mobile-slider.active {
  display: flex;
}

.mobile-slider input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  --slider-progress: 0%;
  background:
    linear-gradient(90deg, var(--accent), var(--accent-strong)) 0 0/var(--slider-progress) 100% no-repeat,
    rgba(223, 232, 255, 0.24);
  outline: none;
  cursor: pointer;
}

.mobile-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.mobile-slider input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.mobile-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 6px 18px rgba(64, 91, 255, 0.35);
  border: none;
  margin-top: -7px;
}

.mobile-slider input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 6px 18px rgba(64, 91, 255, 0.35);
  border: none;
}

.mobile-slider-value {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  font-weight: 700;
  color: rgba(223, 232, 255, 0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dialog[open] {
  animation: appear .15s cubic-bezier(0, 1.8, 1, 1.8);
}

#title {
  position: relative !important;
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  letter-spacing: 0.08em;
  color: #f5f7ff;
  text-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(120, 172, 255, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
}

#title[style*="opacity: 1"] {
  display: none;
}

#hoverTitle {
  position: relative !important;
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: rgba(226, 234, 255, 0.75);
  text-align: left;
}

#langWrapper,
#startWrapper {
  width: 100%;
}

#google{
  position:absolute;
  bottom:0px;
  left: 50%;
  width: 728px;
  height: 91px !important;
  margin-left: -364px; /* Half the width of the leaderboard ad. */
  z-index: 1000;
}

#startGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 30px);
  align-items: stretch;
  justify-items: stretch;
  margin: clamp(12px, 3vw, 18px) 0 clamp(28px, 5vw, 36px);
}


/* dialog::backdrop {
  background: linear-gradient(45deg, rgba(0,143,104,.5), rgba(250,224,66,.5));
} */

dialog .actions {
  display: flex;
  justify-content: space-around;
}

@keyframes sineMove{
  
  0%
	{
    margin-left: 0px;
	}
  
	100%
	{
    margin-left: 5px
	}
  
}

.sideSine {
  animation: sineMove 1.5s linear infinite;
  animation-direction: alternate;
}

.forward {
  /* transform: rotate(180deg);  */
  position: absolute;
  z-index: 300px;
  bottom: 50px;
  right: 90px;
  width: 50px;
  height: 30px; 
  opacity: .3;
  visibility: hidden;
}

.backward {
  transform: rotate(180deg); 
  position: absolute;
  z-index: 300px;
  bottom: 50px;
  right: 150px;
  width: 50px;
  height: 30px; 
  opacity: .3;
  visibility: hidden;
}
#backwardImage {

  width: 30px;
  height: 30px; 

}
#forwardImage {

  width: 30px;
  height: 30px; 

}

#floating-placeholder {
  display: none;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateX(-3rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.floating-logo {
  position: absolute;
  top: calc(-1 * clamp(84px, 20vw, 120px));
  left: 50%;
  bottom: 110%;
  margin: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: clamp(88px, 28vw, 160px);
  animation: floatyVertical 4.5s ease-in-out infinite;
  cursor: pointer;
  z-index: 20;
  transform: translateX(-50%);
}

.floating-logo img {
  width: 120%;
  height: auto;
  filter: drop-shadow(0 16px 24px rgba(9, 11, 28, 0.35));
}

.canvas-logo {
  position: absolute;
  bottom: clamp(12px, 4vw, 28px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(48px, 14vw, 80px);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  animation: floatyCanvas 5s ease-in-out infinite;
  z-index: 20;
  cursor: pointer;
}

.canvas-logo img {
  width: 150%;
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(9, 11, 28, 0.35));
}

.floating-logo:hover,
.canvas-logo:hover {
  animation-duration: 3.6s;
}

.floating-logo:active {
  animation-play-state: paused;
  
}

.canvas-logo:active {
  transform: translateX(-50%) scale(0.97);
}

@keyframes floatyVertical {
  0% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -10px);
  }
  100% {
    transform: translate(-50%, 0);
  }
}

@keyframes floatyCanvas {
  0% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -10px);
  }
  100% {
    transform: translate(-50%, 0);
  }
}

.credits {
  position: relative;
  margin: 0 0 clamp(16px, 3vw, 24px);
  padding: 0;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.6);
}

.wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(12px, 3vw, 20px);
  padding: clamp(12px, 3vw, 24px) 0 clamp(32px, 6vw, 48px);
  width: 100%;
}

.wrapper > .credits {
  grid-column: 1 / -1;
}

#startWrapper {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 32px);
}

.tutBox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  padding: clamp(20px, 3.5vw, 28px);
  background: linear-gradient(145deg, rgba(40, 50, 110, 0.88), rgba(18, 26, 64, 0.95));
  border: 1px solid rgba(126, 158, 255, 0.45);
  box-shadow:
    0 22px 54px rgba(5, 9, 24, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  min-height: clamp(130px, 26vw, 180px);
  overflow: hidden;
}

.tutBox::before {
  content: "";
  position: absolute;
  inset: -5%;
  background:
    radial-gradient(circle at 30% 25%, rgba(125, 196, 255, 0.28), transparent 60%),
    radial-gradient(circle at 75% 20%, rgba(184, 139, 255, 0.25), transparent 55%);
  transform: rotate(-4deg);
  opacity: 0.8;
  pointer-events: none;
}

.tutBox::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.tutBox h2 {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(0.92rem, 2.6vw, 1.15rem);
  line-height: 1.28;
  height: auto !important;
  min-height: clamp(58px, 9vh, 96px);
  color: #e9edff;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  word-break: keep-all;
  white-space: normal;
}

.box {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(210, 220, 255, 0.85));
  border: 1px solid rgba(105, 132, 255, 0.32);
  border-radius: 18px;
  padding: clamp(14px, 2vw, 20px);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #10132c;
  box-shadow:
    0 16px 36px rgba(12, 18, 48, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  height: 100%;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 220ms ease, background 220ms ease;
}

.box:hover,
.box:focus {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(210, 220, 255, 0.94));
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(64, 91, 255, 0.35);
  outline: none;
}

@media (max-width: 1024px) {
  .frameStyle {
    padding: clamp(8px, 4vw, 24px);
  }

  #sotu {
    min-height: clamp(320px, 70vh, 620px);
  }

  dialog {
    gap: clamp(14px, 3vw, 20px);
  }
}

@media (max-width: 680px) {
  body {
    align-items: flex-start;
    padding-top: clamp(24px, 6vw, 40px);
  }

  #buttons {
    top: clamp(12px, 4vw, 18px);
    right: clamp(12px, 6vw, 20px);
    gap: clamp(8px, 4vw, 14px);
  }

  #sotu {
    min-height: clamp(300px, 65vh, 520px);
    height: min(560px, calc(100vh - 120px));
  }

  dialog {
    border-radius: 20px;
    padding: clamp(18px, 5vw, 32px);
  }

  #startBtn {
    position: relative;
    right: auto !important;
    bottom: auto !important;
    margin: 0 auto;
  }

  #google {
    display: none;
  }
}

@media (max-width: 480px) {
  #title {
    font-size: 1.65rem;
  }

  .wrapper {
    grid-template-columns: 1fr;
  }

  .box {
    font-size: 1.05rem;
    padding: 18px;
  }

  #sotu {
    min-height: 320px;
    height: calc(100vh - 160px);
  }
}

@media (max-width: 768px) {
  .floating-logo {
    top: clamp(12px, 6vw, 26px);
    left: clamp(16px, 6vw, 32px);
    transform: none;
  }
  .floating-logo img {
    position: relative;
    left: 210%;
    transform: translateX(-50%);
    bottom: 100px;
  }

  .canvas-logo {
    top: clamp(9px, 4vw, 11px);
    left: clamp(50px, 6vw, 32px);
    bottom: auto;
    transform: none;
    width: clamp(64px, 10vw, 5px);
    height: clamp(64px, 10vw, 5px);
    border-radius: 50%;
    
    box-shadow: 0 14px 28px rgba(255, 255, 255, 0.4);
    padding: clamp(3px, 2.4vw, 12px);
  }
  .canvas-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(9, 11, 28, 0.3));
  }

  #buttons {
    top: clamp(18px, 7vw, 42px);
    right: clamp(18px, 7vw, 38px);
  }
}

    .speaker {
      height: 30px;
      width: 30px;
      text-align: center;
      font-family: arial, sans-sarif;
      position: relative !important;
      overflow: hidden;
      display: inline-block;
   }
    .speaker span {
      display: block;
      width: 8px;
      height: 8px;
      background:#333;
      margin: 11px 0 0 2px;
   }
    .speaker span:after {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      border-style: solid;
      border-color: transparent #333 transparent transparent;
      border-width: 10px 14px 10px 15px;
      left: -13px;
      top: 5px;
   }
    .speaker span:before {
      transform: rotate(45deg);
      border-radius: 0 50px 0 0;
      content: '';
      position: absolute;
      width: 5px;
      height: 5px;
      border-style: double;
      border-color: #333;
      border-width: 7px 7px 0 0;
      left: 18px;
      top: 9px;
      transition: all 0.2s ease-out;
   }
    .speaker:hover span:before {
      transform: scale(.8) translate(-3px,0) rotate(42deg);
   }
    .speaker.mute span:before {
      transform: scale(.5) translate(-15px,0) rotate(36deg);
      opacity: 0;
   }

  
    
   .lang {
  width: 28px;
  height: 28px;
  position: relative;
  z-index: 5;
  filter: drop-shadow(0 4px 8px rgba(9, 11, 28, 0.35));
   }

   #muteToggle {
     width: 36px;
     height: 36px;
     position: relative;
   }

.hd {
 display: none;
}


    /* input[type="checkbox"]:checked ~ span {
      transform: rotate(-45deg) translateY(4px);
      left: 45px;
      height: 26px;
      background: #e74c3c;
   }
    input[type="checkbox"]:checked + span {
      transform: rotate(45deg) translateY(-4px);
   }
    span {
      width: 5px;
      background: #34495e;
      position: absolute;
      transition: all 0.3s ease-in-out;
      border-radius: 5px;
   }
    span.first {
      height: 20px;
      left: 37px;
   }
    span.second {
      height: 32px;
      left: 46px;
      top: -6px;
   } */

.ad-banner {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 4vw, 32px);
  transform: translateX(-50%);
  width: min(320px, 90vw);
  max-width: 320px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.ad-banner > * {
  pointer-events: auto;
}