/* ==========================================================================
   Celtic-Gothic Design System (index.css)
   ========================================================================== */
:root {
  /* Colors */
  --color-bg-deep: #050508;
  --color-bg-card: rgba(13, 13, 20, 0.85);
  --color-bg-input: rgba(8, 8, 12, 0.95);
  
  --color-blood-dark: #3b020b;
  --color-blood-mid: #800020;
  --color-blood-light: #ab0b25;
  
  --color-silver-dark: #3f4246;
  --color-silver-mid: #a3a8b0;
  --color-silver-light: #e6e8eb;
  
  --color-text-primary: #f1f2f5;
  --color-text-secondary: #bdc2cc;
  --color-text-muted: #6b7280;
  
  /* Gradients */
  --blood-gradient: linear-gradient(135deg, var(--color-blood-dark) 0%, var(--color-blood-mid) 50%, var(--color-blood-light) 100%);
  --silver-gradient: linear-gradient(135deg, var(--color-silver-dark) 0%, var(--color-silver-mid) 50%, var(--color-silver-light) 100%);
  --bg-radial-gradient: radial-gradient(circle at 50% 0%, rgba(128, 0, 32, 0.18) 0%, rgba(5, 5, 8, 0) 75%);
  --blood-glow: 0 0 15px rgba(128, 0, 32, 0.35);
  --silver-glow: 0 0 15px rgba(163, 168, 176, 0.2);

  /* Typography */
  --font-celtic: 'Uncial Antiqua', serif;
  --font-gothic: 'Cinzel Decorative', serif;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Montserrat', sans-serif;
  
  /* Layout & Transitions */
  --blur-strength: 18px;
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--color-bg-deep);
  background-image: var(--bg-radial-gradient);
  background-attachment: fixed;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
}

/* Custom Scrollbars (Pewter/Obsidian styling) */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--color-blood-dark);
  border: 1px solid rgba(163, 168, 176, 0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-blood-mid);
}

/* Main Layout container (Centered mobile-first container) */
.app-container {
  width: 100%;
  max-width: 460px;
  padding: 24px 16px 48px 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ==========================================================================
   Hero & Celtic/Gothic Emblem
   ========================================================================== */
.hero {
  text-align: center;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeInDown 1s ease-out;
}

.hero-pretitle {
  font-family: var(--font-celtic);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
}

.hero-title {
  font-family: var(--font-gothic);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--silver-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.9));
  margin-bottom: 2px;
}

.emblem-container {
  position: relative;
  width: 136px;
  height: 136px;
  margin: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.emblem-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(163, 168, 176, 0.25);
  border-radius: 50%;
  animation: spinClockwise 35s linear infinite;
}

.emblem-ring-inner {
  position: absolute;
  width: 85%;
  height: 85%;
  border: 1px solid rgba(128, 0, 32, 0.25);
  border-radius: 50%;
  animation: spinCounterClockwise 25s linear infinite;
}

.emblem-svg,
.emblem-img {
  width: 110px;
  height: 110px;
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0px 0px 14px rgba(128, 0, 32, 0.6)) drop-shadow(0px 0px 4px rgba(163, 168, 176, 0.3));
  animation: pulseGlow 5s ease-in-out infinite;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-text-secondary);
  max-width: 90%;
  margin: 0 auto;
  line-height: 1.5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Cards (Glassmorphism & Gothic Borders)
   ========================================================================== */
.glass-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(var(--blur-strength));
  -webkit-backdrop-filter: blur(var(--blur-strength));
  border: 1px solid rgba(163, 168, 176, 0.18);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8),
              inset 0 1px 0 rgba(255, 255, 255, 0.03),
              0 0 30px rgba(128, 0, 32, 0.08);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

/* Gothic decorative corner overlays */
.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(128, 0, 32, 0.1);
  pointer-events: none;
  border-radius: 16px;
}

.card-title {
  font-family: var(--font-celtic);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-silver-light);
  text-align: center;
  position: relative;
  padding-bottom: 8px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 5px rgba(163, 168, 176, 0.15);
}

.card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 1px;
  background: var(--silver-gradient);
  box-shadow: 0 0 5px var(--color-silver-mid);
}

/* ==========================================================================
   Form Fields
   ========================================================================== */
.input-group {
  display: flex;
  flex-direction: column;
}

.input-label {
  font-family: var(--font-celtic);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.text-input {
  background: var(--color-bg-input);
  border: 1px solid rgba(163, 168, 176, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-sans);
  color: #ffffff;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  outline: none;
}

.text-input:focus {
  border-color: var(--color-blood-mid);
  box-shadow: 0 0 8px rgba(128, 0, 32, 0.35);
}

.text-input::placeholder {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Uploader & Dropzone
   ========================================================================== */
.dropzone {
  border: 1.5px dashed rgba(163, 168, 176, 0.3);
  background: rgba(8, 8, 12, 0.6);
  border-radius: 12px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

.dropzone.dragover {
  border-color: var(--color-blood-light);
  background: rgba(128, 0, 32, 0.08);
  box-shadow: 0 0 15px rgba(128, 0, 32, 0.25);
  transform: scale(0.98);
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  stroke: var(--color-silver-mid);
  fill: none;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 0 3px rgba(163, 168, 176, 0.2));
}

.dropzone:hover .dropzone-icon {
  transform: translateY(-4px);
  stroke: var(--color-blood-light);
  filter: drop-shadow(0 0 5px rgba(171, 11, 37, 0.5));
}

.dropzone-text {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.dropzone-subtext {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.file-input-hidden {
  display: none;
}

/* ==========================================================================
   Preview Grid
   ========================================================================== */
.preview-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  border-bottom: 1px solid rgba(163, 168, 176, 0.15);
  padding-bottom: 6px;
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.preview-grid {
  display: grid;
  grid-template-cols: repeat(3, 1fr);
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(163, 168, 176, 0.2);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

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

.preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(5, 5, 8, 0.85);
  border: 1px solid rgba(128, 0, 32, 0.6);
  color: var(--color-blood-light);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition-smooth);
}

.preview-remove:hover {
  background: var(--color-blood-mid);
  color: #ffffff;
  border-color: var(--color-blood-light);
  transform: scale(1.15);
}

/* ==========================================================================
   Buttons (Gothic Blood Red Theme)
   ========================================================================== */
.btn-blood {
  background: var(--blood-gradient);
  color: #ffffff;
  font-family: var(--font-celtic);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  border: 1px solid rgba(163, 168, 176, 0.25);
  border-radius: 8px;
  padding: 15px 24px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(128, 0, 32, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-blood:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(128, 0, 32, 0.5),
              0 0 10px rgba(171, 11, 37, 0.35);
  border-color: rgba(163, 168, 176, 0.45);
}

.btn-blood:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-blood:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  border-color: rgba(163, 168, 176, 0.1);
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */
.progress-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
}

.progress-status-text {
  color: var(--color-silver-mid);
  font-family: var(--font-serif);
  font-style: italic;
}

.progress-percentage {
  color: var(--color-text-primary);
  font-family: var(--font-sans);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--color-bg-deep);
  border-radius: 3px;
  border: 1px solid rgba(163, 168, 176, 0.12);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--blood-gradient);
  box-shadow: 0 0 8px rgba(171, 11, 37, 0.7);
  border-radius: 3px;
  transition: width 0.2s linear;
}

/* ==========================================================================
   Success Panel
   ========================================================================== */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 10px 0;
  animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.success-icon-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(128, 0, 32, 0.15);
  border: 2px solid var(--color-blood-mid);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 22px rgba(128, 0, 32, 0.4);
}

.success-icon {
  width: 40px;
  height: 40px;
  stroke: var(--color-silver-light);
  stroke-width: 2.5px;
  fill: none;
}

.success-title {
  font-family: var(--font-celtic);
  font-size: 1.4rem;
  color: var(--color-silver-light);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.success-message {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.dedication-success-badge {
  font-size: 0.8rem;
  background: rgba(128, 0, 32, 0.12);
  border: 1px solid rgba(128, 0, 32, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--color-text-secondary);
  margin-top: 4px;
  font-style: italic;
  max-width: 90%;
  word-break: break-word;
}

/* ==========================================================================
   Session Gallery (Live Feed)
   ========================================================================== */
.session-gallery {
  animation: fadeInUp 0.8s ease-out;
}

.gallery-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.gallery-mini-svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 4px rgba(128, 0, 32, 0.6));
}

.gallery-grid {
  display: grid;
  grid-template-cols: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.gallery-card {
  background: rgba(13, 13, 20, 0.7);
  border: 1px solid rgba(163, 168, 176, 0.15);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.6);
  transition: var(--transition-smooth);
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(128, 0, 32, 0.45);
  box-shadow: 0 8px 24px rgba(128, 0, 32, 0.2);
}

.gallery-img-container {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(8, 8, 12, 0.9);
  min-height: 48px;
}

.gallery-author {
  font-family: var(--font-celtic);
  font-size: 0.75rem;
  color: var(--color-silver-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.05em;
}

.gallery-text {
  font-family: var(--font-serif);
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

/* ==========================================================================
   Confetti Overlay & Footer
   ========================================================================== */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

footer {
  text-align: center;
  margin-top: auto;
  padding: 24px 0 8px 0;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
}

footer p {
  margin-bottom: 4px;
}

.footer-highlight {
  font-family: var(--font-celtic);
  color: var(--color-silver-mid);
  font-weight: 500;
}

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes pulseGlow {
  0%, 100% {
    filter: drop-shadow(0px 0px 12px rgba(128, 0, 32, 0.45)) drop-shadow(0px 0px 3px rgba(163, 168, 176, 0.25));
  }
  50% {
    filter: drop-shadow(0px 0px 22px rgba(128, 0, 32, 0.75)) drop-shadow(0px 0px 6px rgba(163, 168, 176, 0.45));
  }
}

.couple-gallery-scroll::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   Gothic Fog / Mist Ambient Background Effect
   ========================================================================== */
.fog-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.12; /* Subdued, elegant atmosphere */
}

.fog-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    rgba(128, 0, 32, 0.05) 0%,
    rgba(25, 25, 35, 0.08) 20%,
    rgba(128, 0, 32, 0.02) 40%,
    rgba(5, 5, 8, 0.1) 60%,
    rgba(128, 0, 32, 0.05) 80%,
    rgba(25, 25, 35, 0.08) 100%
  );
  filter: blur(50px);
}

.fog-layer-1 {
  animation: driftRight 65s linear infinite;
}

.fog-layer-2 {
  animation: driftLeft 85s linear infinite;
  opacity: 0.8;
}

@keyframes driftRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes driftLeft {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ==========================================================================
   Floating Audio Player
   ========================================================================== */
.audio-player-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(13, 13, 18, 0.85);
  border: 1px solid rgba(128, 0, 32, 0.4);
  color: var(--color-silver-light);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.7), 0px 0px 10px rgba(128, 0, 32, 0.3);
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.audio-btn:hover {
  border-color: var(--color-blood-light);
  transform: scale(1.08);
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.8), 0px 0px 15px rgba(128, 0, 32, 0.5);
}

.audio-btn.playing {
  animation: pulseAudioGlow 2s infinite alternate;
  color: var(--color-blood-light);
  border-color: rgba(128, 0, 32, 0.8);
}

@keyframes pulseAudioGlow {
  0% {
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.7), 0px 0px 10px rgba(128, 0, 32, 0.3);
  }
  100% {
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.7), 0px 0px 20px rgba(128, 0, 32, 0.6);
  }
}

.audio-tooltip {
  background: rgba(13, 13, 18, 0.9);
  border: 1px solid rgba(163, 168, 176, 0.15);
  color: var(--color-silver-light);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  pointer-events: none;
  animation: fadeOutTooltip 6s forwards;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

@keyframes fadeOutTooltip {
  0%, 75% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(10px); display: none; }
}

.gallery-download-link:hover {
  background: var(--color-blood-mid) !important;
  color: #ffffff !important;
  border-color: var(--color-blood-light) !important;
  transform: scale(1.1);
}

.download-all-btn:hover {
  background: rgba(128, 0, 32, 0.4) !important;
  border-color: var(--color-blood-light) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Additional Styles for PHP Templates
   ========================================================================== */

/* Hero prefix text */
.hero-prefix {
  font-family: var(--font-celtic);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--color-blood-light);
  text-transform: uppercase;
}

.hero-ampersand {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: normal;
  text-transform: lowercase;
  -webkit-text-fill-color: var(--color-silver-mid);
}

.wedding-date {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--color-silver-dark);
  text-transform: uppercase;
}

/* QR Trigger Button */
.qr-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid rgba(163, 168, 176, 0.2);
  border-radius: 6px;
  color: var(--color-silver-mid);
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-top: 4px;
}

.qr-trigger-btn:hover {
  border-color: var(--color-blood-mid);
  color: var(--color-silver-light);
  box-shadow: 0 0 8px rgba(128, 0, 32, 0.3);
}

/* Couple Gallery Horizontal Scroll */
.couple-gallery-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding: 4px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gallery-card-item {
  flex: 0 0 88%;
  scroll-snap-align: center;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3/2;
  border: 1px solid rgba(163, 168, 176, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.gallery-card-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card-item:hover img {
  transform: scale(1.05);
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(5, 5, 8, 0.85) 0%, transparent 100%);
}

.gallery-item-overlay span {
  font-family: var(--font-celtic);
  font-size: 0.8rem;
  color: var(--color-silver-light);
  letter-spacing: 0.05em;
}

/* Gallery Dot Indicators */
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(163, 168, 176, 0.2);
  border: 1px solid rgba(163, 168, 176, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-dot.active {
  background: var(--color-blood-mid);
  border-color: var(--color-blood-light);
  box-shadow: 0 0 6px rgba(128, 0, 32, 0.5);
  transform: scale(1.2);
}

/* Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-celtic);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
}

.form-textarea {
  background: var(--color-bg-input);
  border: 1px solid rgba(163, 168, 176, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  color: #ffffff;
  font-size: 0.9rem;
  resize: none;
  transition: var(--transition-smooth);
  outline: none;
}

.form-textarea:focus {
  border-color: var(--color-blood-mid);
  box-shadow: 0 0 8px rgba(128, 0, 32, 0.35);
}

.form-textarea::placeholder {
  color: var(--color-text-muted);
}

/* Drag & Drop Area */
.drag-drop-area {
  border: 1.5px dashed rgba(163, 168, 176, 0.3);
  background: rgba(5, 5, 8, 0.3);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
  margin-top: 6px;
}

.drag-drop-area:hover {
  border-color: var(--color-blood-mid);
  background: rgba(128, 0, 32, 0.04);
}

.drag-drop-icon {
  color: var(--color-silver-mid);
  transition: var(--transition-smooth);
  filter: drop-shadow(0 0 3px rgba(163, 168, 176, 0.2));
}

.drag-drop-area:hover .drag-drop-icon {
  color: var(--color-blood-light);
  transform: translateY(-4px);
  filter: drop-shadow(0 0 5px rgba(171, 11, 37, 0.5));
}

.drag-drop-text {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.drag-drop-subtext {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* Preview Container (PHP version) */
.preview-container {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(163, 168, 176, 0.2);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

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

.preview-delete-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(5, 5, 8, 0.85);
  border: 1px solid rgba(128, 0, 32, 0.6);
  color: var(--color-blood-light);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition-smooth);
  padding: 0;
  line-height: 1;
}

.preview-delete-btn:hover {
  background: var(--color-blood-mid);
  color: #ffffff;
  border-color: var(--color-blood-light);
  transform: scale(1.15);
}

/* Submit Button */
.submit-btn {
  background: var(--blood-gradient);
  color: #ffffff;
  font-family: var(--font-celtic);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  border: 1px solid rgba(163, 168, 176, 0.25);
  border-radius: 8px;
  padding: 15px 24px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(128, 0, 32, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(128, 0, 32, 0.5),
              0 0 10px rgba(171, 11, 37, 0.35);
  border-color: rgba(163, 168, 176, 0.45);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  border-color: rgba(163, 168, 176, 0.1);
}

/* Reset/More Photos Button */
.reset-btn {
  background: none;
  border: 1px solid rgba(163, 168, 176, 0.25);
  border-radius: 6px;
  color: var(--color-silver-light);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  display: inline-block;
}

.reset-btn:hover {
  border-color: var(--color-blood-mid);
  color: var(--color-blood-light);
  box-shadow: 0 0 8px rgba(128, 0, 32, 0.3);
}

/* Progress Overlay */
.progress-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.progress-modal {
  width: 100%;
  max-width: 340px;
  background: var(--color-bg-card);
  border: 1px solid rgba(163, 168, 176, 0.18);
  border-radius: 16px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.progress-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-silver-mid);
  text-align: center;
  margin: 0;
}

.progress-bar-wrapper {
  width: 100%;
  height: 6px;
  background: var(--color-bg-deep);
  border-radius: 3px;
  border: 1px solid rgba(163, 168, 176, 0.12);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--blood-gradient);
  box-shadow: 0 0 8px rgba(171, 11, 37, 0.7);
  border-radius: 3px;
  transition: width 0.15s linear;
}

.progress-percentage {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-primary);
  text-align: center;
}

/* Success Icon Wrapper */
.success-icon-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(128, 0, 32, 0.15);
  border: 2px solid var(--color-blood-mid);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 22px rgba(128, 0, 32, 0.4);
  color: var(--color-silver-light);
}

.success-title {
  font-family: var(--font-celtic);
  font-size: 1.3rem;
  color: var(--color-silver-light);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
  margin: 0;
}

.success-message {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 85%;
  margin: 0;
}

.success-dedication-box {
  background: rgba(128, 0, 32, 0.1);
  border: 1px solid rgba(128, 0, 32, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 90%;
}

.success-dedication-label {
  font-family: var(--font-celtic);
  font-size: 0.7rem;
  color: var(--color-silver-dark);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 4px;
}

.success-dedication-text {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-secondary);
  word-break: break-word;
  margin: 0;
}

/* QR Modal */
.qr-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(12px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.qr-modal-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(163, 168, 176, 0.2);
  border-radius: 16px;
  padding: 28px 22px;
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8),
              0 0 30px rgba(128, 0, 32, 0.12);
}

.qr-modal-title {
  font-family: var(--font-celtic);
  font-size: 1.15rem;
  color: var(--color-silver-light);
  margin: 0;
  text-align: center;
}

.qr-modal-desc {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

.qr-img-wrapper {
  width: 220px;
  height: 220px;
  border: 2px solid rgba(163, 168, 176, 0.15);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

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

.qr-text-card {
  text-align: center;
  padding: 12px 0;
  border-top: 1px solid rgba(163, 168, 176, 0.1);
  width: 100%;
}

.qr-close-btn {
  background: none;
  border: 1px solid rgba(163, 168, 176, 0.25);
  border-radius: 6px;
  color: var(--color-silver-light);
  padding: 10px 28px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.qr-close-btn:hover {
  border-color: var(--color-blood-mid);
  color: var(--color-blood-light);
  box-shadow: 0 0 8px rgba(128, 0, 32, 0.3);
}

/* Gallery Download Link */
.gallery-download-link {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(5, 5, 8, 0.8);
  border: 1px solid rgba(163, 168, 176, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-silver-light);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Form layout */
form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
