/* ============================================
   VINTAGE PHOTO ALBUM AESTHETIC
   Inspired by antique leather-bound albums,
   Victorian photography, and old family archives
   ============================================ */

/* Base Reset & Variables */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Antique Color Palette */
  --color-bg: #e8dfd0;
  --color-bg-warm: #ddd2c0;
  --color-bg-dark: #c4b49a;
  --color-surface: #f7f3eb;
  --color-surface-aged: #efe9dc;
  --color-cream: #fdfbf5;
  --color-ivory: #fffef8;
  --color-parchment: #f5eedf;

  /* Rich Browns & Sepia */
  --color-text: #2c1810;
  --color-text-secondary: #5c4434;
  --color-text-muted: #8b7355;
  --color-sepia: #704214;
  --color-sepia-dark: #4a2c0f;
  --color-mahogany: #4a0e0e;
  --color-leather: #654321;
  --color-leather-dark: #3d2914;

  /* Borders & Accents */
  --color-border: #c9b896;
  --color-border-light: #ddd4c0;
  --color-border-dark: #a08060;
  --color-gold: #b8860b;
  --color-gold-light: #daa520;
  --color-brass: #c9a227;
  --color-copper: #b87333;

  /* Functional Colors */
  --color-primary: #6b3a1f;
  --color-primary-hover: #4d2a16;
  --color-primary-light: #f5ebe0;
  --color-success: #4a5d4a;
  --color-success-hover: #3a4a3a;
  --color-success-bg: #e8f0e8;
  --color-error: #8b3a3a;
  --color-error-bg: #f5e5e5;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Typography - Elegant Vintage */
  --font-display: 'Playfair Display', 'Didot', 'Georgia', serif;
  --font-body: 'Crimson Text', 'Garamond', 'Times New Roman', serif;
  --font-ui: 'Source Sans 3', 'Helvetica Neue', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.75rem;
  --font-size-5xl: 3.5rem;
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(44, 24, 16, 0.1);
  --shadow: 0 3px 10px rgba(44, 24, 16, 0.15);
  --shadow-md: 0 6px 20px rgba(44, 24, 16, 0.18);
  --shadow-lg: 0 12px 40px rgba(44, 24, 16, 0.22);
  --shadow-vintage:
    0 4px 20px rgba(44, 24, 16, 0.2),
    0 0 0 1px rgba(44, 24, 16, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  --shadow-emboss:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  --radius-sm: 3px;
  --radius: 5px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --transition: 200ms ease;
  --transition-slow: 400ms ease;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Aged Paper Background */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background:
    /* Subtle grain texture */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E"),
    /* Aged paper staining */
    radial-gradient(ellipse at 20% 80%, rgba(139, 90, 43, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 90, 43, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 90, 43, 0.04) 0%, transparent 70%),
    /* Base color */
    linear-gradient(to bottom, var(--color-bg) 0%, var(--color-bg-warm) 100%);
  background-blend-mode: soft-light, normal, normal, normal, normal;
  min-height: 100vh;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

/* Ornate corner flourish */
.ornate-corner {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0.3;
  pointer-events: none;
}

.ornate-corner::before,
.ornate-corner::after {
  content: '';
  position: absolute;
  background: var(--color-sepia);
}

.ornate-corner.top-left { top: 12px; left: 12px; }
.ornate-corner.top-right { top: 12px; right: 12px; transform: scaleX(-1); }
.ornate-corner.bottom-left { bottom: 12px; left: 12px; transform: scaleY(-1); }
.ornate-corner.bottom-right { bottom: 12px; right: 12px; transform: scale(-1); }

/* Vintage ornamental divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--color-border-dark);
}

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

.ornament-symbol {
  font-size: 1.2rem;
  opacity: 0.6;
}

/* Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

@media (min-width: 640px) {
  .container {
    padding: var(--space-12) var(--space-6);
  }
}

/* ============================================
   HEADER - Victorian Style
   ============================================ */

.header {
  text-align: center;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-8);
  position: relative;
}

/* Decorative top border */
.header::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--color-gold), var(--color-brass), var(--color-gold), transparent);
}

/* Decorative bottom with flourish */
.header::after {
  content: '❧';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--color-sepia);
  opacity: 0.5;
}

.title {
  font-family: var(--font-display);
  font-size: var(--font-size-5xl);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  text-shadow:
    2px 2px 0 rgba(255,255,255,0.5),
    -1px -1px 0 rgba(0,0,0,0.05);
  position: relative;
}

.subtitle {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  max-width: 480px;
  margin: 0 auto;
  font-style: italic;
  letter-spacing: 0.02em;
}

/* ============================================
   MAIN CARD - Antique Album Page
   ============================================ */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-vintage);
  padding: var(--space-10);
  margin-bottom: var(--space-10);
  position: relative;
  border: 1px solid var(--color-border-light);
  /* Vintage paper effect */
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 40%),
    linear-gradient(225deg, rgba(0,0,0,0.02) 0%, transparent 40%);
}

/* Decorative corner brackets */
.card::before,
.card::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: var(--color-border-dark);
  border-style: solid;
  opacity: 0.4;
}

.card::before {
  top: 16px;
  left: 16px;
  border-width: 2px 0 0 2px;
}

.card::after {
  bottom: 16px;
  right: 16px;
  border-width: 0 2px 2px 0;
}

@media (min-width: 640px) {
  .card {
    padding: var(--space-12) var(--space-16);
  }
}

/* ============================================
   UPLOAD SECTION - Vintage Frame
   ============================================ */

.upload-section {
  width: 100%;
}

.drop-zone {
  border: 3px double var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-16) var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background:
    linear-gradient(var(--color-parchment), var(--color-parchment)) padding-box,
    linear-gradient(135deg, var(--color-gold) 0%, var(--color-brass) 50%, var(--color-gold) 100%) border-box;
  position: relative;
  box-shadow:
    inset 0 2px 10px rgba(0,0,0,0.05),
    0 4px 15px rgba(44, 24, 16, 0.1);
}

/* Inner decorative border */
.drop-zone::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  pointer-events: none;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(139, 90, 43, 0.02) 10px,
    rgba(139, 90, 43, 0.02) 20px
  );
}

/* Corner decorations */
.drop-zone::after {
  content: '';
  position: absolute;
  inset: 20px;
  border: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, var(--color-gold) 2px, transparent 2px) 0 0,
    linear-gradient(to right, var(--color-gold) 2px, transparent 2px) 0 100%,
    linear-gradient(to left, var(--color-gold) 2px, transparent 2px) 100% 0,
    linear-gradient(to left, var(--color-gold) 2px, transparent 2px) 100% 100%,
    linear-gradient(to bottom, var(--color-gold) 2px, transparent 2px) 0 0,
    linear-gradient(to bottom, var(--color-gold) 2px, transparent 2px) 100% 0,
    linear-gradient(to top, var(--color-gold) 2px, transparent 2px) 0 100%,
    linear-gradient(to top, var(--color-gold) 2px, transparent 2px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  opacity: 0.5;
}

.drop-zone:hover,
.drop-zone:focus {
  border-color: var(--color-gold);
  background:
    linear-gradient(var(--color-ivory), var(--color-ivory)) padding-box,
    linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 50%, var(--color-gold-light) 100%) border-box;
  outline: none;
  transform: scale(1.005);
  box-shadow:
    inset 0 2px 10px rgba(0,0,0,0.05),
    0 8px 25px rgba(44, 24, 16, 0.15);
}

.drop-zone.drag-over {
  border-color: var(--color-gold);
  transform: scale(1.01);
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  z-index: 1;
}

.upload-icon {
  width: 64px;
  height: 64px;
  color: var(--color-sepia);
  margin-bottom: var(--space-4);
  opacity: 0.7;
}

.drop-zone-text {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.03em;
}

.drop-zone-subtext {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

.browse-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-style: wavy;
  text-decoration-thickness: 1px;
}

.browse-link:hover {
  color: var(--color-primary-hover);
}

.drop-zone-hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  font-style: italic;
}

/* ============================================
   PREVIEW SECTION - Album Page Layout
   ============================================ */

.preview-section {
  animation: fadeIn var(--transition-slow) ease;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.preview-title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.03em;
}

.preview-actions {
  display: flex;
  gap: var(--space-2);
}

.preview-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 640px) {
  .preview-container {
    grid-template-columns: 1fr 1fr;
  }
}

/* Photo Frame - Classic Album Mount */
.preview-card {
  position: relative;
  background: var(--color-ivory);
  border-radius: var(--radius);
  overflow: visible;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Multi-layer frame effect */
  box-shadow:
    /* Inner shadow for depth */
    inset 0 2px 8px rgba(0,0,0,0.15),
    inset 0 0 20px rgba(0,0,0,0.05),
    /* Outer frame shadow */
    0 4px 20px rgba(44, 24, 16, 0.2),
    0 8px 40px rgba(44, 24, 16, 0.1);
  /* Ornate border */
  border: 12px solid;
  border-image:
    linear-gradient(
      135deg,
      var(--color-leather) 0%,
      var(--color-sepia) 25%,
      var(--color-leather-dark) 50%,
      var(--color-sepia) 75%,
      var(--color-leather) 100%
    ) 1;
}

/* Photo corners - like real album mounts */
.preview-card::before,
.preview-card::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--color-sepia-dark) 0%, var(--color-leather) 100%);
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  opacity: 0.9;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.preview-card::before {
  top: -2px;
  left: -2px;
}

.preview-card::after {
  bottom: -2px;
  right: -2px;
  transform: rotate(180deg);
}

.preview-label {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-parchment);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  font-style: italic;
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-sm);
  z-index: 1;
  border: 1px solid var(--color-border-light);
  letter-spacing: 0.05em;
}

.preview-image {
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  object-fit: contain;
  filter: contrast(1.02) sepia(0.05);
}

.result-card {
  position: relative;
}

.result-card.loading::before {
  animation: pulse 2s ease-in-out infinite;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 115, 85, 0.95) 0%,
    rgba(101, 82, 60, 0.95) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-md);
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  text-align: center;
  color: var(--color-cream);
}

.loading-spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  color: var(--color-gold);
}

.loading-spinner svg {
  width: 100%;
  height: 100%;
}

.loading-circle {
  transform-origin: center;
  animation: spin 1.2s linear infinite;
}

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

.loading-stage {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 var(--space-2);
  color: var(--color-cream);
}

.loading-hint {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-cream);
  opacity: 0.7;
  margin: 0;
}

/* ============================================
   OPTIONS SECTION
   ============================================ */

.options-section {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 2px solid var(--color-border-light);
  animation: fadeIn var(--transition-slow) ease;
  position: relative;
}

/* Decorative divider element */
.options-section::before {
  content: '✦';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  padding: 0 var(--space-4);
  color: var(--color-gold);
  font-size: 1.2rem;
}

.input-group {
  margin-bottom: var(--space-6);
}

.input-label {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.optional {
  color: var(--color-text-muted);
  font-weight: 400;
  font-style: italic;
  text-transform: none;
}

.input-textarea,
.input-field {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: var(--color-ivory);
  transition: all var(--transition);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.input-textarea {
  resize: vertical;
}

.input-textarea:focus,
.input-field:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.05),
    0 0 0 3px rgba(184, 134, 11, 0.15);
  background: var(--color-cream);
}

.input-textarea::placeholder,
.input-field::placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

.input-hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  font-style: italic;
}

.action-buttons {
  display: flex;
  justify-content: center;
  margin-top: var(--space-8);
}

/* ============================================
   BUTTONS - Antique Brass Style
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background:
    linear-gradient(to bottom,
      var(--color-leather) 0%,
      var(--color-leather-dark) 50%,
      var(--color-sepia-dark) 100%
    );
  color: var(--color-cream);
  padding: var(--space-4) var(--space-10);
  font-size: var(--font-size-lg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -2px 0 rgba(0,0,0,0.2),
    0 4px 0 var(--color-sepia-dark),
    0 6px 15px rgba(44, 24, 16, 0.3);
  border: 1px solid var(--color-leather-dark);
  position: relative;
}

/* Brass/gold decorative accents */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
  background:
    linear-gradient(to bottom,
      var(--color-primary) 0%,
      var(--color-leather) 50%,
      var(--color-leather-dark) 100%
    );
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -2px 0 rgba(0,0,0,0.2),
    0 6px 0 var(--color-sepia-dark),
    0 10px 25px rgba(44, 24, 16, 0.35);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -2px 0 rgba(0,0,0,0.2),
    0 2px 0 var(--color-sepia-dark),
    0 3px 10px rgba(44, 24, 16, 0.3);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-sm), var(--shadow-emboss);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-parchment);
  border-color: var(--color-border-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-surface-aged);
  color: var(--color-text);
  border-color: var(--color-border-light);
}

.btn-success {
  background:
    linear-gradient(to bottom,
      var(--color-success) 0%,
      var(--color-success-hover) 100%
    );
  color: var(--color-cream);
  padding: var(--space-4) var(--space-8);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 3px 0 #2d3a2d,
    0 4px 12px rgba(74, 93, 74, 0.3);
  border: 1px solid var(--color-success-hover);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 4px 0 #2d3a2d,
    0 6px 16px rgba(74, 93, 74, 0.35);
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.btn-text,
.btn-loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */

.download-section {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 2px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  animation: fadeIn var(--transition-slow) ease;
  position: relative;
}

.download-section::before {
  content: '❦';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  padding: 0 var(--space-4);
  color: var(--color-sepia);
  font-size: 1.5rem;
  opacity: 0.6;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .download-section {
    flex-direction: row;
    justify-content: center;
  }
}

/* ============================================
   ERROR MESSAGE
   ============================================ */

.error-message {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--color-error-bg);
  border-radius: var(--radius);
  border: 2px solid rgba(139, 58, 58, 0.3);
  color: var(--color-error);
  font-size: var(--font-size-sm);
  text-align: center;
  animation: shake 0.4s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

/* ============================================
   INFO SECTION - Vintage Cards
   ============================================ */

.info-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

@media (min-width: 640px) {
  .info-section {
    grid-template-columns: 1fr 1fr;
  }
}

.info-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border-light);
  position: relative;
  overflow: hidden;
}

/* Decorative top ribbon */
.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--color-gold) 0px,
      var(--color-gold) 10px,
      var(--color-brass) 10px,
      var(--color-brass) 20px
    );
}

/* Corner flourish */
.info-card::after {
  content: '✿';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1rem;
  color: var(--color-gold);
  opacity: 0.4;
}

.info-title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
  letter-spacing: 0.02em;
}

.info-list {
  list-style: none;
}

.info-list li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}

.info-list li::before {
  content: '❧';
  position: absolute;
  left: 0;
  color: var(--color-sepia);
  font-size: 0.9em;
  opacity: 0.7;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border-light);
  position: relative;
}

.footer::before {
  content: '— ✦ —';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg);
  padding: 0 var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  letter-spacing: 0.2em;
}

.privacy-note {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-style: italic;
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden {
  display: none !important;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

/* ============================================
   ENHANCEMENT OPTIONS
   ============================================ */

.enhancement-options {
  margin-bottom: var(--space-5);
}

.options-label {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.option-toggles {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.option-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-parchment);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.option-toggle:hover {
  border-color: var(--color-gold);
  background: var(--color-cream);
}

.option-toggle.active {
  border-color: var(--color-gold);
  background: linear-gradient(135deg, rgba(197, 159, 90, 0.15) 0%, rgba(197, 159, 90, 0.05) 100%);
  box-shadow: 0 0 0 3px rgba(197, 159, 90, 0.2);
}

.option-toggle.active .option-icon {
  color: var(--color-gold);
}

.option-icon {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.option-toggle:hover .option-icon {
  color: var(--color-text);
}

.option-label {
  font-family: var(--font-ui);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
}

.option-desc {
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
}

.optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .option-toggles {
    flex-direction: column;
  }

  .option-toggle {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: var(--space-3);
  }

  .option-toggle .option-icon {
    flex-shrink: 0;
  }

  .option-desc {
    display: none;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ============================================
   NAVIGATION - Vintage Header Bar
   ============================================ */

.nav {
  background:
    linear-gradient(to bottom,
      var(--color-leather) 0%,
      var(--color-leather-dark) 100%
    );
  border-bottom: 3px solid var(--color-sepia-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow:
    0 3px 10px rgba(44, 24, 16, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: 400;
  color: var(--color-cream);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

.nav-links {
  display: flex;
  gap: var(--space-2);
}

.nav-link {
  font-family: var(--font-ui);
  color: rgba(253, 251, 245, 0.8);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  transition: all var(--transition);
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--color-cream);
  background: rgba(255,255,255,0.1);
}

.nav-link.active {
  color: var(--color-gold-light);
  background: rgba(0,0,0,0.2);
  border-color: rgba(218, 165, 32, 0.3);
  font-weight: 600;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-email {
  font-family: var(--font-ui);
  font-size: var(--font-size-sm);
  color: rgba(253, 251, 245, 0.7);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

/* ============================================
   AUTH PAGES - Elegant Vintage
   ============================================ */

.auth-container {
  max-width: 460px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card {
  text-align: center;
  position: relative;
}

/* Decorative frame around auth card */
.auth-card::before {
  content: '';
  position: absolute;
  inset: -20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  pointer-events: none;
  opacity: 0.3;
}

.auth-title {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-8);
  letter-spacing: 0.04em;
}

.auth-form {
  text-align: left;
}

.btn-full {
  width: 100%;
  margin-top: var(--space-4);
}

.auth-footer {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-light);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  position: relative;
}

.auth-footer::before {
  content: '❧';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  padding: 0 var(--space-3);
  color: var(--color-sepia);
  opacity: 0.5;
}

.auth-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
  text-decoration-style: wavy;
}

.success-message {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--color-success-bg);
  border-radius: var(--radius);
  border: 2px solid rgba(74, 93, 74, 0.3);
  color: var(--color-success);
  font-size: var(--font-size-sm);
  text-align: center;
  animation: fadeIn var(--transition-slow) ease;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c4434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
  cursor: pointer;
}

input[type="date"].input-field {
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.form-row .input-group {
  margin-bottom: 0;
}

.flex-1 {
  flex: 1;
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* ============================================
   SAVE TO LIBRARY SECTION
   ============================================ */

.save-library-section {
  margin-top: var(--space-12);
  padding-top: var(--space-10);
  border-top: 3px double var(--color-border);
  position: relative;
}

/* Decorative header element */
.save-library-section::before {
  content: '✤ PRESERVE YOUR MEMORIES ✤';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  padding: 0 var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--font-size-xs);
  color: var(--color-sepia);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.save-library-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.save-library-title {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: 0.03em;
}

.save-library-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  font-style: italic;
}

.save-library-form {
  max-width: 500px;
  margin: 0 auto;
  background: var(--color-parchment);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.save-library-form .input-group {
  margin-bottom: var(--space-4);
}

.btn-save-library {
  width: 100%;
  margin-top: var(--space-4);
}

/* Saved Confirmation */
.saved-confirmation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-success-bg);
  border-radius: var(--radius);
  border: 2px solid rgba(74, 93, 74, 0.3);
  color: var(--color-success);
  margin-top: var(--space-4);
  animation: fadeIn var(--transition-slow) ease;
}

.saved-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.view-library-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: var(--space-2);
}

.view-library-link:hover {
  text-decoration: underline;
}

.save-library-form.saved .input-group,
.save-library-form.saved .form-row,
.save-library-form.saved .btn-save-library {
  display: none;
}

/* ============================================
   VINTAGE DECORATIVE DIVIDERS
   ============================================ */

.vintage-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-10) 0;
}

.vintage-divider::before,
.vintage-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background:
    linear-gradient(to right,
      transparent 0%,
      var(--color-border) 20%,
      var(--color-border) 80%,
      transparent 100%
    );
}

.vintage-divider span {
  color: var(--color-sepia);
  font-style: italic;
  font-size: var(--font-size-sm);
  opacity: 0.7;
}
