@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Lora:ital,wght@0,400;1,400&family=Sacramento&display=swap');

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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a472a;
  background-image:
    radial-gradient(ellipse at 20% 50%, #1e5631 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, #2d6a3f 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, #0d2818 0%, transparent 50%);
  overflow-x: hidden;
  padding: 40px 0;
  font-family: 'Lora', serif;
}

/* Floating golf balls in background */
.bg-ball {
  position: fixed;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #e8e8e8, #d0d0d0);
  opacity: 0.08;
  z-index: 0;
}

.bg-ball::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 4px;
  width: 22px;
  height: 14px;
  background: repeating-conic-gradient(transparent 0 4deg, rgba(0,0,0,0.03) 4deg 8deg);
  border-radius: 50%;
}

.bg-ball:nth-child(1) { top: 10%; left: 5%; animation: floatBall 18s ease-in-out infinite; }
.bg-ball:nth-child(2) { top: 20%; right: 10%; animation: floatBall 22s ease-in-out infinite 2s; width: 20px; height: 20px; }
.bg-ball:nth-child(3) { top: 60%; left: 8%; animation: floatBall 20s ease-in-out infinite 4s; width: 25px; height: 25px; }
.bg-ball:nth-child(4) { top: 75%; right: 5%; animation: floatBall 25s ease-in-out infinite 1s; }
.bg-ball:nth-child(5) { top: 40%; left: 3%; animation: floatBall 19s ease-in-out infinite 3s; width: 18px; height: 18px; }
.bg-ball:nth-child(6) { bottom: 10%; left: 15%; animation: floatBall 21s ease-in-out infinite 5s; width: 22px; height: 22px; }

@keyframes floatBall {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-30px) rotate(90deg); }
  50% { transform: translateY(10px) rotate(180deg); }
  75% { transform: translateY(-20px) rotate(270deg); }
}

/* Card container */
.card-scene {
  perspective: 1200px;
  z-index: 1;
}

.card {
  width: 550px;
  min-height: 750px;
  position: relative;
  transform-style: preserve-3d;
  animation: cardEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  cursor: default;
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: rotateY(-15deg) rotateX(10deg) scale(0.8) translateY(60px);
  }
  100% {
    opacity: 1;
    transform: rotateY(0) rotateX(0) scale(1) translateY(0);
  }
}

.card:hover {
  transform: rotateY(-2deg) rotateX(1deg) scale(1.01);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-inner {
  background: linear-gradient(170deg, #f8f6f0 0%, #f0ece0 40%, #e8e2d0 100%);
  border-radius: 20px;
  padding: 50px 45px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.4),
    0 10px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  min-height: 750px;
}

/* Subtle paper texture overlay */
.card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Gold decorative border */
.card-inner::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #c9a94e, #f0d975, #c9a94e, #a07d2e, #c9a94e, #f0d975, #c9a94e) 1;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

.card-content {
  position: relative;
  z-index: 2;
}

/* Golf course header scene */
.golf-scene {
  position: relative;
  height: 200px;
  margin: -10px -10px 30px -10px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg,
    #87CEEB 0%,
    #a8d8ea 35%,
    #c8e6c9 50%,
    #4caf50 52%,
    #388e3c 55%,
    #2e7d32 100%
  );
}

/* Sun */
.sun {
  position: absolute;
  top: 20px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, #fff8c4, #ffd54f, #ffb300);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(255, 193, 7, 0.5), 0 0 80px rgba(255, 193, 7, 0.2);
  animation: sunGlow 4s ease-in-out infinite;
}

@keyframes sunGlow {
  0%, 100% { box-shadow: 0 0 40px rgba(255, 193, 7, 0.5), 0 0 80px rgba(255, 193, 7, 0.2); }
  50% { box-shadow: 0 0 50px rgba(255, 193, 7, 0.6), 0 0 100px rgba(255, 193, 7, 0.3); }
}

/* Clouds */
.cloud {
  position: absolute;
  background: white;
  border-radius: 50px;
  opacity: 0.8;
}

.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud-1 {
  width: 80px;
  height: 25px;
  top: 25px;
  left: -20px;
  animation: cloudDrift 35s linear infinite;
}
.cloud-1::before { width: 40px; height: 40px; top: -20px; left: 15px; }
.cloud-1::after { width: 30px; height: 30px; top: -12px; left: 45px; }

.cloud-2 {
  width: 60px;
  height: 20px;
  top: 50px;
  left: 30%;
  animation: cloudDrift 45s linear infinite 10s;
  opacity: 0.6;
}
.cloud-2::before { width: 30px; height: 30px; top: -15px; left: 10px; }
.cloud-2::after { width: 25px; height: 25px; top: -10px; left: 35px; }

.cloud-3 {
  width: 70px;
  height: 22px;
  top: 15px;
  left: 50%;
  animation: cloudDrift 40s linear infinite 20s;
  opacity: 0.7;
}
.cloud-3::before { width: 35px; height: 35px; top: -18px; left: 12px; }
.cloud-3::after { width: 28px; height: 28px; top: -12px; left: 40px; }

@keyframes cloudDrift {
  0% { transform: translateX(-150px); }
  100% { transform: translateX(700px); }
}

/* Rolling hills */
.hills {
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 120%;
  height: 120px;
}

.hill {
  position: absolute;
  border-radius: 50%;
  bottom: -50%;
}

.hill-1 {
  width: 160%;
  height: 200%;
  left: -30%;
  background: linear-gradient(180deg, #66bb6a, #4caf50);
}

.hill-2 {
  width: 80%;
  height: 160%;
  left: 40%;
  background: linear-gradient(180deg, #81c784, #66bb6a);
  bottom: -60%;
}

/* Flag on the green */
.flag-container {
  position: absolute;
  bottom: 40px;
  right: 60px;
  z-index: 3;
}

.flag-pole {
  width: 3px;
  height: 65px;
  background: linear-gradient(to bottom, #e0e0e0, #bdbdbd);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.flag {
  position: absolute;
  bottom: 55px;
  left: 2px;
  width: 35px;
  height: 22px;
  background: linear-gradient(135deg, #e53935, #c62828);
  clip-path: polygon(0 0, 100% 25%, 100% 75%, 0 100%);
  animation: flagWave 3s ease-in-out infinite;
  transform-origin: left center;
}

@keyframes flagWave {
  0%, 100% { transform: skewY(0deg) scaleX(1); }
  25% { transform: skewY(-2deg) scaleX(0.95); }
  75% { transform: skewY(2deg) scaleX(1.02); }
}

.flag-hole {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 8px;
  background: #1b5e20;
  border-radius: 50%;
  border: 1px solid #0d3b0d;
}

/* Golf ball bouncing into scene */
.golf-ball-animated {
  position: absolute;
  bottom: 35px;
  right: 45px;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 35% 35%, #ffffff, #f5f5f5, #e0e0e0);
  border-radius: 50%;
  z-index: 4;
  animation: ballRoll 4s ease-out 1.5s both;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.golf-ball-animated::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 2px;
  width: 10px;
  height: 7px;
  background: repeating-conic-gradient(transparent 0 8deg, rgba(0,0,0,0.04) 8deg 16deg);
  border-radius: 50%;
}

@keyframes ballRoll {
  0% { transform: translateX(200px) translateY(-150px); opacity: 0; }
  10% { opacity: 1; }
  30% { transform: translateX(80px) translateY(0px); }
  40% { transform: translateX(60px) translateY(-20px); }
  50% { transform: translateX(40px) translateY(0px); }
  60% { transform: translateX(25px) translateY(-8px); }
  70% { transform: translateX(12px) translateY(0px); }
  80% { transform: translateX(5px) translateY(-3px); }
  90% { transform: translateX(2px) translateY(0px); }
  100% { transform: translateX(0px) translateY(0px); }
}

/* Heading */
.heading {
  text-align: center;
  margin-bottom: 8px;
}

.heading h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 3rem;
  color: #1a472a;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.heading .subtitle {
  font-family: 'Sacramento', cursive;
  font-size: 2.5rem;
  color: #c9a94e;
  margin-top: -2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Name */
.name-section {
  text-align: center;
  margin: 20px 0;
}

.name-section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 4rem;
  background: linear-gradient(135deg, #c9a94e, #f0d975, #c9a94e, #a07d2e);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(201, 169, 78, 0.3));
}

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

/* Divider with golf ball */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 25px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c9a94e, transparent);
}

.divider-ball {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 35% 35%, #ffffff, #f0f0f0, #d8d8d8);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  flex-shrink: 0;
}

.divider-ball::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 3px;
  width: 14px;
  height: 10px;
  background: repeating-conic-gradient(transparent 0 6deg, rgba(0,0,0,0.04) 6deg 12deg);
  border-radius: 50%;
}

/* Message */
.message {
  text-align: center;
  padding: 0 15px;
  margin-bottom: 25px;
}

.message p {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  color: #3e4a3e;
  line-height: 1.8;
  margin-bottom: 12px;
}

.message .golf-pun {
  font-family: 'Lora', serif;
  font-style: italic;
  color: #1a472a;
  font-size: 1.05rem;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(26, 71, 42, 0.05), rgba(76, 175, 80, 0.05));
  border-radius: 10px;
  border-left: 3px solid #c9a94e;
  margin-top: 15px;
}

/* Ben photo */
.ben-photo {
  text-align: center;
  margin: 25px auto;
  max-width: 280px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 3px solid #c9a94e;
  opacity: 0;
  animation: photoReveal 0.8s ease-out 1.2s forwards;
}

.ben-photo img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes photoReveal {
  0% { opacity: 0; transform: scale(0.9) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Golf icons row */
.golf-icons {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 25px 0;
}

.golf-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: iconPop 0.5s ease-out forwards;
}

.golf-icon:nth-child(1) { animation-delay: 1.8s; }
.golf-icon:nth-child(2) { animation-delay: 2.0s; }
.golf-icon:nth-child(3) { animation-delay: 2.2s; }
.golf-icon:nth-child(4) { animation-delay: 2.4s; }

@keyframes iconPop {
  0% { opacity: 0; transform: scale(0) translateY(20px); }
  60% { transform: scale(1.2) translateY(-5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.golf-icon svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.golf-icon span {
  font-size: 0.7rem;
  color: #7a8a7a;
  font-family: 'Lora', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Signature */
.signature {
  text-align: center;
  margin-top: 30px;
}

.signature p {
  font-family: 'Sacramento', cursive;
  font-size: 1.8rem;
  color: #1a472a;
}

/* Interactive swing button */
.swing-btn {
  display: block;
  margin: 20px auto 0;
  padding: 12px 30px;
  width: calc(100% - 60px);
  max-width: 260px;
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  color: #f8f6f0;
  background: linear-gradient(135deg, #1a472a, #2e7d32);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(26, 71, 42, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.swing-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
  transition: transform 0.6s ease;
  transform: translateX(-100%);
}

.swing-btn:hover::before {
  transform: translateX(100%);
}

.swing-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 71, 42, 0.4);
}

.swing-btn:active {
  transform: translateY(0);
}

/* Gift outline button */
.gift-btn {
  display: block;
  margin: 12px auto 0;
  padding: 12px 30px;
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  color: #1a472a;
  background: transparent;
  border: 2px solid #1a472a;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  width: calc(100% - 60px);
  max-width: 260px;
  box-sizing: border-box;
}

.gift-btn:hover {
  background: #1a472a;
  color: #f8f6f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 71, 42, 0.3);
}

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

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  opacity: 0;
}

/* Scorecard style birthday message */
.scorecard {
  background: white;
  border-radius: 10px;
  padding: 15px 20px;
  margin: 20px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
}

.scorecard-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #1a472a;
  text-align: center;
  margin-bottom: 12px;
  font-weight: 700;
}

.scorecard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.scorecard-row:last-child {
  border-bottom: none;
}

.scorecard-label {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  color: #666;
}

.scorecard-value {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a472a;
}

.scorecard-value.highlight {
  color: #c9a94e;
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .card {
    width: 92vw;
    min-height: auto;
  }

  .card-inner {
    padding: 30px 25px;
  }

  .heading h1 {
    font-size: 2.2rem;
  }

  .heading .subtitle {
    font-size: 1.8rem;
  }

  .name-section h2 {
    font-size: 2.8rem;
  }

  .golf-scene {
    height: 150px;
  }

  .golf-icons {
    gap: 15px;
  }

  .golf-icon svg {
    width: 32px;
    height: 32px;
  }
}
