/* =========================
   ROOT: НАСТРОЙКИ СЦЕНЫ
========================= */

:root {
  --scene-width: 1920px;
  --scene-height: 1080px;

  --bg-image: url("bg_catjak.png");

  /* Тайтл CATJAK */
  --title-top: 40px;
  --title-left: 50%;
  --title-width: 900px;
  --title-font-size: 120px;

  /* Метеориты */
  --meteor-size: 180px;
  --meteor-start-x: 100%;
  --meteor-start-y: -150px;

  /* Социалки */
  --socials-right: 40px;
  --socials-bottom: 40px;
  --social-size: 60px;
  --social-gap: 22px;

  /* CA баннер */
  --ca-bottom: 40px;
  --ca-width: 900px;
  --ca-height: 95px;
  --ca-font-size: 25px;
  --ca-stretch-x: 1;
  --ca-text-offset-x: -120px; /* ДВИГАЙ ТЕКСТ ЛЕВЕЕ/ПРАВЕЕ */
}

/* =========================
   БАЗА
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #000;
  color: #fff;
  overflow: hidden;
}

.scene {
  position: relative;
  width: var(--scene-width);
  height: var(--scene-height);
  margin: 0 auto;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* =========================
   ТАЙТЛ CATJAK
========================= */

.title-catjak {
  position: absolute;
  top: var(--title-top);
  left: var(--title-left);
  transform: translateX(-50%);
  width: var(--title-width);
  margin: 0;
  text-align: center;
  font-family: "Squada One", system-ui;
  font-size: var(--title-font-size);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
  animation: title-glitch 2.3s infinite;
}

/* =========================
   МЕТЕОРИТЫ
========================= */

.meteors-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.meteor {
  position: absolute;
  top: var(--meteor-start-y);
  left: var(--meteor-start-x);
  width: var(--meteor-size);
  height: var(--meteor-size);
  pointer-events: none;
  animation-name: meteor-fall;
  animation-timing-function: linear;
  animation-iteration-count: 1;
}

.meteor-image {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: auto;
}

/* =========================
   CA БАННЕР
========================= */

.ca-banner {
  position: absolute;
  left: 50%;
  bottom: var(--ca-bottom);
  transform: translateX(-50%) translateY(10px) scaleX(var(--ca-stretch-x));
  width: var(--ca-width);
  height: var(--ca-height);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.25s ease-out,
    transform 0.25s ease-out;
}

.ca-banner.visible {
  display: flex;
  pointer-events: auto;
  opacity: 1;
  transform: translateX(-50%) translateY(0) scaleX(var(--ca-stretch-x));
}

.ca-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: auto;
}

.ca-banner-content {
  position: relative;
  z-index: 1;
  width: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  font-family: "Squada One", system-ui;
  font-size: var(--ca-font-size);

  /* ЧЁРНЫЙ ТЕКСТ */
  color: #000000 !important;

  /* Белая подсветка */
  text-shadow:
    0 0 6px rgba(255,255,255,0.9),
    0 0 3px rgba(255,255,255,0.7);

  white-space: nowrap;

  /* СМЕЩЕНИЕ ТЕКСТА ВЛЕВО/ВПРАВО */
  transform: translateX(var(--ca-text-offset-x));
}

.ca-label {
  opacity: 1;
}

.ca-value {
  font-weight: 400;
}

/* =========================
   СОЦИАЛКИ
========================= */

.socials-wrapper {
  position: absolute;
  right: var(--socials-right);
  bottom: var(--socials-bottom);
  display: flex;
  flex-direction: column;
  gap: var(--social-gap);
}

.social-btn {
  width: var(--social-size);
  height: var(--social-size);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transform-origin: center;
  transition:
    transform 0.1s ease-out,
    box-shadow 0.1s ease-out,
    background 0.1s ease-out,
    opacity 0.15s ease-out;
}

.social-btn img {
  width: 70%;
  height: auto;
  display: block;
  image-rendering: auto;
}

.social-btn.active:hover {
  animation: btn-hover-warp 0.35s ease-out;
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}

.social-btn.active:active {
  animation: none;
  transform: scale(0.92) translateY(1px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 1);
}

.social-btn.disabled {
  cursor: default;
  opacity: 0.3;
  filter: grayscale(100%);
  pointer-events: none;
}

/* =========================
   АНИМАЦИИ
========================= */

@keyframes title-glitch {
  0% { transform: translateX(-50%); text-shadow: 0 0 18px rgba(255,255,255,0.35); }
  12% { transform: translateX(calc(-50% + 1px)); text-shadow: -2px 0 rgba(255,0,0,.65), 2px 0 rgba(0,255,255,.65); }
  16% { transform: translateX(calc(-50% - 1px)); text-shadow: 2px 0 rgba(255,0,0,.65), -2px 0 rgba(0,255,255,.65); }
  20% { transform: translateX(-50%); }
  55% { transform: translateX(-50%); }
  58% { transform: translateX(calc(-50% + 1px)); }
  62% { transform: translateX(calc(-50% - 1px)); }
  100% { transform: translateX(-50%); }
}

@keyframes btn-hover-warp {
  0%   { transform: scale(1.0); }
  30%  { transform: scale(1.08) rotate(1deg); }
  60%  { transform: scale(1.04) rotate(-1deg); }
  100% { transform: scale(1.08); }
}

@keyframes meteor-fall {
  0%   { transform: translate(0, 0); opacity: 0; }
  5%   { opacity: 1; }
  100% { transform: translate(-140vw, 110vh); opacity: 0; }
}
/* =========================
   TOAST "COPIED"
========================= */

.copy-toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--ca-bottom) + var(--ca-height) + 30px);
  transform: translateX(-50%) translateY(10px);
  padding: 10px 22px;
  border-radius: 12px;

  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-family: "Squada One", system-ui;
  font-size: 26px;
  letter-spacing: 2px;

  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out;
}

.copy-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

