/* ===================== */
/* 🎨 ROOT — ВСЕ ЦВЕТА   */
/* ===================== */
:root {
  --c-main-bg: rgba(148, 187, 233, 1);
  --c-grad-rose: rgba(238, 174, 202, 1);
  --c-grad-blue: rgba(148, 187, 233, 1);

  --c-white: #ffffff;
  --c-white-05: rgba(255, 255, 255, 0.05);
  --c-white-08: rgba(255, 255, 255, 0.08);
  --c-white-12: rgba(255, 255, 255, 0.12);
  --c-white-15: rgba(255, 255, 255, 0.15);
  --c-white-18: rgba(255, 255, 255, 0.18);
  --c-white-22: rgba(255, 255, 255, 0.22);
  --c-white-25: rgba(255, 255, 255, 0.25);
  --c-white-3: rgba(255, 255, 255, 0.3);
  --c-white-4: rgba(255, 255, 255, 0.4);
  --c-white-6: hsla(0, 0%, 100%, 0.6);
  --c-white-4h: hsla(0, 0%, 100%, 0.4);

  --c-black-shadow: rgba(0, 0, 0, 0.2);
}

/* ===================== */
/* ОСТАЛЬНОЙ CSS С VAR() */
/* ===================== */

@font-face {
  font-family: maksFont;
  src: url(MultiroundPro.otf);
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
  font-family: Arial, Helvetica, sans-serif;

  background-color: var(--c-main-bg);
}

@keyframes bgPulse {
  0% { background-position: 20% 50%; }
  50% { background-position: 80% 50%; }
  100% { background-position: 20% 50%; }
}

h1 {
  font-family: maksFont;
}

.background-color {
  position: fixed;
  height: 100vh;
  width: 100vw;

  background: radial-gradient(circle, var(--c-grad-rose) 0%, var(--c-grad-blue) 30%);
  background-size: 400% 250%;
  animation: bgPulse 15s ease infinite;
  will-change: background-position;
}

.background {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--c-white);
  width: 100%;
  max-width: 800px;
}

#leaf-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;

  pointer-events: none;
  overflow: hidden;
  perspective: 800px;
  z-index: 0;
}

.grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "btn-1 btn-1"
    "btn-2 btn-3"
    "btn-4 btn-5"
    ". ."
    ". ."
    "extra extra";
  grid-gap: 10px;
  justify-content: center;
  margin: auto;
  width: 80%;
}

.btn-1 { grid-area: btn-1; }
.btn-2 { grid-area: btn-2; }
.btn-3 { grid-area: btn-3; }
.btn-4 { grid-area: btn-4; }
.btn-5 { grid-area: btn-5; }
.btn-extra { grid-area: extra; }

.btn-1 {
  width: 100% !important;
}

.btn-2,
.btn-3,
.btn-4,
.btn-5 {
  flex: 1 1 calc(50% - 16px);
  text-align: center;
}

.btn-extra {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.buttons {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* КНОПКИ — CRYSTAL */
.buttons a { 
  display: inline-block;
  position: relative;
  overflow: hidden;
  padding: 12px 28px;

  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;

  color: var(--c-white);

  background: linear-gradient(145deg, var(--c-white-18), var(--c-white-05));
  border: 1px solid var(--c-white-25);

  backdrop-filter: blur(4px) saturate(120%);
  -webkit-backdrop-filter: blur(4px) saturate(120%);

  box-shadow:
    inset 0 1px 1px var(--c-white-25),
    0 8px 24px var(--c-white-08);

  transition: all 0.3s ease;
}

.buttons a img {
  height: 40px;
  width: auto;
  display: block;
}

.buttons a::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 70%;
  height: 200%;
  transform: rotate(25deg);
  background: linear-gradient(90deg, var(--c-white-3), rgba(255, 255, 255, 0));
  filter: blur(10px);
  opacity: 0;
  transition: all 0.5s ease;
  pointer-events: none;
}

.buttons a:hover {
  will-change: transform;
  transform: translateY(-3px) scale(1.02);

  box-shadow:
    inset 0 1px 2px var(--c-white-3),
    0 10px 30px var(--c-white-12);

  background: linear-gradient(145deg, var(--c-white-22), var(--c-white-08));
}

.buttons a:hover::after {
  opacity: 0.8;
  left: 130%;
}

/* ЛИСТИКИ */
.leaf {
  position: absolute;
  top: 0;
  width: 30px;
  opacity: 1;
  pointer-events: none;

  transition: opacity 1s ease;
  animation: fallFade 0.5s ease-in;
}

@keyframes fallFade {
  0% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

.fade-out {
  opacity: 0;
}

/* АВАТАР */
#ava {
  z-index: 1;

  width: 200px;
  height: 200px;

  border-radius: 50%;
  border: 4px solid var(--c-white);
  object-fit: cover;
  box-shadow: 0 0 10px var(--c-black-shadow);

  animation: pulse 3.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

#animation {
  max-width: 100vw;
  will-change: transform;

  position: fixed;
  bottom: 10px;
  right: 20px;

  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;

  transform: translateX(90%);
  transition: transform 1s ease;
  z-index: 999;
}

#animation.open {
  will-change: transform;
  transform: translateX(5%);
}

/* ⚙️ КНОПКА */
#setting-btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  padding: 10px 10px 7px 10px;

  border-radius: 100%;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;

  color: var(--c-white);

  background: linear-gradient(145deg, var(--c-white-18), var(--c-white-05));
  border: 1px solid var(--c-white-25);

  backdrop-filter: blur(4px) saturate(120%);
  -webkit-backdrop-filter: blur(4px) saturate(120%);

  box-shadow:
    inset 0 1px 1px var(--c-white-25),
    0 8px 24px var(--c-white-08);

  transition: all 0.3s ease;
}

.bar {
  transition: transform 0.4s ease, opacity 0.3s ease, width 0.4s ease;
  transform-origin: center;
}

#setting-btn.active .top {
  width: 100%;
  transform: rotate(45deg) translate(0.5px, 4.5px);
}

#setting-btn.active .middle {
  opacity: 0;
}

#setting-btn.active .bottom {
  transform: rotate(-45deg) translate(0.5px, -5px);
}

#setting-btn:hover {
  background: var(--c-white-4);
  transform: scale(1.1);
}

.animation_btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  padding: 8px 14px;

  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;

  color: var(--c-white);

  background: linear-gradient(145deg, var(--c-white-18), var(--c-white-05));
  border: 1px solid var(--c-white-25);

  backdrop-filter: blur(4px) saturate(120%);
  -webkit-backdrop-filter: blur(4px) saturate(120%);

  box-shadow:
    inset 0 1px 1px var(--c-white-25),
    0 8px 24px var(--c-white-08);

  transition: all 0.3s ease;
}

.icon {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  transition: stroke-dashoffset 0.4s ease;
}

#play-btn.active .icon {
  stroke-dashoffset: 0;
}

#play-btn.active .left {
  transform: translate(5px, 0) rotate(45deg) scaleX(0);
  opacity: 0;
}

#play-btn.active .right {
  transform: translate(-2px, -2px) rotate(-45deg) scaleX(0);
  width: 0;
}

.animation_btn:hover {
  background: var(--c-white-3);
  transform: scale(1.05);
}

#made_by {
  position: fixed;
  width: 100%;
  margin: auto;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 10px;

  color: var(--c-white-4h);
  text-align: center;

  backdrop-filter: blur(6px);
  transition: opacity 0.5s ease;
}

#made_by a {
  color: var(--c-white-6);
  font-weight: 600;
}

@media (max-width: 899px) {
  #made_by { top: 90vh; }
  #made_by.active { opacity: 0; }
}

@media (min-width: 900px) {
  #made_by { font-size: 16px; bottom: 10px; }
  #made_by.active { opacity: 1; }
}

body {
  overflow-x: hidden;
}




/* test */
.heart {
  position: fixed;
  font-size: 36px;
  color: rgb(245, 216, 216);
  pointer-events: none;
  animation: heartFloat 1.3s ease-out forwards;
  z-index: 1000;
}

@keyframes heartFloat {
  0% { transform: translateY(0) scale(0.6); opacity: 0.7; }
  100% { transform: translateY(-120px) scale(1.4); opacity: 0; }
}

/* hint box */
#hint-box {
  position: absolute;
  top: 160px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 300px;

  padding: 14px 18px;
  border-radius: 12px;

  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #333;

  background: linear-gradient(145deg, var(--c-white-18), var(--c-white-05));
  border: 1px solid var(--c-white-25);
  backdrop-filter: blur(6px);

  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}

#hint-box.show {
  opacity: 1;
  z-index: 999;
}


@media (max-width: 900px) {
  #hint-box{
    top: 300px;
  }
}
