/* =========================
   Magica — one screen + duck preloader + side ducks + music duck party
   ========================= */

/* Reset */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  color: #fff;
  background: #000;
  overflow: hidden; /* one screen */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

:root{
  --bg:#000;
  --fg:#fff;
  --accent:#3498db;
  --accent2:#9c27b0;
  --accent3:#2ecc71;

  --border:rgba(52,152,219,.30);
  --card:rgba(0,0,0,.55);
  --shadow:0 0 20px rgba(0,0,0,.35);
}

/* =========================
   PRELOADER (duck icon, no text)
   ========================= */
.preloader{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(140, 0, 255, 0.12), transparent 55%),
    radial-gradient(circle at 30% 70%, rgba(0, 183, 255, 0.10), transparent 60%),
    #000;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.preloader.hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner{
  position: relative;
  width: min(520px, 90vw);
  height: min(320px, 60vh);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.45);
  box-shadow: 0 0 60px rgba(0,0,0,.85), 0 0 26px rgba(140,0,255,.10);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.duck-loader{
  font-size: clamp(64px, 10vw, 120px);
  line-height: 1;
  transform: translateZ(0);
  animation: duckPulse 900ms ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(52,152,219,.20));
}

.duck-bubbles{
  position: absolute;
  bottom: 18px;
  display: flex;
  gap: 10px;
  opacity: .9;
}

.duck-bubbles span{
  font-size: 22px;
  animation: bubbleUp 1100ms ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(156,39,176,.18));
}

.duck-bubbles span:nth-child(2){ animation-delay: 160ms; opacity: .75; }
.duck-bubbles span:nth-child(3){ animation-delay: 320ms; opacity: .55; }

/* =========================
   DUCK PARTY OVERLAY
   ========================= */
.duck-party{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.duck-party.active{
  opacity: 1;
  visibility: visible;
}

.duck-particle{
  position: absolute;
  left: var(--x);
  top: -10vh;
  font-size: var(--s);
  line-height: 1;
  opacity: .9;
  will-change: transform;
  filter: drop-shadow(0 0 10px rgba(52,152,219,.18));
  animation: duckFall var(--d) linear var(--dl) infinite;

  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Pop */
.duck-particle.popped{
  animation: duckPop 260ms ease-out forwards !important;
}

@keyframes duckPop{
  0%   { transform: scale(1); opacity: .95; }
  70%  { transform: scale(1.4); opacity: .6; }
  100% { transform: scale(0.2); opacity: 0; }
}

.pop-burst{
  position: fixed;
  width: 1px;
  height: 1px;
  pointer-events: none;
  z-index: 90;
}

.pop-burst::after{
  content:"";
  position:absolute;
  left:-14px;
  top:-14px;
  width:28px;
  height:28px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.25);
  box-shadow: 0 0 18px rgba(52,152,219,.18);
  animation: burstRing 520ms ease-out forwards;
}

.pop-burst i{
  position:absolute;
  left:0;
  top:0;
  width:7px;
  height:7px;
  border-radius:50%;
  border:1px solid rgba(52,152,219,.55);
  box-shadow: 0 0 10px rgba(52,152,219,.18);
  transform: rotate(calc(var(--i) * 45deg)) translateX(0);
  animation: burstBubble 520ms ease-out forwards;
}

@keyframes burstBubble{
  0%   { transform: rotate(calc(var(--i) * 45deg)) translateX(0) scale(1); opacity: 1; }
  100% { transform: rotate(calc(var(--i) * 45deg)) translateX(26px) scale(.65); opacity: 0; }
}

@keyframes burstRing{
  0%   { transform: scale(.55); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}


@keyframes duckFall{
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: .95; }
  100% { transform: translate3d(var(--dr), 120vh, 0) rotate(var(--rt)); opacity: .95; }
}

/* subtle background pulse while party is on */
body.party-on .hero::before{
  animation: partyPulse 900ms ease-in-out infinite;
}

@keyframes partyPulse{
  0%,100%{ filter: saturate(1) brightness(1); }
  50%{ filter: saturate(1.2) brightness(1.06); }
}

/* =========================
   HERO
   ========================= */
.hero{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 18px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 20% 30%, rgba(76,0,255,.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(0,183,255,.18) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(76,0,255,.10) 0%, rgba(0,0,0,1) 72%);
  z-index:0;
}

.hero-content{
  position: relative;
  z-index: 2;
  max-width: 980px;
  width: 100%;
  padding: 0 12px;
  animation: fadeInUp 600ms ease-out both;
}

/* Sound button */
.sound-toggle{
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 80;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
  backdrop-filter: blur(6px);
}

.sound-toggle:hover{
  transform: translateY(-2px);
  border-color: rgba(52,152,219,.45);
  background: rgba(52,152,219,.10);
}

.sound-icon{
  font-size: 22px;
  line-height: 1;
}

/* One duck that crosses the whole screen (right -> left) */
.duck-fly{
  position: absolute;
  top: 26vh;
  left: 110vw;
  z-index: 1;
  pointer-events: none;

  font-size: clamp(28px, 4vw, 56px);
  opacity: .26;
  filter: drop-shadow(0 0 14px rgba(52,152,219,.16));
  will-change: transform;

  animation: duckAcross 18s linear infinite;
}

.duck-fly-emoji{
  display: block;
  line-height: 1;
  transform: rotate(-6deg);
  animation: duckBob 2.8s ease-in-out infinite;
}

@keyframes duckAcross{
  from{ transform: translateX(0); }
  to{ transform: translateX(-140vw); }
}

@keyframes duckBob{
  0%,100%{ transform: translateY(0) rotate(-6deg); }
  50%{ transform: translateY(-12px) rotate(-6deg); }
}

@media (prefers-reduced-motion: reduce){
  .duck-fly, .duck-party { display:none; }
}

/* Ducks on the sides */
.duck-decor{
  position: absolute;
  z-index: 1;
  pointer-events: none;
  font-size: clamp(40px, 6vw, 72px);
  opacity: .38;
  filter: drop-shadow(0 0 14px rgba(52,152,219,.18));
}

/* Animate the inner span so parent transform (rotate/flip) is never overwritten */
.duck-emoji{
  display: block;
  line-height: 1;
  transform: translateZ(0);
  animation: duckFloat 7s ease-in-out infinite;
}

.duck-left{ left: 18px; }
.duck-right{ right: 18px; }

.duck-left-1{ top: 18vh; transform: rotate(-10deg) scaleX(-1); }
.duck-left-2{ bottom: 14vh; transform: rotate(12deg) scaleX(-1); }

.duck-right-1{ top: 14vh; transform: rotate(10deg); }
.duck-right-2{ top: 44vh; transform: rotate(-6deg); }
.duck-right-3{ bottom: 10vh; transform: rotate(6deg); }

.duck-left-2 .duck-emoji{ animation-duration: 8.5s; }
.duck-right-1 .duck-emoji{ animation-duration: 7.8s; }
.duck-right-2 .duck-emoji{ animation-duration: 9.2s; }
.duck-right-3 .duck-emoji{ animation-duration: 8.8s; }

@keyframes duckFloat{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-12px); }
}

/* Center content */
.floating-logo{
  display:flex;
  justify-content:center;
  margin-bottom: 18px;
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}

.hero-logo{
  width: min(360px, 78vw);
  height: auto;
  object-fit: contain;
}

/* Wallet */
.wallet-label{
  margin: 0 0 8px;
  color: rgba(255,255,255,.78);
  font-weight: 700;
  letter-spacing: .3px;
  font-size: 0.95rem;
}

.wallet-address{
  margin: 0 0 18px;
  font-weight: 700;
  font-size: clamp(0.95rem, 2.2vw, 1.55rem);
  line-height: 1.25;

  background-image: linear-gradient(90deg, var(--accent2), var(--accent), var(--accent3));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  animation: gradientText 7s ease infinite;
  text-shadow:
    0 0 2px rgba(255,255,255,.08),
    0 0 10px rgba(52,152,219,.18);

  overflow-wrap: anywhere;
}

/* Email block */
/* force each item to stack vertically */
.contact-inline{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}


.contact-label{
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: .2px;
  color: rgba(255,255,255,.92);
}

.email-link{
  display: inline-block;
  font-weight: 800;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(52,152,219,.45);
  background: rgba(52,152,219,.12);
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.email-link:hover{
  transform: translateY(-2px);
  background: rgba(52,152,219,.18);
  border-color: rgba(52,152,219,.75);
}

/* Viber button beneath email */
.viber-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;

  background: rgba(124,77,255,.18);
  border: 1px solid rgba(124,77,255,.55);
  color: #fff;

  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.viber-link i{
  font-size: 20px;
  line-height: 1;
}

.viber-link:hover{
  transform: translateY(-2px);
  background: rgba(124,77,255,.28);
  border-color: rgba(124,77,255,.85);
}





.copyright{
  display:block;
  margin-top: 18px;
  color: rgba(255,255,255,.55);
}

/* Animations */
@keyframes fadeInUp{
  from{ opacity:0; transform:translateY(14px); }
  to{ opacity:1; transform:translateY(0); }
}

@keyframes float{
  0%{ transform:translateY(0); }
  50%{ transform:translateY(-14px); }
  100%{ transform:translateY(0); }
}

@keyframes gradientText{
  0%{ background-position:0% center; }
  50%{ background-position:100% center; }
  100%{ background-position:0% center; }
}

@keyframes duckPulse{
  0%{ transform: scale(1); opacity: .85; }
  50%{ transform: scale(1.08); opacity: 1; }
  100%{ transform: scale(1); opacity: .9; }
}

@keyframes bubbleUp{
  0%{ transform: translateY(0); opacity: .2; }
  50%{ transform: translateY(-10px); opacity: .9; }
  100%{ transform: translateY(0); opacity: .35; }
}
