/* ================================================
   TORI'S 27TH BIRTHDAY - STYLES
   ================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

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

/* ---------- CUSTOM SCROLLBAR ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(102, 126, 234, 0.3); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f093fb, #667eea);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #667eea, #f093fb); }

/* ---------- CONFETTI CANVAS ---------- */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ---------- FLOATING PAW PRINTS ---------- */
.paw-prints {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-paw {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.15;
  animation: floatPaw linear infinite;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.2));
}

@keyframes floatPaw {
  0% {
    transform: translateY(110vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* ---------- HERO SECTION ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.hero-badge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #ffa64d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  box-shadow:
    0 0 0 8px rgba(255,255,255,0.2),
    0 0 0 16px rgba(255,255,255,0.1),
    0 10px 40px rgba(0,0,0,0.2);
  animation: badgePulse 2s ease-in-out infinite;
  letter-spacing: -2px;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255,255,255,0.2), 0 0 0 16px rgba(255,255,255,0.1), 0 10px 40px rgba(0,0,0,0.2); }
  50%      { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(255,255,255,0.3), 0 0 0 24px rgba(255,255,255,0.1), 0 15px 50px rgba(0,0,0,0.25); }
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.bounce-letter {
  display: inline-block;
  animation: bounceLetter 0.6s ease calc(var(--i) * 0.05s) both;
}

@keyframes bounceLetter {
  0%   { opacity: 0; transform: translateY(-40px) scale(0.5); }
  60%  { transform: translateY(8px) scale(1.1); }
  80%  { transform: translateY(-4px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-name {
  font-family: 'Pacifico', cursive;
  font-size: clamp(3rem, 10vw, 6rem);
  color: #ffd700;
  text-shadow: 3px 3px 8px rgba(0,0,0,0.3), 0 0 30px rgba(255,215,0,0.3);
  margin-bottom: 1rem;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.2); }
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  opacity: 0.9;
  max-width: 500px;
  animation: fadeInUp 1s ease 1s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
  animation: bobUpDown 2s ease-in-out infinite;
}

.paw-scroll {
  font-size: 1.5rem;
  animation: spin 4s linear infinite;
}

@keyframes bobUpDown {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- CARDS (SHARED STYLE) ---------- */
.card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 3rem 2rem;
  margin: 2rem auto;
  max-width: 900px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(10deg); }
  75%      { transform: rotate(-10deg); }
}

.card h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.card p {
  font-size: 1.1rem;
  line-height: 1.8;
  font-weight: 300;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto;
}

/* ---------- ABOUT GRID ---------- */
.about-grid {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              background 0.3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  cursor: default;
}

.about-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.about-card-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
  transition: transform 0.3s ease;
}

.about-card:hover .about-card-icon {
  transform: scale(1.3) rotate(10deg);
}

.about-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.about-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
  font-weight: 300;
}

.card-paw {
  position: absolute;
  bottom: -10px;
  right: -10px;
  font-size: 4rem;
  opacity: 0.06;
  transform: rotate(-30deg);
  transition: opacity 0.3s ease;
}

.about-card:hover .card-paw {
  opacity: 0.15;
}

/* ---------- STATS SECTION ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ffd700, #ff6b9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.75;
  font-weight: 400;
  margin-top: 0.25rem;
}

/* ---------- BIRTHDAY CAKE ---------- */
.cake-section { text-align: center; }

.cake-container {
  margin: 2rem auto;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.3s ease;
}

.cake-container:hover {
  transform: scale(1.05);
}

.cake {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candles {
  display: flex;
  gap: 16px;
  margin-bottom: -4px;
  z-index: 2;
  position: relative;
}

.candle {
  width: 8px;
  height: 40px;
  background: linear-gradient(to bottom, #ffd700, #ff9800);
  border-radius: 4px 4px 0 0;
  position: relative;
}

.flame {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 18px;
  background: radial-gradient(ellipse, #fff 0%, #ffd700 40%, #ff6b00 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flicker 0.3s ease-in-out infinite alternate;
  box-shadow: 0 0 10px #ffd700, 0 0 20px rgba(255,165,0,0.5);
}

.flame.blown-out {
  animation: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes flicker {
  0%   { transform: translateX(-50%) scale(1) rotate(-2deg); }
  100% { transform: translateX(-50%) scale(1.1, 0.9) rotate(2deg); }
}

.cake-top {
  width: 180px;
  height: 40px;
  background: linear-gradient(to bottom, #ff8fab, #ff6b9d);
  border-radius: 12px 12px 0 0;
  position: relative;
  z-index: 1;
}

.cake-top::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 10%;
  right: 10%;
  height: 8px;
  background: repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(255,255,255,0.3) 8px, rgba(255,255,255,0.3) 12px);
  border-radius: 4px;
}

.cake-middle {
  width: 200px;
  height: 50px;
  background: linear-gradient(to bottom, #ffa64d, #ff8c00);
  position: relative;
}

.cake-middle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 6px;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
  transform: translateY(-50%);
}

.cake-bottom {
  width: 220px;
  height: 50px;
  background: linear-gradient(to bottom, #e0529d, #c44185);
  border-radius: 0 0 16px 16px;
}

.cake-plate {
  width: 260px;
  height: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 0 0 50% 50%;
  margin-top: 2px;
}

.wish-text {
  font-family: 'Pacifico', cursive;
  font-size: 1.5rem;
  color: #ffd700;
  min-height: 2.5rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.wish-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- BIRTHDAY WISHES ---------- */
.birthday-quote {
  font-size: 1.15rem;
  line-height: 2;
  font-style: italic;
  font-weight: 300;
  max-width: 650px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-left: 4px solid rgba(255,215,0,0.5);
  background: rgba(255,255,255,0.05);
  border-radius: 0 12px 12px 0;
}

.wishes-emojis {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.wish-emoji {
  font-size: 2.5rem;
  display: inline-block;
  animation: emojiFloat 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.3s);
}

@keyframes emojiFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(5deg); }
}

/* ---------- CONFETTI BUTTON ---------- */
.confetti-section { text-align: center; }

.confetti-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #ff6b9d, #ffa64d, #ffd700);
  background-size: 200% 200%;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255,107,157,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: btnGlow 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.confetti-btn::after {
  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: btnShine 4s ease-in-out infinite;
}

@keyframes btnShine {
  0%   { transform: translateX(-100%) rotate(45deg); }
  30%, 100% { transform: translateX(100%) rotate(45deg); }
}

@keyframes btnGlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.confetti-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 36px rgba(255,107,157,0.5);
}

.confetti-btn:active {
  transform: scale(0.95);
}

.confetti-hint {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 1rem;
}

/* ---------- FOOTER ---------- */
.site-footer {
  text-align: center;
  padding: 3rem 1rem 2rem;
  position: relative;
  z-index: 1;
}

.paw-trail {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  opacity: 0.4;
}

.paw-trail span {
  display: inline-block;
  animation: pawStep 2s ease-in-out infinite;
}

.paw-trail span:nth-child(1) { animation-delay: 0s; }
.paw-trail span:nth-child(2) { animation-delay: 0.3s; }
.paw-trail span:nth-child(3) { animation-delay: 0.6s; }
.paw-trail span:nth-child(4) { animation-delay: 0.9s; }
.paw-trail span:nth-child(5) { animation-delay: 1.2s; }

@keyframes pawStep {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  50%      { transform: translateY(-8px) scale(1.15); opacity: 0.7; }
}

.footer-love {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.footer-sub {
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-year {
  font-size: 0.85rem;
  opacity: 0.5;
  margin-top: 0.5rem;
}

/* ---------- SCROLL ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .hero-badge {
    width: 90px;
    height: 90px;
    font-size: 2.2rem;
  }

  .card {
    margin: 1.5rem 1rem;
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .about-grid {
    padding: 0 1rem;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .candles {
    gap: 10px;
  }

  .cake-top    { width: 140px; height: 32px; }
  .cake-middle { width: 160px; height: 40px; }
  .cake-bottom { width: 180px; height: 40px; }
  .cake-plate  { width: 210px; height: 14px; }

  .birthday-quote {
    padding: 1rem 1.25rem;
  }

  .wish-emoji {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 1.5rem;
  }

  .hero-badge {
    width: 75px;
    height: 75px;
    font-size: 1.8rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .confetti-btn {
    font-size: 1rem;
    padding: 0.85rem 2rem;
  }

  .wishes-emojis {
    gap: 0.75rem;
  }

  .candle {
    height: 30px;
    width: 6px;
  }

  .flame {
    width: 10px;
    height: 14px;
    top: -13px;
  }
}

/* ---------- PREFERS REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  body {
    background-size: 100% 100%;
  }

  .floating-paw {
    display: none;
  }
}
