/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* CSS Variables for Premium Theme (Champagne Gold & Emerald Green) */
:root {
  --primary: #D4AF37; /* Gold */
  --primary-hover: #AA841A;
  --secondary: #1B4332; /* Emerald Green */
  --secondary-light: #2D6A4F;
  --bg-color: #FDFBF7; /* Champagne Cream */
  --bg-card: #FFFFFF;
  --text-dark: #2D3142;
  --text-muted: #64748B;
  --text-light: #FFFFFF;
  --border-color: #E2E8F0;
  --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-premium: 0 20px 40px rgba(27, 67, 50, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', sans-serif;
}

/* Custom Scrollbar for the Entire Website */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-light);
}

/* Reset and Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography & Layout Helpers */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
}

.text-center { text-align: center; }
.text-gold { color: var(--primary); }
.text-emerald { color: var(--secondary); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 12px;
  font-weight: 700;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 40px;
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-gold {
  background: var(--gold-gradient);
  color: var(--secondary);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 15px rgba(191, 149, 63, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(191, 149, 63, 0.5);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.btn-outline:hover {
  background-color: var(--secondary);
  color: var(--text-light);
  transform: translateY(-2px);
}

/* 1. COVER OVERLAY (index.html) */
.cover-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--text-light);
  padding: 24px;
  transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease;
}

.cover-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(27, 67, 50, 0.75), rgba(27, 67, 50, 0.9));
  z-index: 1;
}

.cover-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  animation: fadeInDown 1.2s ease;
}

.cover-title {
  font-size: 1.2rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--primary);
}

.cover-names {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 10px;
  font-style: italic;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.cover-to {
  margin: 30px 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.cover-to p {
  font-size: 0.9rem;
  color: #E2E8F0;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.cover-guest-name {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--bg-color);
}

/* Hide scroll when cover is active */
body.cover-active {
  overflow: hidden;
  height: 100vh;
}

.cover-overlay.fade-out {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* FLOATING AUDIO CONTROLLER */
.audio-control {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gold-gradient);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.audio-control.spinning {
  animation: spin 3s linear infinite;
}

/* HERO SECTION */
.hero {
  height: 100vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(253, 251, 247, 0.95), rgba(253, 251, 247, 0.8));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.wedding-date-hero {
  font-size: 1.1rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-names {
  font-size: 5rem;
  color: var(--secondary);
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
  margin-bottom: 30px;
}

/* COUNTDOWN TIMER */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.countdown-box {
  background: var(--bg-card);
  border: 1px solid rgba(191, 149, 63, 0.3);
  box-shadow: var(--shadow-md);
  padding: 15px 20px;
  border-radius: 12px;
  min-width: 90px;
  text-align: center;
}

.countdown-val {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--secondary);
  font-family: var(--font-serif);
}

.countdown-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* COUPLE PROFILE SECTION */
.couple-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 50px;
}

.couple-card {
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  background: var(--bg-card);
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
  text-align: center;
  border: 1px solid rgba(191, 149, 63, 0.15);
  transition: var(--transition);
}

.couple-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(27, 67, 50, 0.15);
}

.couple-photo-wrapper {
  width: 180px;
  height: 180px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
}

.couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.couple-name {
  font-size: 1.8rem;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 8px;
}

.couple-parents {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.couple-instagram {
  color: var(--primary);
  text-decoration: none;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.couple-instagram:hover {
  color: var(--primary-hover);
}

.couple-ampersand {
  font-size: 4rem;
  font-family: var(--font-serif);
  color: var(--primary);
  font-style: italic;
}

/* EVENT DETAILS SECTION */
.event-wrapper {
  background: linear-gradient(135deg, rgba(27, 67, 50, 0.03) 0%, rgba(191, 149, 63, 0.05) 100%);
  border-radius: 30px;
  padding: 60px 40px;
  margin-top: 40px;
  border: 1px solid rgba(191, 149, 63, 0.15);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.event-card {
  background: var(--bg-card);
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--primary);
  text-align: center;
}

.event-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.event-title {
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 16px;
  font-weight: 700;
}

.event-details {
  list-style: none;
  margin-bottom: 28px;
}

.event-details li {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.event-details li i {
  color: var(--primary);
  margin-right: 8px;
}

/* MAPS SECTION */
.maps-container {
  margin-top: 50px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--bg-card);
  height: 350px;
}

.maps-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* GALLERY SECTION */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 3px solid var(--bg-card);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 67, 50, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: var(--text-light);
  font-size: 1.5rem;
  transition: var(--transition);
}

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

/* LIGHTBOX MODAL */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 8px;
  border: 4px solid var(--bg-color);
  animation: zoomIn 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 2.5rem;
  cursor: pointer;
}

/* RSVP & GUESTBOOK FORM */
.rsvp-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.rsvp-box, .guestbook-box {
  background: var(--bg-card);
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
  border: 1px solid rgba(191, 149, 63, 0.15);
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--secondary);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition);
  background-color: var(--bg-color);
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(191, 149, 63, 0.15);
}

/* Guestbook list style */
.guestbook-list {
  max-height: 350px;
  overflow-y: auto;
  margin-top: 20px;
  padding-right: 8px;
}

.guestbook-list::-webkit-scrollbar {
  width: 6px;
}
.guestbook-list::-webkit-scrollbar-track {
  background: var(--bg-color);
}
.guestbook-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.guestbook-item {
  background: var(--bg-color);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary);
}

.guestbook-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.guestbook-name {
  font-weight: 700;
  color: var(--secondary);
}

.guestbook-status {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-hadir {
  background-color: #DEF7EC;
  color: #03543F;
}

.status-absen {
  background-color: #FDE8E8;
  color: #9B1C1C;
}

.guestbook-message {
  font-size: 0.9rem;
  color: var(--text-dark);
}

/* DIGITAL GIFT (KADO DIGITAL) */
.gift-card-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.gift-card {
  background: var(--bg-card);
  border: 1px solid rgba(191, 149, 63, 0.15);
  box-shadow: var(--shadow-md);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  min-width: 280px;
  max-width: 320px;
}

.gift-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 12px;
  font-style: italic;
}

.gift-account-number {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin: 12px 0;
  font-family: monospace;
}

.gift-owner {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ADMIN DASHBOARD SPECIFIC STYLING (`admin.html`) */
.admin-body {
  background-color: #F8FAFC;
  color: #1E293B;
}

.admin-header {
  background: var(--secondary);
  color: var(--text-light);
  padding: 20px 0;
  box-shadow: var(--shadow-md);
  border-bottom: 4px solid var(--primary);
}

.admin-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
}

.admin-logo span {
  color: var(--primary);
}

.admin-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin: 40px 0;
}

.admin-sidebar {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: fit-content;
  border: 1px solid var(--border-color);
}

.admin-nav {
  list-style: none;
}

.admin-nav-item {
  margin-bottom: 8px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.admin-nav-link:hover, .admin-nav-link.active {
  background-color: rgba(27, 67, 50, 0.08);
  color: var(--secondary);
}

.admin-nav-link.active {
  font-weight: 700;
  border-left: 4px solid var(--primary);
}

.admin-panel {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.admin-panel-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--secondary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

/* Stat Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.admin-stat-card {
  background: #F1F5F9;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border-bottom: 4px solid var(--primary);
}

.admin-stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--secondary);
}

.admin-stat-lbl {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #64748B;
  font-weight: 600;
}

/* Form Styles inside Admin */
.admin-form-section {
  background: #F8FAFC;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.admin-form-subtitle {
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--secondary);
  font-size: 1.1rem;
}

.admin-btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* Table Style */
.table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background-color: #F1F5F9;
  padding: 14px 16px;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid var(--border-color);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.admin-table tr:hover {
  background-color: #F8FAFC;
}

/* Link Actions */
.action-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.action-btn:hover {
  background-color: #E2E8F0;
}

.action-btn.copy { color: var(--secondary); }
.action-btn.wa { color: #25D366; }
.action-btn.delete { color: #EF4444; }

/* Admin Login Page Style */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary) 0%, #0A1E16 100%);
  padding: 24px;
}

.login-card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  width: 100%;
  text-align: center;
  border-top: 6px solid var(--primary);
}

.login-title {
  font-size: 2rem;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 10px;
}

.login-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Custom Alert Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--secondary);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 0.3s ease;
  border-left: 4px solid var(--primary);
}

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

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

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Styles */
@media (max-width: 991px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  .hero-names {
    font-size: 3.5rem;
  }
  .cover-names {
    font-size: 3rem;
  }
  .couple-grid {
    gap: 20px;
  }
  .event-wrapper {
    padding: 30px 20px;
  }
  .rsvp-wrapper {
    grid-template-columns: 1fr;
  }
  .countdown-container {
    gap: 10px;
  }
  .countdown-box {
    padding: 10px;
    min-width: 75px;
  }
  .countdown-val {
    font-size: 1.8rem;
  }
}
