:root {
  --color-orange: #ff9f1c;
  --color-yellow: #ffbf69;
  --color-sky-blue: #cbf3f0;
  --color-teal: #2ec4b6;
  --color-green: #7cb518;
  --color-dark-green: #5c8a11;
  --color-text: #2b2d42;
  --color-white: #ffffff;
  --color-red: #e71d36;
}

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

body {
  font-family: "Nunito", sans-serif;
  color: var(--color-text);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--color-sky-blue);
  position: relative;
}

/* Typography */
h1,
h2,
h3,
.ca-text,
.ca-label {
  font-family: "Fredoka One", cursive;
}

/* Background Animations */
.sky-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(180deg, #a8dadc 0%, var(--color-sky-blue) 100%);
  z-index: -2;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 10%;
  right: 15%;
  width: 150px;
  height: 150px;
  background: #ffd166;
  border-radius: 50%;
  box-shadow: 0 0 60px #ffd166;
  animation: pulse 4s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 60px #ffd166;
  }
  100% {
    transform: scale(1.1);
    box-shadow:
      0 0 90px #ffd166,
      0 0 20px #ffd166 inset;
  }
}

.cloud {
  position: absolute;
  background: white;
  border-radius: 50px;
  opacity: 0.9;
  animation: drift linear infinite;
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud-1 {
  width: 180px;
  height: 60px;
  top: 15%;
  left: -200px;
  animation-duration: 40s;
}
.cloud-1::before {
  width: 80px;
  height: 80px;
  top: -35px;
  left: 25px;
}
.cloud-1::after {
  width: 100px;
  height: 100px;
  top: -50px;
  left: 60px;
}

.cloud-2 {
  width: 120px;
  height: 40px;
  top: 30%;
  left: -150px;
  animation-duration: 25s;
  animation-delay: -5s;
  opacity: 0.7;
}
.cloud-2::before {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 15px;
}
.cloud-2::after {
  width: 70px;
  height: 70px;
  top: -35px;
  left: 35px;
}

.cloud-3 {
  width: 250px;
  height: 80px;
  top: 50%;
  left: -300px;
  animation-duration: 55s;
}
.cloud-3::before {
  width: 100px;
  height: 100px;
  top: -45px;
  left: 35px;
}
.cloud-3::after {
  width: 130px;
  height: 130px;
  top: -65px;
  left: 80px;
}

@keyframes drift {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(120vw);
  }
}

/* Layout */
.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  z-index: 10;
  position: relative;
  padding-bottom: 8rem;
  text-align: center;
}

/* Hero */
.hero-section {
  animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  0% {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.floating-image-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.image-wrapper {
  position: relative;
  padding: 10px;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: float 5s ease-in-out infinite;
  z-index: 2;
  border: 8px solid var(--color-orange);
}

.miko-img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

.sparkles {
  position: absolute;
  font-size: 2rem;
  animation: twinkle 1.5s infinite alternate;
  z-index: 3;
  pointer-events: none;
}

.sparkle-1 {
  top: 10%;
  right: -10px;
  animation-delay: 0s;
}
.sparkle-2 {
  bottom: 15%;
  left: -20px;
  font-size: 2.5rem;
  animation-delay: 0.5s;
}
.sparkle-3 {
  top: 40%;
  left: -15px;
  font-size: 1.5rem;
  animation-delay: 1s;
}

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

/* Typography */
.main-title {
  font-size: 4.5rem;
  color: var(--color-white);
  text-shadow:
    4px 4px 0px var(--color-orange),
    8px 8px 0px rgba(0, 0, 0, 0.1);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  transform: rotate(-2deg);
}

.sub-title {
  font-size: 2.2rem;
  color: var(--color-teal);
  text-shadow: 2px 2px 0px var(--color-white);
  margin-bottom: 3rem;
  font-weight: 800;
}

/* CA Section */
.ca-section {
  background: var(--color-white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border: 5px solid var(--color-teal);
  transform: rotate(1deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 700px;
  margin: 0 auto 3rem auto;
  position: relative;
  overflow: hidden;
}

.ca-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: repeating-linear-gradient(
    45deg,
    var(--color-yellow),
    var(--color-yellow) 10px,
    var(--color-orange) 10px,
    var(--color-orange) 20px
  );
}

.ca-section:hover {
  transform: rotate(-1deg) scale(1.02);
}

.ca-label {
  font-size: 1.3rem;
  color: var(--color-orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.ca-box {
  display: flex;
  align-items: center;
  background: #f4f6f8;
  border-radius: 12px;
  padding: 0.8rem;
  border: 3px dashed #cbd5e1;
  gap: 1rem;
}

.ca-text {
  flex-grow: 1;
  font-size: 1.15rem;
  color: var(--color-text);
  word-break: break-all;
  user-select: all;
}

.copy-btn {
  background: var(--color-orange);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-family: "Fredoka One", cursive;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 5px 0 #cd7a0a;
}

.copy-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #cd7a0a;
  background: #ffa52e;
}

.copy-btn:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 #cd7a0a;
}

.copy-btn.copied {
  background: var(--color-green);
  box-shadow: 0 5px 0 var(--color-dark-green);
}

.copy-btn.copied:active {
  box-shadow: 0 0 0 var(--color-dark-green);
}

/* Socials Section */
.socials-section {
  animation: slideUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.3s;
}

@keyframes slideUp {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.social-title {
  font-size: 2.5rem;
  color: var(--color-white);
  text-shadow: 3px 3px 0px var(--color-teal);
  margin-bottom: 1.5rem;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  color: white;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-btn:hover {
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 18px 0 rgba(0, 0, 0, 0.15);
}

.social-btn:active {
  transform: translateY(10px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.15);
}

.telegram-btn {
  background: #0088cc;
  border: 4px solid white;
}

.twitter-btn {
    background: #000000;
    border: 4px solid white;
}

.handle-text {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: var(--color-white);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
    opacity: 0.9;
}

/* Chart Section */
.chart-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
    animation: slideUp 1s ease forwards;
    opacity: 0;
    animation-delay: 0.1s;
}

.chart-title {
    font-size: 2.5rem;
    color: var(--color-white);
    text-shadow: 3px 3px 0px var(--color-dark-green);
    margin-bottom: 1.5rem;
    transform: rotate(1deg);
}

.chart-container {
    background: var(--color-white);
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 6px solid var(--color-teal);
    height: 500px;
    overflow: hidden;
    position: relative;
}

.chart-container iframe {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    border: none;
}

/* Lore / Story Section */
.lore-section {
    margin-top: 2rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 10;
    animation: slideUp 1s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.lore-title {
    font-size: 3rem;
    color: var(--color-white);
    text-shadow: 3px 3px 0px var(--color-red);
    margin-bottom: 1.5rem;
    transform: rotate(-1.5deg);
}

.story-container {
    perspective: 1000px;
}

.story-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 6px solid var(--color-yellow);
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '🐾';
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 6rem;
    opacity: 0.1;
    transform: rotate(15deg);
}

.story-card:hover {
    transform: rotateX(5deg) rotateY(-5deg) scale(1.02);
    box-shadow: -10px 20px 40px rgba(0,0,0,0.15);
}

.story-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1rem;
    font-weight: 700;
}

.story-text:last-child {
    margin-bottom: 0;
}

/* Ground Area */
.vineyard-ground {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12vh;
  background: var(--color-green);
  border-top: 8px solid var(--color-dark-green);
  z-index: -1;
}

.vineyard-ground::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 40px;
  background: radial-gradient(circle, var(--color-green) 50%, transparent 50%);
  background-size: 80px 80px;
  background-position: 0 10px;
}

.grass {
  position: absolute;
  bottom: 100%;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 30px solid var(--color-dark-green);
}

.grass-1 {
  left: 15%;
  bottom: 80%;
  transform: rotate(-10deg);
}
.grass-2 {
  left: 50%;
  bottom: 85%;
  transform: rotate(5deg);
}
.grass-3 {
  left: 85%;
  bottom: 80%;
  transform: rotate(15deg);
}

.grape-vine {
  position: absolute;
  font-size: 3rem;
  animation: sway 3s infinite alternate ease-in-out;
}

.vine-left {
  bottom: 20px;
  left: 5%;
}
.vine-right {
  bottom: 20px;
  right: 5%;
  animation-delay: 1.5s;
}

@keyframes sway {
  0% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(10deg);
  }
}

/* Confetti Canvas */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 1.5rem; padding-bottom: 8rem; }
    .main-title { font-size: 3.5rem; }
    .sub-title { font-size: 1.8rem; }
    .ca-box { flex-direction: column; }
    .copy-btn { width: 100%; justify-content: center; padding: 1rem; }
    .miko-img { width: 200px; height: 200px; }
    .story-text { font-size: 1.15rem; }
    .lore-title { font-size: 2.5rem; }
    .story-card { padding: 1.5rem; }
    .social-btn { width: 70px; height: 70px; }
    .chart-container { height: 400px; }
    .chart-title { font-size: 2rem; }
}

@media (max-width: 480px) {
    .main-title { font-size: 2.5rem; text-shadow: 2px 2px 0px var(--color-orange); }
    .sub-title { font-size: 1.3rem; }
    .ca-text { font-size: 0.95rem; padding: 0.5rem 0; word-break: break-all; }
    .ca-section { padding: 1.2rem; }
    .ca-label { font-size: 1.1rem; }
    .miko-img { width: 160px; height: 160px; }
    .image-wrapper { padding: 8px; border-width: 5px; }
    .story-text { font-size: 1.05rem; }
    .lore-title { font-size: 2.2rem; }
    .story-card { padding: 1.2rem; border-width: 4px; }
    .social-btn { width: 60px; height: 60px; }
    .social-buttons { gap: 1rem; }
    .social-title { font-size: 2rem; }
    .chart-container { height: 350px; padding: 5px; border-width: 4px; }
    .chart-title { font-size: 1.8rem; }
}
