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

:root {
  --navy: #1a2a44;
  --gold: #d4af37;
  --text: #444;
  --light-bg: rgba(255, 255, 255, 0.95);
}

body {
  font-family: 'Playfair Display', Georgia, serif;
  background: var(--navy);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
  z-index: -1;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: var(--light-bg);
  border-radius: 0;
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  border-top: 4px solid var(--gold);
  position: relative;
}

.card::before {
  content: '❤';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  color: var(--gold);
  background: var(--light-bg);
  padding: 0 10px;
}

h1.title {
  font-family: 'Arizonia', cursive;
  font-size: 3rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
  font-weight: 400;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto;
  position: relative;
}

.divider::after {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 10px;
  background: var(--light-bg);
  padding: 0 10px;
}

.description {
  color: var(--text);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  font-style: italic;
}

.hearts {
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.qr-wrapper {
  margin: 2rem 0;
  display: inline-block;
  padding: 1.5rem;
  background: white;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.qr-code {
  width: 250px;
  height: 250px;
  display: block;
}

.scan-hint {
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn-primary {
  background: var(--navy);
  color: white;
  border: 1px solid var(--navy);
}

.btn-primary:hover {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(26, 42, 68, 0.2);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-full {
  width: 100%;
  text-align: center;
}

.back-link {
  display: inline-block;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.back-link:hover {
  color: var(--navy);
}

.alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-family: 'Montserrat', sans-serif;
  border-left: 3px solid;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border-color: #dc2626;
}

.upload-form {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--navy);
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #e1e1e1;
  border-radius: 0;
  font-size: 1rem;
  font-family: 'Cormorant Garamond', serif;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 60px;
}

.file-drop-zone {
  border: 2px dashed rgba(212, 175, 55, 0.4);
  border-radius: 0;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.8);
  position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
}

.drop-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
  filter: grayscale(0.3);
}

.drop-content p {
  color: var(--text);
  font-style: italic;
}

.file-hint {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.file-input {
  display: none;
}

.file-preview {
  margin-top: 1rem;
  text-align: center;
}

.preview-media {
  max-width: 100%;
  max-height: 300px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.file-name {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text);
  font-style: italic;
}

.success-icon {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.success-card p {
  color: var(--text);
  font-size: 1.1rem;
}

.gallery-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: 100vh;
}

.gallery-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.gallery-back {
  color: var(--gold);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.gallery-back:hover { color: #fff; }

.gallery-nav-title {
  text-align: center;
}

.gallery-nav-couple {
  display: block;
  font-family: 'Arizonia', cursive;
  font-size: 1.4rem;
  color: #fff;
  line-height: 1;
}

.gallery-nav-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.gallery-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--gold);
  padding: 0.4rem 0.8rem;
  transition: all 0.2s;
}

.gallery-upload-btn:hover {
  background: var(--gold);
  color: var(--navy);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.gallery-card {
  cursor: pointer;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.gallery-card-img {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.gallery-card-img img,
.gallery-card-img video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.gallery-card:hover .gallery-card-img img,
.gallery-card:hover .gallery-card-img video {
  transform: scale(1.06);
}

.video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(26,42,68,0.8);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

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

.gallery-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.card-msg {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  color: #fff;
  font-style: italic;
  line-height: 1.3;
  opacity: 0.9;
}

.card-expand {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  color: #fff;
  font-size: 0.8rem;
  opacity: 0.7;
}

.empty-gallery {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text);
  background: rgba(255,255,255,0.95);
}

.empty-icon {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.empty-gallery p {
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
}

.gallery-footer {
  text-align: center;
  padding: 2rem 0;
  color: rgba(255,255,255,0.5);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  display: flex;
  max-width: 1000px;
  max-height: 90vh;
  background: #fff;
  position: relative;
}

.lightbox-media {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.lb-image {
  max-width: 100%;
  max-height: 90vh;
  display: block;
}

.lb-video {
  max-width: 100%;
  max-height: 90vh;
}

.lightbox-sidebar {
  width: 260px;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: flex-start;
  background: #fff;
}

.lightbox-meta {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.lightbox-avatar {
  width: 36px;
  height: 36px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.lightbox-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.lb-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.lb-msg {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.4;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  font-family: sans-serif;
  opacity: 0.7;
  transition: opacity 0.2s;
  background: none;
  border: none;
  z-index: 10;
  line-height: 1;
}

.lightbox-close:hover { opacity: 1; color: var(--gold); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 1rem;
  transition: all 0.2s;
  z-index: 10;
  line-height: 1;
}

.lightbox-nav:hover { color: var(--gold); }

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

@media (max-width: 600px) {
  .container {
    padding: 1rem 0.75rem;
  }

  .card {
    padding: 2.5rem 1.25rem;
  }

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

  .subtitle {
    font-size: 0.85rem;
    letter-spacing: 2px;
  }

  .qr-code {
    width: 200px;
    height: 200px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .links {
    flex-direction: column;
  }

  .links .btn {
    width: 100%;
    text-align: center;
  }
}
