/* Premium Birthday Wish Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  --gold-primary: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-dark: #AA7C11;
  --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #F5E0A3 50%, #AA7C11 100%);
  --bg-dark: #07090E;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.07);
  --text-white: #F8F9FA;
  --text-gray: rgba(248, 249, 250, 0.6);
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Manrope', sans-serif;
  --shadow-gold: 0 15px 35px -10px rgba(212, 175, 55, 0.25);
  --shadow-glass: 0 30px 60px -15px rgba(0, 0, 0, 0.8);
}

/* Reset & Scrollbar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Beautiful Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* Cinematic Background Gradient & Canvas */
.cinematic-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #111827 0%, #07090E 100%);
  z-index: -2;
  overflow: hidden;
}

#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Page Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header & Intro */
header {
  text-align: center;
  margin-bottom: 4rem;
  padding-top: 2rem;
  position: relative;
}

.alumni-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.05);
  animation: floatBadge 4s ease-in-out infinite;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--gold-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-primary);
}

.title-primary {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.title-primary italic {
  font-style: italic;
  font-weight: 400;
}

.shimmer-text {
  background: linear-gradient(to right, #D4AF37 20%, #FFF5D1 40%, #AA7C11 60%, #D4AF37 80%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: textShimmer 4s linear infinite;
}

.subtitle {
  color: var(--text-gray);
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  max-width: 600px;
  margin: 0 auto;
}

/* Audio Player Widget */
.audio-controller {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-controller:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.04);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.audio-icon {
  width: 20px;
  height: 20px;
  stroke: var(--gold-light);
  fill: none;
}

.audio-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.visualizer-bar {
  width: 2px;
  background: var(--gold-primary);
  border-radius: 1px;
  transition: height 0.3s ease;
  height: 3px;
}

.audio-controller.playing .visualizer-bar:nth-child(1) { animation: barDance 1.2s ease-in-out infinite alternate; }
.audio-controller.playing .visualizer-bar:nth-child(2) { animation: barDance 0.8s ease-in-out infinite alternate; animation-delay: 0.15s; }
.audio-controller.playing .visualizer-bar:nth-child(3) { animation: barDance 1s ease-in-out infinite alternate; animation-delay: 0.3s; }
.audio-controller.playing .visualizer-bar:nth-child(4) { animation: barDance 1.4s ease-in-out infinite alternate; animation-delay: 0.05s; }

/* 3D Main Section Layout */
.main-experience {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  margin-bottom: 6rem;
}

/* 3D Invitation / Wishes Card */
.perspective-container {
  perspective: 1500px;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1.45;
}

.birthday-card-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
  cursor: pointer;
  border-radius: 30px;
  box-shadow: var(--shadow-glass);
}

.birthday-card-3d:hover {
  box-shadow: 0 45px 80px -20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 175, 55, 0.15);
}

/* Card Faces */
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  backface-visibility: hidden;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-glass);
  overflow: hidden;
}

.card-face::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Gold corner elements for absolute premium vintage touch */
.corner-decor {
  position: absolute;
  width: 25px;
  height: 25px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  pointer-events: none;
  z-index: 2;
}

.corner-top-left { top: 1.5rem; left: 1.5rem; border-right: none; border-bottom: none; }
.corner-top-right { top: 1.5rem; right: 1.5rem; border-left: none; border-bottom: none; }
.corner-bottom-left { bottom: 1.5rem; left: 1.5rem; border-right: none; border-top: none; }
.corner-bottom-right { bottom: 1.5rem; right: 1.5rem; border-left: none; border-top: none; }

/* Front Card Face */
.card-front {
  background: linear-gradient(145deg, #0e1322 0%, #06080e 100%);
  z-index: 2;
}

.card-front-image-frame {
  position: relative;
  width: 100%;
  height: 60%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
  margin-top: 1rem;
}

.card-image {
  width: 100%;
  height: 100%;
  object-cover: cover;
  object-position: center;
  transition: transform 6s ease;
  filter: contrast(1.05) brightness(0.95);
}

.birthday-card-3d:hover .card-image {
  transform: scale(1.08);
}

.frame-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 19, 34, 0.9) 0%, transparent 60%);
  z-index: 1;
}

.frame-label {
  position: absolute;
  bottom: 1.2rem;
  left: 1.2rem;
  z-index: 2;
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
}

.card-front-content {
  margin-top: 1.5rem;
  z-index: 2;
}

.card-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.card-tagline {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold-primary);
  font-weight: 700;
}

.card-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-gray);
  text-transform: uppercase;
}

.hint-glow-dot {
  width: 8px;
  height: 8px;
  background: var(--gold-primary);
  border-radius: 50%;
  animation: heartbeat 1.8s infinite;
}

/* Back Card Face (Revealed on Hover) */
.card-back {
  background: linear-gradient(145deg, #090d18 0%, #030407 100%);
  transform: rotateY(180deg);
  justify-content: space-between;
}

.card-back-image-frame {
  position: relative;
  width: 100%;
  height: 48%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.card-back-wishes {
  text-align: center;
  margin-top: 1rem;
}

.wish-heading {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-light);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.wish-text {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 500;
  line-height: 1.35;
  color: #FFF;
  margin-bottom: 1.5rem;
}

.wishes-signature {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-primary);
  font-weight: 800;
}

.celebrate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 54px;
  background: var(--gold-gradient);
  color: var(--bg-dark);
  font-family: var(--font-sans);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-gold);
}

.celebrate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(212, 175, 55, 0.4);
}

.celebrate-btn:active {
  transform: translateY(-1px);
}

/* Hover rotation selector (Desktop) */
@media (hover: hover) {
  .perspective-container:hover .birthday-card-3d {
    transform: rotateY(180deg);
  }
}

/* JavaScript active rotation class (Mobile & Tapped state) */
.birthday-card-3d.flipped {
  transform: rotateY(180deg);
}

/* Guestbook Section / Wish Wall */
.wish-wall-section {
  width: 100%;
  max-width: 900px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 35px;
  padding: 3rem;
  box-shadow: var(--shadow-glass);
}

.wish-wall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.wish-wall-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.wish-wall-title-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.8rem;
  color: var(--text-white);
}

.sparkles-icon {
  width: 24px;
  height: 24px;
  stroke: var(--gold-primary);
  fill: none;
  animation: pulseGlow 2s infinite alternate;
}

.wishes-count-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold-light);
}

/* Form block */
.wish-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .wish-form {
    grid-template-columns: 1fr 1fr;
  }
  .form-full-width {
    grid-column: span 2;
  }
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-gray);
  font-weight: 700;
}

.input-field {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 15px;
  padding: 1rem 1.2rem;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.02);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

textarea.input-field {
  resize: vertical;
  min-height: 110px;
}

.form-submit-btn {
  grid-column: span 2;
  height: 52px;
  background: transparent;
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  border-radius: 15px;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0.5rem;
}

.form-submit-btn:hover {
  background: var(--gold-gradient);
  color: var(--bg-dark);
  box-shadow: var(--shadow-gold);
  border-color: transparent;
  transform: translateY(-2px);
}

/* Wishes Board / List */
.wishes-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

@media (min-width: 768px) {
  .wishes-board {
    grid-template-columns: 1fr 1fr;
  }
}

.wish-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 22px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fadeIn 0.6s ease forwards;
}

.wish-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.wish-card-decor {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 2.2rem;
  font-family: var(--font-serif);
  color: rgba(212, 175, 55, 0.12);
  line-height: 1;
  pointer-events: none;
}

.wish-card-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
  color: rgba(248, 249, 250, 0.95);
  margin-bottom: 1.2rem;
}

.wish-card-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.8rem;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.author-name {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light);
}

.author-batch {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-gray);
  font-weight: 500;
}

.delete-wish-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-wish-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Footer Section */
footer {
  text-align: center;
  margin-top: 8rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-glass);
}

.footer-logo {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.footer-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--text-gray);
}

/* Custom Modal for Image Preview / Full Screen */
.photo-gallery-section {
  width: 100%;
  max-width: 900px;
  margin-bottom: 2rem;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 25px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  box-shadow: var(--shadow-glass);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 35px 70px -10px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.15);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-cover: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-image {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 9, 14, 0.9) 0%, transparent 60%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #fff;
  font-style: italic;
  text-align: left;
}

.gallery-sub {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--gold-primary);
  margin-top: 0.25rem;
  text-align: left;
}

/* Animations */
@keyframes textShimmer {
  to {
    background-position: 200% center;
  }
}

@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 10px 4px rgba(212, 175, 55, 0);
  }
}

@keyframes pulseGlow {
  0% {
    filter: drop-shadow(0 0 1px rgba(212, 175, 55, 0.2));
  }
  100% {
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7));
  }
}

@keyframes barDance {
  0% { height: 3px; }
  100% { height: 16px; }
}

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

/* Responsive fixes */
@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  .card-face {
    padding: 1.5rem;
  }
  .wish-wall-section {
    padding: 1.5rem;
  }
  .audio-controller {
    top: 1rem;
    right: 1rem;
  }
}
