@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --skyblue: #87CEEB;
  --cottoncandy: #FFB6C1;
  --sunshine: #FFD700;
  --white: #FFFFFF;
  --dark: #1A1A1A;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--white);
  color: var(--dark);
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Fredoka', sans-serif;
}

/* Splash Loader */
#loader { transition: opacity 0.7s ease-out; }
.loader-spinner {
  border-top-color: var(--cottoncandy);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Floating Animation */
@keyframes floating {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}
.floating {
  animation: floating 4s ease-in-out infinite;
  will-change: transform;
}

/* Jiggle Hover */
@keyframes jiggle {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-3deg); }
  50% { transform: scale(1.1) rotate(3deg); }
  75% { transform: scale(1.1) rotate(-2deg); }
  100% { transform: scale(1.05) rotate(0deg); }
}
.jiggle-hover:hover {
  animation: jiggle 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Scissors Snip */
@keyframes snip-top {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(12deg); }
}
@keyframes snip-bottom {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-12deg); }
}
.animate-snip-top { animation: snip-top 1s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.animate-snip-bottom { animation: snip-bottom 1s cubic-bezier(0.4, 0, 0.2, 1) infinite; }

/* Stars Sparkle */
@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.6) rotate(15deg); opacity: 0.8; }
}
.animate-sparkle-1 { animation: sparkle 2s infinite; }
.animate-sparkle-2 { animation: sparkle 2s infinite 0.6s; }
.animate-sparkle-3 { animation: sparkle 2s infinite 1.2s; }

/* Falling Hair */
.hair-strand {
    position: absolute;
    top: -60px;
    width: 20px;
    height: 40px;
    border-right: 5px solid var(--h-color);
    border-radius: 50%;
    opacity: 0;
}

@keyframes hair-fall-1 {
    0% { transform: translateY(-50px) translateX(0) rotate(15deg); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: translateY(60vh) translateX(40px) rotate(120deg); }
    90% { opacity: 1; }
    100% { transform: translateY(120vh) translateX(-20px) rotate(220deg); opacity: 0; }
}

@keyframes hair-fall-2 {
    0% { transform: translateY(-50px) translateX(0) rotate(-15deg); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: translateY(60vh) translateX(-40px) rotate(-120deg); }
    90% { opacity: 1; }
    100% { transform: translateY(120vh) translateX(20px) rotate(-220deg); opacity: 0; }
}

/* 🦕 Dino Coiffeur Animations */
.dino-walker {
  position: absolute;
  bottom: 5%;
  left: 0;
  width: 120px;
  height: 120px;
  z-index: 5;
  pointer-events: none;
  animation: dino-walk 14s linear infinite;
}

.dino-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.dino-bounce {
  animation: dino-hop 0.5s ease-in-out infinite;
}

/* Walk across the screen: right to left */
@keyframes dino-walk {
  0% { transform: translateX(calc(100vw + 150px)) scaleX(-1); }
  45% { transform: translateX(calc(50vw - 60px)) scaleX(-1); }
  50% { transform: translateX(calc(50vw - 60px)) scaleX(1); }
  95% { transform: translateX(calc(100vw + 150px)) scaleX(1); }
  96% { transform: translateX(calc(100vw + 150px)) scaleX(-1); }
  100% { transform: translateX(calc(100vw + 150px)) scaleX(-1); }
}

/* Bouncy hop while walking */
@keyframes dino-hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Leg walk cycle */
.dino-leg-left {
  transform-origin: 70px 148px;
  animation: dino-step-left 0.5s ease-in-out infinite;
}

.dino-leg-right {
  transform-origin: 106px 148px;
  animation: dino-step-right 0.5s ease-in-out infinite;
}

@keyframes dino-step-left {
  0%, 100% { transform: rotate(12deg); }
  50% { transform: rotate(-12deg); }
}

@keyframes dino-step-right {
  0%, 100% { transform: rotate(-12deg); }
  50% { transform: rotate(12deg); }
}

/* Tail wag */
.dino-tail {
  transform-origin: 35px 115px;
  animation: dino-tail-wag 0.8s ease-in-out infinite;
}

@keyframes dino-tail-wag {
  0%, 100% { transform: rotate(5deg); }
  50% { transform: rotate(-8deg); }
}

/* Arm with scissors bob */
.dino-arm {
  transform-origin: 120px 108px;
  animation: dino-arm-move 1s ease-in-out infinite;
}

@keyframes dino-arm-move {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(5deg); }
}

/* Shadow pulse while hopping */
.dino-shadow {
  animation: dino-shadow-pulse 0.5s ease-in-out infinite;
}

@keyframes dino-shadow-pulse {
  0%, 100% { rx: 45; ry: 8; opacity: 0.1; }
  50% { rx: 38; ry: 5; opacity: 0.06; }
}

/* Mobile: smaller dino */
@media (max-width: 768px) {
  .dino-walker {
    width: 80px;
    height: 80px;
    bottom: 2%;
  }
}

/* Navbar active status */
nav.scrolled {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}


/* Picture Frames */
.tv-frame {
  border-radius: 40px;
  border: 10px solid var(--sunshine);
  box-shadow: 0 0 25px rgba(255, 182, 193, 0.6);
  background-color: var(--white);
}

.bubble-frame {
  border-radius: 50%;
  border: 8px solid var(--skyblue);
  box-shadow: 0 0 25px rgba(135, 206, 235, 0.6);
  background-color: var(--white);
}

.cloud-frame {
  width: 100%;
  max-width: 500px;
  position: relative;
  overflow: hidden;
  border-radius: 46% 54% 39% 61% / 54% 45% 55% 46%;
  box-shadow: 0 10px 40px rgba(135, 206, 235, 0.4);
  background-color: var(--white);
}

.reveal-elastic {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-elastic.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.scroll-container {
  height: 500px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.scroll-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: scrollVertical 30s linear infinite;
}

.scroll-container:hover .scroll-content {
  animation-play-state: paused;
}

@keyframes scrollVertical {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); } 
}

/* Infinite Marquee Gallery */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 1rem 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  padding-left: 2.5rem;
}

.marquee-track-left {
  animation: marquee-left 35s linear infinite;
}

.marquee-track-right {
  animation: marquee-right 35s linear infinite;
}

/* Pause on hover for interaction */
.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Gallery Item Premium Hover */
.gallery-item {
  width: 260px;
  height: 340px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease;
  border: 4px solid var(--white);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  flex-shrink: 0;
  background: var(--white);
  cursor: pointer;
}

@media (min-width: 768px) {
  .gallery-item {
    width: 320px;
    height: 420px;
  }
}

.gallery-item:hover {
  transform: scale(1.03) translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  z-index: 10;
  border-color: var(--skyblue);
}

.gallery-item video, .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-item:hover video, .gallery-item:hover img {
  transform: scale(1.08);
}

/* Instagram CTA Button */
.instagram-cta {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  background-size: 200% 200%;
  animation: instagram-gradient 4s ease infinite;
  position: relative;
  overflow: hidden;
}

.instagram-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255,255,255,0.15) 50%,
    transparent 70%
  );
  animation: instagram-shimmer 3s ease-in-out infinite;
}

@keyframes instagram-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes instagram-shimmer {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

/* 🎵 Floating Music Button */
.music-btn {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 99;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid var(--white);
  background: var(--cottoncandy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(255, 182, 193, 0.5);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: none;
}

.music-btn:hover {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 10px 30px rgba(255, 182, 193, 0.7);
}

.music-btn.playing {
  background: var(--skyblue);
  box-shadow: 0 6px 20px rgba(135, 206, 235, 0.6);
  border-color: var(--sunshine);
}

.music-btn.playing:hover {
  box-shadow: 0 10px 30px rgba(135, 206, 235, 0.8);
}

.music-icon {
  font-size: 24px;
  display: inline-block;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

.music-btn.playing .music-icon {
  animation: music-bounce 1s ease-in-out infinite;
}

@keyframes music-bounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.15) rotate(-8deg); }
  50% { transform: scale(1) rotate(0deg); }
  75% { transform: scale(1.15) rotate(8deg); }
}

/* Pulse ring to attract attention */
.music-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--cottoncandy);
  animation: music-pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

.music-btn.playing .music-pulse {
  border-color: var(--skyblue);
  animation: none;
  opacity: 0;
}

@keyframes music-pulse-ring {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .music-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    left: 20px;
  }
  .music-icon {
    font-size: 20px;
  }
}
