/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #faf8f6;
  overflow-x: hidden;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(212, 165, 165, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(183, 110, 121, 0.1) 0%, transparent 50%);
  z-index: -1;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Code Entry Page - Glassmorphism */
.code-entry-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 50%, #d4a5a5 100%);
  background-size: 200% 200%;
  animation: gradientMove 15s ease infinite;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.code-entry-container::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  top: -250px;
  right: -250px;
  animation: float 20s ease-in-out infinite;
}

.code-entry-container::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -150px;
  left: -150px;
  animation: float 15s ease-in-out infinite reverse;
}

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

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.code-entry-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 50px 40px;
  border-radius: 30px;
  box-shadow: 
    0 8px 32px 0 rgba(183, 110, 121, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.3);
  max-width: 450px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
  animation: slideUp 0.6s ease-out;
}

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

.code-entry-card::before {
  content: '❤️';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  opacity: 0.15;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.code-entry-card h1 {
  font-size: 2.8rem;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.wedding-date {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

.entry-message {
  margin-bottom: 30px;
  color: #555;
}

#code-form input {
  width: 100%;
  padding: 18px 24px;
  font-size: 1.05rem;
  border: 2px solid rgba(183, 110, 121, 0.15);
  border-radius: 16px;
  margin-bottom: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  font-family: inherit;
}

#code-form input:focus {
  outline: none;
  border-color: #b76e79;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.1), 0 10px 30px rgba(183, 110, 121, 0.15);
  transform: translateY(-2px) scale(1.01);
}

#code-form button {
  width: 100%;
  padding: 18px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(183, 110, 121, 0.3);
}

#code-form button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

#code-form button:hover::before {
  width: 300px;
  height: 300px;
}

#code-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(183, 110, 121, 0.4);
}

#code-form button:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(183, 110, 121, 0.3);
}

.error-message {
  color: #e74c3c;
  margin-top: 15px;
  font-weight: 500;
}

/* Hero Section - Parallax & Modern */
.hero {
  height: 50vh;
  min-height: 400px;
  background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
              url('https://images.unsplash.com/photo-1519741497674-611481863552?w=1600') center/cover;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.hero-overlay {
  z-index: 1;
  animation: fadeInUp 1s ease-out;
}

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  letter-spacing: -1px;
  line-height: 1.1;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-date {
  font-size: 1.4rem;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  font-weight: 300;
  letter-spacing: 2px;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.95;
  font-weight: 300;
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* Share CTA Section - Glassmorphism */
.share-cta {
  text-align: center;
  padding: 80px 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  position: relative;
}

.share-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(183, 110, 121, 0.05) 0%, transparent 70%);
}

.share-cta h2 {
  font-size: 2.8rem;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -1px;
}

.share-cta p {
  font-size: 1.2rem;
  color: #6b7280;
  margin-bottom: 35px;
  font-weight: 300;
}

.cta-button {
  padding: 18px 48px;
  font-size: 1.05rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(183, 110, 121, 0.3);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
  width: 300px;
  height: 300px;
}

.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(183, 110, 121, 0.4);
}

/* Gallery Filter - Modern */
.gallery-filter {
  max-width: 1200px;
  margin: 50px auto 30px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.gallery-filter label {
  font-weight: 600;
  color: #4b5563;
  font-size: 1.05rem;
}

.gallery-filter select {
  padding: 12px 20px;
  border: 2px solid rgba(183, 110, 121, 0.2);
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-family: inherit;
}

.gallery-filter select:hover {
  border-color: #d4a5a5;
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.15);
}

.gallery-filter select:focus {
  outline: none;
  border-color: #b76e79;
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.1);
}

/* Event Sections - Modern */
.event-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.event-title {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #b76e79;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
}

.event-title::after {
  content: '◆';
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #faf8f6;
  padding: 0 15px;
  color: #b76e79;
  font-size: 1.5rem;
  line-height: 1;
}

/* Masonry-style Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.gallery-item-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  cursor: pointer;
}

.gallery-item-container:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(183, 110, 121, 0.25);
  z-index: 10;
}

.gallery-item-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.6) 100%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
}

.gallery-item-container:hover::before {
  opacity: 1;
}

.gallery-item {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.gallery-item-container:hover .gallery-item {
  transform: scale(1.1);
}

.guest-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 2;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s;
}

.gallery-item-container:hover .guest-badge {
  opacity: 1;
  transform: translateY(0);
}

.loading-message,
.no-uploads,
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-style: normal;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px dashed rgba(183, 110, 121, 0.2);
  margin: 20px 0;
}

/* Upload Section - Glassmorphism */
.upload-section {
  max-width: 700px;
  margin: 80px auto;
  padding: 50px 40px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(183, 110, 121, 0.15), 0 0 0 1px rgba(183, 110, 121, 0.08);
  position: relative;
  animation: slideUp 0.6s ease-out;
}

.upload-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #d4a5a5, #b76e79, #d4a5a5);
  border-radius: 30px 30px 0 0;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.upload-section h2 {
  text-align: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.name-prompt {
  background: linear-gradient(135deg, #fef9f7 0%, #fef5f5 100%);
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 25px;
  border: 2px solid #f0d9de;
  border-left: 5px solid #b76e79;
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.08);
}

.name-prompt label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #555;
}

.name-prompt input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #f0d9de;
  border-radius: 12px;
  font-size: 1.05rem;
  background: white;
  transition: all 0.3s ease;
}

.name-prompt input:focus {
  outline: none;
  border-color: #b76e79;
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #6d4c51;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.form-group select,
.form-group input[type="file"] {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #f0d9de;
  border-radius: 12px;
  font-size: 1.05rem;
  cursor: pointer;
  background: #fefbfc;
  transition: all 0.3s ease;
}

.form-group select:hover,
.form-group input[type="file"]:hover {
  border-color: #d4a5a5;
  background: white;
}

.form-group select:focus,
.form-group input[type="file"]:focus {
  outline: none;
  border-color: #b76e79;
  box-shadow: 0 0 0 4px rgba(183, 110, 121, 0.1);
}

.upload-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #b76e79;
  cursor: pointer;
}

.file-count {
  margin-top: 10px;
  color: #666;
  font-size: 0.9rem;
  font-style: italic;
}

.upload-button {
  width: 100%;
  padding: 18px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 25px;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(183, 110, 121, 0.3);
}

.upload-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.upload-button:hover::before {
  width: 400px;
  height: 400px;
}

.upload-button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(183, 110, 121, 0.4);
}

.upload-button:active {
  transform: translateY(-1px);
}

.upload-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.upload-status {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.upload-status.uploading {
  background: #fff3cd;
  color: #856404;
}

.upload-status.success {
  background: #d4edda;
  color: #155724;
}

.upload-status.error {
  background: #f8d7da;
  color: #721c24;
}

/* Guest Contributions */
.guest-contributions {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.guest-contributions h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.guest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.guest-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(183, 110, 121, 0.12);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(183, 110, 121, 0.1);
  position: relative;
  overflow: hidden;
}

.guest-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(183, 110, 121, 0.05), transparent);
  transition: left 0.6s;
}

.guest-card:hover::before {
  left: 100%;
}

.guest-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(183, 110, 121, 0.25);
  border-color: rgba(183, 110, 121, 0.3);
}

.guest-card h3 {
  font-size: 1.4rem;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  font-weight: 700;
}

.guest-count {
  color: #666;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.guest-thumbnails {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.guest-thumbnail {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

/* Stats Section - Modern */
.stats-section {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 80px auto;
  padding: 50px 30px;
  background: linear-gradient(135deg, #d4a5a5 0%, #b76e79 100%);
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(183, 110, 121, 0.4);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

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

.stat-item {
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out both;
  flex: 1;
  min-width: 150px;
  margin: 10px;
}

.stat-item:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-item:nth-child(3) {
  animation-delay: 0.4s;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  text-shadow: 0 4px 10px rgba(0,0,0,0.2);
  animation: countUp 1s ease-out;
}

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

.stat-label {
  font-size: 1.1rem;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  background: #333;
  color: white;
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-date {
    font-size: 1.2rem;
  }

  .share-cta h2 {
    font-size: 2rem;
  }

  .event-title {
    font-size: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }

  .gallery-item {
    height: 150px;
  }

  .stats-section {
    flex-direction: column;
    gap: 30px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

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

@media (max-width: 480px) {
  .code-entry-card h1 {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .gallery-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .gallery-filter select {
    width: 100%;
  }
}

  