/* =========================
   ROOT: НАСТРОЙКИ СЦЕНЫ
========================= */

:root {
  --scene-width: 1920px;
  --scene-height: 1080px;

  /* ФОНЫ */
  --bg-main-image: url("bg_donny_main.png");
  --bg-chart-image: url("bg_donny_chart.png");
  --bg-secret-image: url("bg_donny_secret.png");

  /* NAV (верхний левый угол) */
  --nav-top: 24px;
  --nav-left: 24px;
  --nav-gap: 20px;
  --nav-font-size: 20px;

  /* MAIN TITLE */
  --main-title-top: 100px;
  --main-title-left: 50%;
  --main-title-font-size: 120px;
  --main-subtitle-offset-y: 40px;
  --main-subtitle-font-size: 40px;

  /* ARROW MAIN */
  --arrow-main-width: 140px;
  --arrow-main-top: 80%;
  --arrow-main-left: 50%;

  /* CHART PAGE */
  --chart-title-top: -600px;
  --chart-title-font-size: 140px;

  --chart-frame-top: -200px;
  --chart-frame-width: 800px;
  --chart-frame-height: 420px;
  --chart-frame-offset-x: 0px;
  --chart-frame-offset-y: 0px;

  --buy-text-top: 300px;
  --buy-text-font-size: 80px;

  --arrow-chart-width: 140px;
  --arrow-chart-bottom: -400px;
  --arrow-chart-right: 60px;

  /* SECRET PAGE */
  --secret-title-top: -600px;
  --secret-title-font-size: 140px;

  --play-button-size: 260px;
  --play-button-top: -150px;
  --play-button-left: 50%;

  --text-color-main: #000000;
  --shadow-strong: 0 0 14px rgba(0, 0, 0, 0.7);
}

/* =========================
   BASE
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text-color-main);
  background-color: #000;
}

.page-wrapper {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =========================
   SCREENS
========================= */

.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.screen-main {
  background-image: var(--bg-main-image);
}

.screen-chart {
  background-image: var(--bg-chart-image);
}

.screen-secret {
  background-image: var(--bg-secret-image);
}

/* =========================
   NAV BUTTONS
========================= */

.top-nav {
  position: absolute;
  top: var(--nav-top);
  left: var(--nav-left);
  display: flex;
  gap: var(--nav-gap);
  z-index: 20;
}

.nav-link {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: "Mansalva", cursive;
  font-size: var(--nav-font-size);
  letter-spacing: 1px;
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.nav-link:hover {
  transform: translateY(-3px);
  background: rgba(0, 0, 0, 0.75);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(255, 255, 255, 0.6);
}

.nav-link:active {
  transform: translateY(1px) scale(0.97);
}

/* =========================
   MAIN TITLE + SUBTITLE
========================= */

.main-title-wrapper {
  position: absolute;
  top: var(--main-title-top);
  left: var(--main-title-left);
  transform: translateX(-50%);
  text-align: center;
}

.main-title {
  margin: 0;
  font-family: "Mansalva", cursive;
  font-size: var(--main-title-font-size);
  color: #000;
  text-shadow: var(--shadow-strong);
  letter-spacing: 6px;
}

.main-subtitle {
  margin: 0;
  margin-top: var(--main-subtitle-offset-y);
  font-family: "Mansalva", cursive;
  font-size: var(--main-subtitle-font-size);
  color: #000;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* =========================
   ARROWS
========================= */

.scroll-arrow {
  position: absolute;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.scroll-arrow img {
  display: block;
  width: 100%;
  height: auto;
}

/* MAIN ARROW (центр снизу) */
.scroll-arrow-main {
  top: var(--arrow-main-top);
  left: var(--arrow-main-left);
  transform: translate(-50%, 0);
  width: var(--arrow-main-width);
  animation: arrow-bounce 1.4s ease-in-out infinite;
}

/* ARROW ON CHART PAGE (правый нижний угол) */
.scroll-arrow-chart {
  right: var(--arrow-chart-right);
  bottom: var(--arrow-chart-bottom);
  width: var(--arrow-chart-width);
  animation: arrow-bounce 1.4s ease-in-out infinite;
}

@keyframes arrow-bounce {
  0%,
  100% {
    transform: translate(-50%, 0) scale(1);
  }
  50% {
    transform: translate(-50%, 8px) scale(1.06);
  }
}

.scroll-arrow-chart {
  transform: translate(0, 0);
}

.scroll-arrow-chart@keyframes arrow-bounce-chart {}

/* =========================
   CHART PAGE
========================= */

.chart-content {
  position: relative;
  width: 100%;
  max-width: var(--scene-width);
  margin: 0 auto;
}

.section-title {
  font-family: "Mansalva", cursive;
  text-transform: uppercase;
  text-align: center;
  color: #000;
  text-shadow: var(--shadow-strong);
}

.chart-title {
  position: absolute;
  top: var(--chart-title-top);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-size: var(--chart-title-font-size);
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.chart-title.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.chart-frame-wrapper {
  position: absolute;
  top: var(--chart-frame-top);
  left: 50%;
  width: var(--chart-frame-width);
  height: var(--chart-frame-height);
  transform: translateX(-50%) translate(var(--chart-frame-offset-x), var(--chart-frame-offset-y));
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
}

.chart-frame-hover {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
  transition: box-shadow 0.25s ease;
}

.chart-frame-wrapper:hover .chart-frame-hover {
  box-shadow: 0 0 16px 4px rgba(0, 0, 0, 0.8);
}

.chart-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* BUY TEXT ПОД ГРАФИКОМ */

.buy-text {
  position: absolute;
  top: var(--buy-text-top);
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: none;
  font-family: "Mansalva", cursive;
  font-size: var(--buy-text-font-size);
  color: #000;
  cursor: pointer;
  text-shadow: var(--shadow-strong);
  transition: transform 0.16s ease, text-shadow 0.16s ease;
}

.buy-text:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.05);
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.9),
    0 0 18px rgba(0, 0, 0, 0.8);
}

/* =========================
   SECRET PAGE
========================= */

.secret-content {
  position: relative;
  width: 100%;
  max-width: var(--scene-width);
  margin: 0 auto;
}

.secret-title {
  position: absolute;
  top: var(--secret-title-top);
  left: 50%;
  transform: translateX(-50%);
  font-family: "Mansalva", cursive;
  font-size: var(--secret-title-font-size);
  color: #000;
  text-shadow: var(--shadow-strong);
}

/* PLAY BUTTON */

.play-button {
  position: absolute;
  top: var(--play-button-top);
  left: var(--play-button-left);
  transform: translateX(-50%);
  width: var(--play-button-size);
  height: var(--play-button-size);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  animation: play-jitter 0.35s ease-in-out infinite alternate;
}

.play-button img {
  width: 100%;
  height: 100%;
  display: block;
}

.play-button:hover {
  animation-duration: 0.25s;
  transform: translateX(-50%) scale(1.04);
}

@keyframes play-jitter {
  0% {
    transform: translateX(-50%) translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translateX(-50%) translate(-2px, 1px) rotate(-2deg);
  }
  50% {
    transform: translateX(-50%) translate(2px, -1px) rotate(2deg);
  }
  75% {
    transform: translateX(-50%) translate(-1px, 2px) rotate(-1deg);
  }
  100% {
    transform: translateX(-50%) translate(1px, -2px) rotate(1deg);
  }
}

/* =========================
   ADAPTIVE
========================= */

@media (max-width: 1024px) {
  :root {
    --nav-font-size: 18px;
    --main-title-font-size: 60px;
    --main-subtitle-font-size: 22px;

    --chart-frame-width: 80vw;
    --chart-frame-height: 45vw;

    --play-button-size: 220px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-top: 16px;
    --nav-left: 16px;
    --nav-gap: 12px;
    --nav-font-size: 16px;

    --main-title-top: 190px;
    --main-title-font-size: 48px;
    --main-subtitle-offset-y: 50px;
    --main-subtitle-font-size: 18px;

    --chart-title-top: 60px;
    --chart-title-font-size: 50px;
    --chart-frame-top: 180px;
    --chart-frame-width: 88vw;
    --chart-frame-height: 52vw;
    --buy-text-top: 560px;
    --buy-text-font-size: 32px;

    --secret-title-top: 60px;
    --secret-title-font-size: 50px;
    --play-button-top: 260px;
    --play-button-size: 200px;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-font-size: 14px;

    --main-title-font-size: 40px;
    --main-subtitle-font-size: 16px;

    --chart-title-font-size: 40px;
    --secret-title-font-size: 40px;

    --buy-text-font-size: 26px;
    --play-button-size: 170px;
  }
}
