:root {
  --bg-1: #1e2128;
  --bg-2: #1c2631;
  --panel: rgba(18, 19, 24, 0.58);
  --panel-strong: rgba(9, 13, 17, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #edf1f7;
  --muted: rgba(255, 255, 255, 0.72);
  --accent: #f05d4b;
  --accent-2: #f22828;
  --green: #44d17b;
  --warning: #ffb347;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: #0d0f12;
  color: var(--text);
}

body {
  overflow-x: hidden;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(134, 120, 138, 0.72), rgba(57, 40, 55, 0.7));
  overflow: hidden;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 18, 20, 0.12), rgba(17, 18, 20, 0.52));
  z-index: 0;
}

.page-shell::after {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 60%);
  filter: blur(36px);
  opacity: 0.8;
  animation: ambientGlow 10s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes ambientGlow {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 1; }
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 20px 0 18px;
  background: rgba(30, 34, 38, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.brand-wrap {
  min-width: 180px;
}

.brand-logo {
  display: inline-block;
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #f5f5f5;
  text-transform: uppercase;
  transform: scaleY(1.08);
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.brand-logo span {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(255, 68, 68, 0.7);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  flex: 1;
}

.nav-link {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 12px;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

.nav-link:hover {
  opacity: 1;
  transform: translateY(-1px);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
  justify-content: flex-end;
}

.online-pill,
.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.online-pill strong,
.coin-pill strong {
  color: #f1f6ff;
  font-weight: 800;
}

.online-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5ccf76;
  box-shadow: 0 0 10px rgba(92, 207, 118, 0.8);
}

.coin-pill {
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.coin-pill span {
  font-size: 0.8rem;
  opacity: 0.8;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 3px;
  margin-right: 8px;
}

.lang-option {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-option.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 20, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text);
  padding: 6px 10px 6px 7px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.profile-avatar {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4d5563, #1f2430);
  font-size: 0.68rem;
  font-weight: 800;
  color: #f3f7ff;
  text-transform: uppercase;
}

.profile-avatar.big {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.profile-name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 54px);
  padding-top: 18px;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(152, 131, 148, 0.1), rgba(62, 30, 56, 0.38));
}

.scene-left,
.scene-right {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.block {
  position: absolute;
  background: linear-gradient(135deg, rgba(176, 164, 147, 0.9), rgba(106, 96, 80, 0.8));
  box-shadow: inset -10px -12px 20px rgba(46, 38, 31, 0.35), inset 4px 5px 10px rgba(255, 255, 255, 0.1);
}

.block-a {
  left: 6%;
  bottom: 24%;
  width: 260px;
  height: 190px;
  transform: rotate(-28deg);
}

.block-b {
  left: 14%;
  bottom: 26%;
  width: 230px;
  height: 120px;
  transform: rotate(-12deg);
  opacity: 0.9;
}

.block-c {
  left: 26%;
  bottom: 18%;
  width: 170px;
  height: 120px;
  transform: rotate(10deg);
  opacity: 0.8;
}

.block-d {
  right: 24%;
  bottom: 18%;
  width: 160px;
  height: 140px;
  transform: rotate(12deg);
  opacity: 0.9;
}

.block-e {
  right: 20%;
  bottom: 18%;
  width: 200px;
  height: 130px;
  transform: rotate(-9deg);
  opacity: 0.85;
}

.orbit-svg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 820px;
  height: 820px;
  pointer-events: none;
  user-select: none;
  overflow: visible;
  opacity: 0.9;
}

.orbit-svg text {
  fill: rgba(255, 255, 255, 0.18);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 8px;
  text-transform: uppercase;
}

.orbit-one {
  animation: spinSlow 34s linear infinite;
}

.orbit-two {
  width: 640px;
  height: 640px;
  animation: spinReverse 26s linear infinite;
}

.orbit-two text {
  fill: rgba(240, 93, 75, 0.24);
  font-size: 20px;
  letter-spacing: 7px;
}

@keyframes spinSlow {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spinReverse {
  0% { transform: translate(-50%, -50%) rotate(360deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 0;
}

.hero-title {
  margin: 0;
  font-size: clamp(4rem, 5.2vw, 7.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.85;
  text-transform: uppercase;
  transform: scaleY(1.05);
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.title-light {
  color: #f0f4fc;
}

.title-red {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(240, 93, 75, 0.5);
}

.subtitle {
  margin: 18px 0 16px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.start-button {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ef4633, #d71b1d);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 32px 16px 26px;
  min-width: 300px;
  box-shadow: 0 8px 24px rgba(224, 35, 35, 0.4), 0 0 18px rgba(255, 67, 67, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.start-button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 30px rgba(224, 35, 35, 0.5), 0 0 30px rgba(255, 82, 82, 0.35);
  filter: brightness(1.04);
}

.telegram-link {
  margin-top: 14px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

.telegram-link:hover {
  color: #fff;
  text-shadow: 0 0 16px rgba(255,255,255,0.45);
  transform: translateY(-1px);
}

.scene-right {
  position: absolute;
  inset: 0;
}

.knife-orb {
  position: absolute;
  right: 23%;
  bottom: 18%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(255, 232, 243, 0.9), rgba(133, 131, 166, 0.6) 38%, rgba(29, 31, 38, 0.35) 66%, rgba(0, 0, 0, 0.05) 100%);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.22);
  filter: blur(1px);
}

.knife-hand {
  position: absolute;
  right: 16%;
  bottom: 18%;
  width: 260px;
  height: 280px;
  border-radius: 48% 52% 36% 64% / 48% 52% 48% 52%;
  background: linear-gradient(135deg, rgba(252, 195, 233, 0.96), rgba(223, 127, 192, 0.7) 28%, rgba(163, 224, 247, 0.78) 58%, rgba(194, 214, 235, 0.84));
  transform: rotate(-16deg);
  box-shadow: inset -18px -10px 25px rgba(120, 120, 135, 0.3), inset 14px 16px 18px rgba(255,255,255,0.22);
}

.knife-hand::before,
.knife-hand::after {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(170, 166, 180, 0.4));
  border-radius: 30px;
}

.knife-hand::before {
  right: 24px;
  top: 40px;
  width: 18px;
  height: 170px;
  transform: rotate(-18deg);
}

.knife-hand::after {
  right: 112px;
  bottom: 30px;
  width: 26px;
  height: 110px;
  transform: rotate(-38deg);
}

.knife-blade {
  position: absolute;
  right: 30%;
  bottom: 28%;
  width: 210px;
  height: 100px;
  background: linear-gradient(135deg, rgba(88, 81, 77, 0.9), rgba(207, 177, 104, 0.8), rgba(60, 48, 38, 0.75));
  border-radius: 38% 62% 42% 58% / 50% 48% 52% 50%;
  transform: rotate(-18deg) skewX(-8deg);
  box-shadow: inset -14px -14px 20px rgba(15, 13, 11, 0.3), inset 10px 8px 14px rgba(255, 220, 152, 0.28);
}

.knife-blade::before {
  content: "";
  position: absolute;
  inset: 18px 18px 16px 22px;
  border-radius: 50%;
  border: 4px solid rgba(201, 181, 128, 0.4);
  opacity: 0.9;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 3rem;
  line-height: 1;
  opacity: 0.9;
  animation: floatArrow 1.8s ease-in-out infinite alternate;
}

@keyframes floatArrow {
  0% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
  100% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 9, 12, 0.45);
  backdrop-filter: blur(3px);
  z-index: 30;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.modal-card {
  position: relative;
  width: min(520px, calc(100vw - 30px));
  background: rgba(18, 21, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 28px 50px rgba(0,0,0,0.35);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.close-btn {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
  line-height: 1;
}

.promo-form {
  display: flex;
  padding: 18px 18px 8px;
  gap: 12px;
}

.promo-form input,
.profile-body input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  color: var(--text);
  padding: 14px 16px;
  font-size: 0.96rem;
  outline: none;
}

.promo-form input::placeholder,
.profile-body input::placeholder {
  color: rgba(255,255,255,0.45);
}

.promo-form button,
.save-profile {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f63d32, #c9151d);
  color: white;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 18px;
}

.promo-status {
  min-height: 42px;
  padding: 0 18px 18px;
  color: rgba(255,255,255,0.72);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.promo-status.inactive,
.promo-status.error {
  color: #ff8d8d;
}

.promo-status.success {
  color: #8ef0b9;
}

.profile-card {
  width: min(460px, calc(100vw - 28px));
}

.profile-body {
  padding: 20px 18px 18px;
}

.profile-current {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}

.label {
  margin: 0 0 6px;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-current h3 {
  margin: 0;
  font-size: 1.1rem;
}

.login-label {
  display: block;
  margin: 12px 0 8px;
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.save-profile {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 15px 18px;
}

.reward-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 20, 24, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.3);
  padding: 14px 18px;
  z-index: 40;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.reward-toast.hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.reward-toast strong {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reward-toast p {
  margin: 0;
  color: #9be8b3;
  font-weight: 700;
}

@media (max-width: 980px) {
  .brand-logo {
    font-size: 1.6rem;
  }

  .main-nav {
    gap: 8px;
  }

  .nav-link {
    font-size: 0.6rem;
    letter-spacing: 0.09em;
  }

  .hero-title {
    font-size: clamp(3rem, 13vw, 6rem);
  }

  .start-button {
    min-width: 250px;
    font-size: 0.95rem;
  }

  .topbar-right {
    min-width: 0;
    gap: 8px;
  }

  .online-pill,
  .coin-pill {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 12px;
  }

  .brand-wrap {
    min-width: 0;
  }

  .main-nav {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .hero-content {
    padding: 0 12px;
  }

  .subtitle {
    letter-spacing: 0.12em;
    font-size: 0.7rem;
  }

  .telegram-link {
    font-size: 0.85rem;
  }

  .scroll-indicator {
    font-size: 2.5rem;
  }

  .promo-form {
    flex-direction: column;
  }
}
