* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  overflow-x: hidden;
  background: linear-gradient(135deg, #1a0a3e 0%, #2d1b4e 50%, #1a0a3e 100%);
  min-height: 100vh;
  background: url(./assets/bg.png);
  background-size: cover;
}

/* ========== PRELOADER ========== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0a3e 0%, #2d1b4e 50%, #1a0a3e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;

  background: rgba(9, 0, 25, 0.8);
  backdrop-filter: blur(40px);
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-icons {
  position: absolute;
  width: 100%;
  height: 100%;
}

.icon {
  position: absolute;
  border-radius: 12px;
  animation: float 3s ease-in-out infinite;
}

.icon-pill {
  border-radius: 25px;
  top: 28%;
  left: 22%;
  animation-delay: 0s;
  z-index: 9;
}

.icon-candy {
  top: 28%;
  right: 18%;
  z-index: 9;
  animation-delay: 1s;
}

.icon-lollipop {
  bottom: 2%;
  left: 17%;
  z-index: 9;
  animation-delay: 1.5s;
}

.icon-cube {
  bottom: 14%;
  right: 20%;
  z-index: 9;
  animation-delay: 2s;
}

.glass-card {
  position: relative;
  width: 580px;
  height: 300px;

  border-radius: 28px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  padding: 50px;
  text-align: center;

  overflow: hidden;

  border-radius: 40px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.glass-card {
  position: relative;
}
.pretop {
  position: absolute;
  top: 0;
  left: 0;
  background: url(./assets/pretop.png);
  background-size: cover;
  height: 39%;
  width: 100%;
}
.prebottom {
  position: absolute;
  bottom: 0;
  left: 0;
  background: url(./assets/prebotoom.png);
  background-size: cover;
  height: 39%;
  width: 100%;
}

.loading-ring {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  border: 10px solid rgba(139, 92, 246, 0.2);
  border-top: 10px solid #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.glass-card h2 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 30px;
  line-height: 1.3;
  letter-spacing: 1px;

  color: #fff;
  text-align: center;
  font-family: Montserrat;
  font-size: 26px;
  font-style: normal;
  font-weight: 800;
  line-height: 100%; /* 26px */
  letter-spacing: -0.52px;
  text-transform: uppercase;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd700, #ffed4e);
  border-radius: 10px;
  animation: progress 3s ease-in-out forwards;
}

/* ========== MAIN PAGE ========== */
.main-page {
  display: none;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 0px 35px;
}

.main-page.active {
  display: block;
}

.logo {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 100;
}

.logo-text {
  font-size: 24px;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  background: linear-gradient(180deg, #00d4ff 0%, #ff00ff 50%, #ffaa00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.content {
  margin: 0px 35px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100vh;
  padding-top: 60px;
}

.text-content {
  flex: 1;

  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-title {
  text-align: center;
  text-shadow: 0 4px 10.5px #000;
  -webkit-text-stroke-width: 7px;
  -webkit-text-stroke-color: #fff;
  font-family: Impact;
  font-size: 130px;
  font-style: normal;
  font-weight: 400;
  line-height: 110%; /* 143px */
  letter-spacing: -2.6px;
  text-transform: uppercase;

  background: linear-gradient(180deg, #ff00bf 14.47%, #50f 96.5%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 40px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  color: #fff;
  text-align: center;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
  font-family: Montserrat;
  font-size: 26px;
  font-style: normal;
  font-weight: 800;
  line-height: 100%; /* 26px */
  letter-spacing: -0.52px;
  text-transform: uppercase;

  max-width: 620px;
  margin: 0 auto;
  margin-top: 14px;
  margin-bottom: 30px;
}

.start-button {
  position: relative;
  display: inline-flex;

  padding: 44px 200px;
  justify-content: center;
  align-items: center;
  gap: 10px;

  border-radius: 80px;
  border: none;
  background: linear-gradient(180deg, #fee44f 0%, #f78b02 100%);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1;

  color: #fff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  font-family: Montserrat;
  font-size: 22px;
  font-style: normal;
  font-weight: 800;
  line-height: 100%; /* 22px */
  letter-spacing: -0.44px;
  text-transform: uppercase;
}

/* Анимированная рамка с ярким бегущим желтым светом */
.start-button::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 86px;
  padding: 6px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #ffd700 15%,
    #ffed4e 25%,
    #fff700 35%,
    #ffed4e 45%,
    #ffd700 55%,
    transparent 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotate-light 2s linear infinite;
  filter: blur(1px) brightness(1.5);
  pointer-events: none;
  z-index: -1;
}

/* Дополнительное свечение */
.start-button::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 90px;
  background: radial-gradient(
    circle,
    rgba(255, 237, 78, 0.4) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -2;
}

.start-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px rgba(255, 237, 78, 0.9),
    0 10px 60px rgba(255, 215, 0, 0.6),
    inset 0 1px 20px rgba(255, 255, 255, 0.3);
}

.start-button:hover::before {
  animation: rotate-light 1s linear infinite;
  filter: blur(2px) brightness(2);
}

.start-button:hover::after {
  opacity: 1;
}

/* Эффект нажатия */
.start-button:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 0 20px rgba(255, 237, 78, 0.7),
    0 5px 30px rgba(255, 215, 0, 0.5), inset 0 3px 10px rgba(0, 0, 0, 0.2);
}

.start-button:active::before {
  animation: rotate-light 0.5s linear infinite;
  filter: blur(1px) brightness(1.8);
  inset: -4px;
}

.start-button:active::after {
  opacity: 0.5;
}

@keyframes rotate-light {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

.quick-access {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;

  border-radius: 0 0 12px 12px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(15px);
  padding: 13px 40px;
  color: #fff;
  text-shadow: 0 2px 14px #000;
  font-family: Montserrat;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.32px;
  display: inline-block;
}

.character-section {
  flex: 1;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 760px;
}

.character-placeholder {
  width: 100%;
  height: 100%;

  position: relative;
  z-index: 5;
  animation: float 4s ease-in-out infinite;
}
.character-placeholder img {
  width: 100%;
  height: 100%;
  position: relative;
  bottom: -5%;
}

.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
}

.float-item {
  position: absolute;
}

.float-apple {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  top: -7%;
  right: 88%;
  animation: float 4s ease-in-out infinite;
}

.float-candy-cane {
  height: 100px;
  top: 47%;
  right: -8%;
  border-radius: 30px;
  animation: float 3.5s ease-in-out infinite 0.5s;
}

.float-rainbow-candy {
  border-radius: 50%;
  top: 8%;
  right: -2%;
  animation: float 3.3s ease-in-out infinite 0.3s;
}
.float-rainbow-candy img {
  width: 140%;
}

.float-lollipop-big {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  bottom: 22%;
  right: 8%;
}

.float-coin-1 {
  top: 33%;
  left: -6%;
}

.float-coin-2 {
  bottom: -10%;
  right: -1%;
  animation: float 3.8s ease-in-out infinite 1.5s;
}
.float-coin-2 img {
  width: 100%;
}

.float-coin-3 {
  bottom: 23%;
  left: -41%;
}
.float-coin-4 {
  bottom: 23%;
  left: -2%;
}

.float-pill-blue {
  top: 71%;
  left: 17%;
  animation: float 3.3s ease-in-out infinite 0.3s;
}

.float-pill-green {
  bottom: -46%;
  right: 75%;
  animation: float 3.7s ease-in-out infinite 0.7s;
}

.float-pill-pink {
  top: 60%;
  left: -37%;
  animation: float 3.1s ease-in-out infinite 1.1s;
}
.float-pill-pink img {
  width: 100%;
}

.footer-badge {
  position: absolute;
  bottom: 30px;
  left: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(80, 50, 100, 0.4);
  backdrop-filter: blur(10px);
  padding: 15px 25px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(15px);
}

.badge-icon {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  font-size: 14px;
}

.shield-icon {
  position: relative;
}

.badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge-text span {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

/* ========== ANIMATIONS ========== */
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes progress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

@keyframes shimmer {
  0%,
  100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .content {
    flex-direction: column;
    gap: 40px;
  }

  .text-content {
    text-align: center;
    max-width: 100%;
  }

  .main-title {
    font-size: 56px;
  }
}

@media (max-width: 768px) {
  .logo-text {
    font-size: 18px;
  }

  .main-title {
    font-size: 42px;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.5), 2px 2px 0 #ff0080,
      3px 3px 0 #ff00ff;
  }

  .subtitle {
    font-size: 14px;
  }

  .start-button {
    font-size: 20px;
    padding: 16px 60px;
  }

  .character-section {
    height: 500px;
  }

  .character-placeholder {
    width: 300px;
    height: 450px;
  }

  .glass-card {
    width: 90%;
    max-width: 400px;
    height: auto;
    padding: 30px 20px;
  }

  .glass-card h2 {
    font-size: 20px;
  }

  .footer-badge {
    bottom: 20px;
    left: 20px;
    padding: 12px 20px;
  }

  .badge-text span {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 32px;
  }

  .subtitle {
    font-size: 12px;
  }

  .start-button {
    font-size: 18px;
    padding: 14px 50px;
  }

  .character-placeholder {
    width: 250px;
    height: 380px;
  }

  .glass-card h2 {
    font-size: 18px;
  }
}
.btn__wrapper {
  display: flex;
  flex-direction: column;
}
.btn__wrapper .quick-access {
  margin: 0 auto;
  max-width: 340px;
  font-size: 14px;
}
@media (max-width: 1440px) {
  .character-placeholder img {
    width: 95%;
    height: 95%;
  }
}
@media (max-width: 1024px) {
  .icon-pill {
    left: 15%;
  }
  .icon-lollipop {
    left: 9%;
  }
  .icon-candy {
    right: 12%;
  }
  .icon-cube {
    right: 14%;
  }
  .logo {
    left: 50%;
    transform: translateX(-50%);
  }
  .text-content {
    margin-top: 100px;
  }
  .text-content img {
    width: 80%;
  }
  .character-section {
    position: absolute;
    top: 0px;
  }
  .character-placeholder img {
    width: 100%;
    height: 100%;
  }
  .character-placeholder {
    display: flex;
    align-items: flex-end;
  }
  .footer-badge {
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
  }
  .btn__wrapper {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
  }
  .start-button {
    padding: 40px 130px;
  }
  .character-placeholder {
    width: 80%;
    height: 80%;
  }
  .character-section {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    display: flex;
    align-items: flex-end;
    height: 100%;
  }
  .start-button {
    padding: 40px 200px;
  }
  .start-button {
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .subtitle {
    max-width: 400px;
  }
}
@media (max-width: 580px) {
  .subtitle {
    max-width: 300px;
  }
  .text-content {
    margin-top: 80px;
  }
  .text-content img {
    width: 90%;
  }
  .logo img {
    width: 90%;
  }
  .btn__wrapper {
    width: 100%;
  }
  .start-button {
    margin: 0 auto;
    padding: 26px 110px;
    width: 80%;

    font-size: 18px;
  }
  .footer-badge {
    gap: 0px;
    padding: 14px;
    width: 287px;
  }
  .badge-text {
    margin-left: 10px;
  }
  .character-placeholder {
    width: 100%;
  }
  .icon-pill {
    left: 10%;
  }
  .icon-lollipop {
    left: -2%;
    bottom: 12%;
  }
  .icon-lollipop img {
    width: 80%;
  }
  .icon-candy {
    right: -4%;
  }
  .icon-candy img {
    width: 80%;
  }
  .icon-cube {
    right: 0%;
    bottom: 22%;
  }
}

@media (max-width: 430px) {
  .content {
    width: 100%;
  }
  .main-page.active {
    padding: 0;
  }
  .btn__wrapper .quick-access {
    max-width: 280px;
    font-size: 12px;
    padding: 13px 20px;
  }

  .icon-pill {
    left: -4%;
  }
  .icon-lollipop {
    left: -10%;
    bottom: 12%;
  }

  .icon-candy {
    right: -16%;
  }

  .icon-cube {
    right: -10%;
    bottom: 22%;
  }
}
