html, body {
  height: 100%;
  margin: 0;
  background: #000;
  overflow: hidden;
}

/* Полностью отключаем системный курсор везде */
* { cursor: none !important; }

/* Фон на весь экран */
#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

/* Слой свечей — над фоном, под остальным контентом */
#candles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Отдельная свеча */
.candle {
  position: absolute;
  bottom: -15vh; /* старт ниже экрана */
  will-change: transform, opacity;
  filter: drop-shadow(0 8px 18px rgba(0, 255, 100, .35));
  opacity: 0.95;
  animation-name: rise;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes rise {
  0%   { transform: translate3d(var(--dx,0px), 0vh, 0) rotate(var(--rot,0deg)); opacity: .0; }
  5%   { opacity: .95; }
  100% { transform: translate3d(calc(var(--dx,0px) + var(--drift, 0px)), -120vh, 0) rotate(var(--rotEnd,0deg)); opacity: 0; }
}

/* Логотип */
#logo {
  position: fixed;
  top: 10px;
  left: 10px;
  height: 60px;
  width: auto;
  user-select: none;
  z-index: 2;
}

/* Кнопка X */
#x-btn {
  position: fixed;
  top: 85px;
  left: 10px;
  display: inline-block;
  user-select: none;
  z-index: 2;
}
#x-btn img {
  height: 45px;
  width: auto;
  display: block;
  transition: transform 0.15s ease;
}
#x-btn:hover img { transform: scale(1.05); }

/* Кнопка CA */
#ca-btn {
  position: fixed;
  top: 85px;
  left: 140px; /* правее X */
  padding: 0;
  border: 0;
  background: transparent;
  user-select: none;
  z-index: 2;
}
#ca-btn img {
  height: 45px;
  width: auto;
  display: block;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}
#ca-btn:hover img { transform: scale(1.05); }

/* Неактивная CA (когда CONTRACT пуст) */
#ca-btn[aria-disabled="true"] img {
  filter: grayscale(1);
  opacity: 0.55;
  transform: none;
  pointer-events: none;
}

/* Бейдж "COPIED" под кнопкой CA */
#ca-btn .copied-badge {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  font: 900 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: #eaffef;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(34, 70, 40, 0.95);
  border: 1px solid rgba(180, 255, 200, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
  pointer-events: none;
}
#ca-btn.copied .copied-badge { opacity: 1; }

/* Центральная надпись — с "живым" покачиванием */
#title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  max-width: 1000px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
  user-select: none;
  z-index: 1;
  animation: floatTitle 4s ease-in-out infinite;
}
@keyframes floatTitle {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  25%  { transform: translate(-50%, calc(-50% - 5px)) rotate(-1deg); }
  50%  { transform: translate(-50%, -50%) rotate(1deg); }
  75%  { transform: translate(-50%, calc(-50% + 5px)) rotate(-1deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg); }
}

/* Кнопки SEND */
#send-left {
  position: fixed;
  bottom: 60px;
  left: 38%;
  transform: translateX(-50%);
  height: 100px;
  width: auto;
  transition: transform 0.2s ease;
  z-index: 1;
}
#send-left:hover { transform: translateX(-50%) scale(1.05); }

#send-right {
  position: fixed;
  bottom: 60px;
  right: 38%;
  transform: translateX(50%);
  height: 100px;
  width: auto;
  transition: transform 0.2s ease;
  z-index: 1;
}
#send-right:hover { transform: translateX(50%) scale(1.05); }

/* Надпись OR */
#or-text {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  height: 50px;
  width: auto;
  user-select: none;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.4));
  z-index: 1;
}

/* Кастомный курсор */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;  /* при необходимости подгони под картинку курсора */
  height: 40px;
  background: url("./cursor.png") center/contain no-repeat;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-100px, -100px);
  transition: transform 0.05s linear;
}
