:root {
  --text-main: #36231a;
  --text-muted: #755547;
  --primary-accent: #e06d44;
  --primary-accent-light: #fff0e7;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(255, 255, 255, 0.95);
  --font-heading: 'Fredoka', 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: #fff8f3;
  background-image: 
    radial-gradient(at 15% 15%, #ffd6e0 0px, transparent 40%),
    radial-gradient(at 85% 10%, #d8f3dc 0px, transparent 38%),
    radial-gradient(at 50% 90%, #ffe5d9 0px, transparent 45%),
    linear-gradient(135deg, #fff9f5 0%, #fff2ec 50%, #f6fcf8 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient glow orbs in the background */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: #ffc4d6;
  top: -100px;
  left: -80px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: #d0f4de;
  bottom: -120px;
  right: -80px;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* Card */
.bunny-card {
  width: min(100%, 580px);
  text-align: center;
  padding: 36px 32px 32px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--card-border);
  border-radius: 28px;
  box-shadow: 
    0 12px 35px -8px rgba(110, 65, 45, 0.12),
    0 30px 65px -12px rgba(95, 50, 30, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
  animation: cardEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bunny-card:hover {
  box-shadow: 
    0 16px 40px -8px rgba(110, 65, 45, 0.15),
    0 35px 75px -12px rgba(95, 50, 30, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-header {
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 14px;
  color: var(--primary-accent);
  background: var(--primary-accent-light);
  border: 1px solid rgba(224, 109, 68, 0.2);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.today-date {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Image Frame */
.image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 20px;
  background: #fdf3ed;
  box-shadow:
    0 10px 24px -4px rgba(85, 48, 30, 0.14),
    0 4px 10px -2px rgba(85, 48, 30, 0.06);
  border: 6px solid #ffffff;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.boop-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(54, 35, 26, 0.72);
  color: #fff8f3;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.image-frame.is-loaded:hover .boop-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Shimmer placeholder */
.skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #f8e9e1 0%,
    #fef5f0 50%,
    #f8e9e1 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite linear;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.image-frame.is-loaded .skeleton-shimmer {
  opacity: 0;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.bunny-image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bunny-image.loaded {
  opacity: 1;
  transform: scale(1);
}

.image-frame:hover .bunny-image.loaded {
  transform: scale(1.025);
}

/* Meta Row & Badges */
.meta-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.bunny-caption,
.bunny-mood {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(130, 70, 40, 0.06);
  transition: transform 0.2s ease, background 0.2s ease;
}

.bunny-caption {
  color: #7a3a1b;
  background: #fff3ec;
  border: 1px solid #ffd7c0;
}

.bunny-mood {
  color: #2f5e43;
  background: #eef9f1;
  border: 1px solid #bfe6cb;
}

.bunny-caption:hover,
.bunny-mood:hover {
  transform: translateY(-1px);
}

/* Action Bar */
.action-bar {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

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

.boop-btn {
  background: linear-gradient(135deg, #eb7d54 0%, #d95c34 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px -4px rgba(217, 92, 52, 0.45);
}

.boop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(217, 92, 52, 0.55);
}

.boop-btn.is-booped {
  animation: boopPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes boopPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.boop-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  font-size: 0.84rem;
  min-width: 24px;
}

.secondary-btn {
  background: #ffffff;
  color: var(--text-main);
  border-color: #eedad0;
  box-shadow: 0 3px 10px rgba(95, 50, 30, 0.06);
}

.secondary-btn:hover {
  transform: translateY(-2px);
  background: #fff9f5;
  border-color: #e4c3b2;
}

/* Fun Fact Box */
.fact-box {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(255, 246, 240, 0.85);
  border: 1px solid #f5ddd0;
  border-radius: 18px;
  text-align: left;
}

.fact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-accent);
  margin-bottom: 4px;
}

.bunny-fact {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.48;
  color: var(--text-muted);
  font-weight: 600;
}

/* Floating Emoji Confetti */
.confetti-particle {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  font-size: 1.35rem;
  user-select: none;
  animation: confettiBurst 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes confettiBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.25) rotate(var(--rot));
  }
}

/* Fallback Message */
.fallback-message {
  margin-top: 20px;
  padding: 16px;
  background: #fff2ed;
  border: 1px dashed #e8b5a0;
  border-radius: 16px;
  color: #8c4728;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

.fallback-message[hidden] {
  display: none;
}

.fallback-icon {
  font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 520px) {
  .page {
    padding: 16px;
  }

  .bunny-card {
    padding: 24px 18px 22px;
    border-radius: 22px;
  }

  .image-frame {
    border-width: 5px;
    border-radius: 16px;
  }

  .today-date {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 1.85rem;
  }
}
