/* ==========================================================================
   Büşra & Emre Wedding Platform - Premium Design System & Styles
   ========================================================================== */

:root {
  /* Color Palette - Romantic Rose Gold, Deep Wine, & Velvet Night */
  --bg-main: #14080e;
  --bg-gradient-1: #280f1b;
  --bg-gradient-2: #3a1526;
  
  --gold-primary: #e5be8a;
  --gold-light: #f7e3c8;
  --gold-glow: rgba(229, 190, 138, 0.4);
  
  --rose-dust: #d69db2;
  --rose-deep: #8c3b58;
  
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-hover: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);

  --text-main: #f9f4f6;
  --text-muted: #c9b4bd;

  --font-heading: 'Playfair Display', serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 50% 0%, var(--bg-gradient-2), var(--bg-gradient-1) 50%, var(--bg-main) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Ambient Canvas Background */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Glowing Orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 350px;
  height: 350px;
  background: var(--rose-deep);
  top: -10%;
  left: -5%;
}

.orb-2 {
  width: 450px;
  height: 450px;
  background: var(--gold-primary);
  bottom: 10%;
  right: -10%;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: #621d3a;
  top: 45%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-20px, 40px) scale(0.95); }
}

/* Main Layout Container */
.main-container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.admin-container {
  max-width: 1100px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(229, 190, 138, 0.12);
  border: 1px solid rgba(229, 190, 138, 0.3);
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--gold-light);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.couple-names {
  font-family: var(--font-script);
  font-size: 4.8rem;
  font-weight: 400;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 0.3rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 35px rgba(229, 190, 138, 0.3);
}

.couple-names .ampersand {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 3.2rem;
  color: var(--rose-dust);
  display: inline-block;
  margin: 0 0.3rem;
  vertical-align: middle;
}

.welcome-subtitle {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

/* Childhood Photo Polaroid/Medallion Frame */
.couple-photo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.2rem auto 1.8rem;
}

.couple-photo-frame {
  width: 200px;
  height: 240px;
  padding: 10px 10px 30px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.55), 0 0 25px rgba(229, 190, 138, 0.35);
  transform: rotate(-3deg);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  position: relative;
}

.couple-photo-frame:hover {
  transform: rotate(0deg) scale(1.05);
}

.couple-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.photo-caption {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-top: 0.8rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 1.2rem auto;
  width: 60%;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-primary), transparent);
}

.heart-icon {
  margin: 0 1rem;
  font-size: 1rem;
  animation: pulseHeart 2s infinite;
}

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

/* ==========================================================================
   Invitation Quote Glass Card
   ========================================================================== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  padding: 2.2rem;
  width: 100%;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.quote-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(229, 190, 138, 0.05));
  border: 1px solid rgba(229, 190, 138, 0.25);
  border-radius: 22px;
  padding: 1.8rem 2rem;
  text-align: center;
  margin-bottom: 2.2rem;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.quote-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.thank-you-header {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.invitation-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-main);
  max-width: 90%;
  margin: 0 auto;
}

/* ==========================================================================
   Upload Section
   ========================================================================== */
.upload-section {
  width: 100%;
  margin-bottom: 2.5rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 0.4rem;
}

.card-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
}

.form-group {
  margin-bottom: 1.3rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(229, 190, 138, 0.15);
  background: rgba(0, 0, 0, 0.5);
}

.hidden-input {
  display: none !important;
}

/* Upload Buttons Grid */
.upload-buttons-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.btn {
  cursor: pointer;
  border: none;
  border-radius: 14px;
  font-family: var(--font-body);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  outline: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-camera {
  background: linear-gradient(135deg, #8c3b58, #621d3a);
  color: #fff;
  padding: 1.1rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(140, 59, 88, 0.35);
}

.btn-camera:hover {
  background: linear-gradient(135deg, #a14566, #742345);
  box-shadow: 0 8px 25px rgba(140, 59, 88, 0.5);
  transform: translateY(-2px);
}

.btn-gallery {
  background: linear-gradient(135deg, rgba(229, 190, 138, 0.15), rgba(229, 190, 138, 0.05));
  color: var(--gold-light);
  padding: 1.1rem 0.8rem;
  border: 1px solid var(--gold-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-gallery:hover {
  background: linear-gradient(135deg, rgba(229, 190, 138, 0.25), rgba(229, 190, 138, 0.12));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(229, 190, 138, 0.25);
}

.btn-icon {
  font-size: 1.6rem;
}

/* Drag Drop Zone */
.drop-zone {
  border: 2px dashed rgba(229, 190, 138, 0.3);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.15);
}

.drop-zone.dragover {
  border-color: var(--gold-light);
  background: rgba(229, 190, 138, 0.1);
  transform: scale(1.01);
}

/* Selected File Preview Area */
.file-preview-area {
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--gold-light);
}

.btn-clear {
  background: transparent;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.6rem;
  max-height: 180px;
  overflow-y: auto;
}

.preview-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #222;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.preview-item img,
.preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: var(--gold-light);
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--rose-dust), var(--gold-primary));
  transition: width 0.3s ease;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 1.15rem;
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--gold-primary), #c9934f);
  color: #14080e;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 25px rgba(229, 190, 138, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-submit::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(rgba(255,255,255,0.3), transparent);
  transform: rotate(30deg);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-submit:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(229, 190, 138, 0.5);
}

.btn-submit.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.hidden {
  display: none !important;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.admin-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.2s;
}

.admin-link:hover {
  color: var(--gold-light);
}

/* ==========================================================================
   Modals & Lightbox
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  max-width: 450px;
  text-align: center;
  padding: 2.8rem 2rem;
}

.celebration-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 1s ease infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
}

.modal-message {
  color: var(--text-main);
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--gold-primary);
  color: #14080e;
  padding: 0.9rem 1.6rem;
  font-weight: 700;
}

/* ==========================================================================
   Admin Page Specifics
   ========================================================================== */
.admin-login-wrapper {
  max-width: 420px;
  width: 100%;
  margin: 4rem auto;
}

.login-card {
  text-align: center;
}

.lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.login-card h2 {
  font-family: var(--font-heading);
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.login-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.error-msg {
  color: #ff6b6b;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

/* Admin Dashboard */
.dashboard-wrapper {
  width: 100%;
}

.admin-header {
  margin-bottom: 2rem;
  padding: 1.8rem 2.2rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.header-content h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--gold-light);
}

.header-actions {
  display: flex;
  gap: 0.8rem;
}

.btn-zip {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
  padding: 0.8rem 1.3rem;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.8rem 1.1rem;
}

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.2rem;
}

.stat-box {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--gold-primary);
  color: #14080e;
  border-color: var(--gold-primary);
}

/* Masonry Grid */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.media-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.media-card:hover {
  transform: translateY(-5px);
}

.media-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  cursor: pointer;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}

.media-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.media-guest {
  font-weight: 700;
  color: var(--gold-light);
  font-size: 1.05rem;
}

.media-note {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.6rem;
  border-radius: 8px;
  border-left: 3px solid var(--gold-primary);
}

.media-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-delete {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: rgba(255, 107, 107, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

/* Lightbox Content */
.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
}

#lightboxMediaContainer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 70vh;
}

#lightboxMediaContainer img,
#lightboxMediaContainer video {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-info {
  padding: 1rem 0.5rem 0.5rem;
  text-align: left;
}

.lightbox-info h4 {
  color: var(--gold-light);
  font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .couple-names {
    font-size: 3.6rem;
  }
  .couple-names .ampersand {
    font-size: 2.4rem;
  }
  .upload-buttons-wrapper {
    grid-template-columns: 1fr;
  }
  .glass-card {
    padding: 1.5rem;
  }
}
