/* ============================================================
   Erin's 40th — Shared Stylesheet
   Palette: warm rose/blush + gold
   ============================================================ */

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

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

:root {
  --rose-light:   #F9E8E8;
  --rose-mid:     #E8A4A4;
  --rose-dark:    #C45C73;
  --rose-deep:    #9B3A52;
  --gold-light:   #FDF3C8;
  --gold-mid:     #E8C84A;
  --gold-dark:    #C9A227;
  --blush-bg:     #FFF8F5;
  --card-bg:      #FFFFFF;
  --text-dark:    #3A2630;
  --text-mid:     #6B4A54;
  --text-light:   #9E7A84;
  --border:       #F0D4D4;
  --shadow-sm:    0 2px 8px rgba(196,92,115,0.10);
  --shadow-md:    0 4px 20px rgba(196,92,115,0.15);
  --shadow-lg:    0 8px 40px rgba(196,92,115,0.20);
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--blush-bg);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

.serif { font-family: 'Playfair Display', Georgia, serif; }
.italic { font-style: italic; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--wide { max-width: 960px; }
.container--narrow { max-width: 480px; }

/* ---------- Decorative Background ---------- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.page-bg::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,164,164,0.25) 0%, transparent 70%);
  border-radius: 50%;
}
.page-bg::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,200,74,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

/* ---------- Password Gate ---------- */
.gate-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.gate-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  border: 1px solid var(--border);
}

@media (max-width: 480px) {
  .gate-card { padding: 36px 24px; }
}

.gate-icon {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.gate-title {
  font-size: 2rem;
  color: var(--rose-deep);
  margin-bottom: 8px;
}

.gate-subtitle {
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-group label .required {
  color: var(--rose-dark);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: #FFFFFF;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--rose-mid);
  box-shadow: 0 0 0 3px rgba(196, 92, 115, 0.12);
}

textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

input::placeholder, textarea::placeholder {
  color: var(--text-light);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 5px;
}

.form-error {
  font-size: 0.85rem;
  color: var(--rose-deep);
  margin-top: 6px;
  display: none;
}
.form-error.visible { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  min-height: 50px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn--primary {
  background: linear-gradient(135deg, var(--rose-dark), var(--rose-deep));
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(0); }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-mid), var(--gold-dark));
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}
.btn--gold:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn--ghost {
  background: transparent;
  color: var(--rose-dark);
  border: 2px solid var(--rose-mid);
}
.btn--ghost:hover { background: var(--rose-light); }

.btn--full { width: 100%; }

.btn--sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  min-height: 36px;
  border-radius: 6px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Status buttons */
.btn--pending  { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.btn--approved { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.btn--hidden   { background: #F3F4F6; color: #4B5563; border: 1px solid #E5E7EB; }

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(160deg, #fff0f2 0%, #fff8e8 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '🌸';
  position: absolute;
  font-size: 80px;
  top: -20px;
  left: -10px;
  opacity: 0.2;
  transform: rotate(-20deg);
}
.hero::after {
  content: '✨';
  position: absolute;
  font-size: 60px;
  bottom: -10px;
  right: 10px;
  opacity: 0.2;
}

.hero-photos {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero-photo-slot {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-light), var(--gold-light));
  border: 4px solid white;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-slot:nth-child(1) { transform: rotate(-3deg) translateY(4px); }
.hero-photo-slot:nth-child(2) { transform: scale(1.12); z-index: 1; }
.hero-photo-slot:nth-child(3) { transform: rotate(3deg) translateY(4px); }

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  color: var(--rose-deep);
  margin-bottom: 16px;
}

.hero h1 em {
  font-style: italic;
  color: var(--rose-dark);
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-mid);
  max-width: 480px;
  margin: 0 auto 8px;
  line-height: 1.6;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 28px auto 0;
  max-width: 300px;
  color: var(--rose-mid);
}
.hero-divider::before, .hero-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose-mid), transparent);
}

/* ---------- Cards ---------- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 16px;
}

/* ---------- Upload Area ---------- */
.upload-area {
  border: 2px dashed var(--rose-mid);
  border-radius: var(--radius-sm);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--rose-light);
  position: relative;
}

.upload-area:hover, .upload-area.drag-over {
  border-color: var(--rose-dark);
  background: #F5D5D8;
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon { font-size: 36px; margin-bottom: 8px; }
.upload-label { font-weight: 600; color: var(--rose-dark); }
.upload-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.upload-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
}

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

.upload-preview .remove-btn {
  position: absolute;
  top: 2px; right: 2px;
  background: rgba(196,92,115,0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.upload-progress {
  width: 80px; height: 80px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rose-light);
  font-size: 24px;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- Success Screen ---------- */
.success-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  display: none;
}

.success-screen.visible { display: flex; }

.success-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 56px 40px;
  max-width: 460px;
  text-align: center;
  border: 1px solid var(--border);
}

.success-icon {
  font-size: 72px;
  display: block;
  margin-bottom: 20px;
  animation: pop 0.5s cubic-bezier(0.17, 0.67, 0.3, 1.5);
}

@keyframes pop {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

.success-card h2 {
  font-size: 2rem;
  color: var(--rose-deep);
  margin-bottom: 12px;
}

.success-card p {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- Admin Interface ---------- */
.admin-header {
  background: linear-gradient(135deg, var(--rose-deep), #7A2D44);
  color: white;
  padding: 20px 0;
}

.admin-header h1 {
  font-size: 1.5rem;
  color: white;
}

.admin-header .subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

.admin-stats {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.stat-chip {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.stat-chip.all     { background: var(--rose-light); color: var(--rose-deep); border-color: var(--rose-mid); }
.stat-chip.pending { background: #FEF3C7; color: #92400E; }
.stat-chip.approved{ background: #D1FAE5; color: #065F46; }
.stat-chip.hidden  { background: #F3F4F6; color: #4B5563; }
.stat-chip.active, .stat-chip:hover { transform: scale(1.04); box-shadow: var(--shadow-sm); }

.memory-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.memory-card:hover { box-shadow: var(--shadow-md); }

.memory-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.memory-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.memory-card__contact {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.status-badge.pending  { background: #FEF3C7; color: #92400E; }
.status-badge.approved { background: #D1FAE5; color: #065F46; }
.status-badge.hidden   { background: #F3F4F6; color: #4B5563; }

.memory-card__message {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.memory-card__images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.memory-card__images img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s;
}
.memory-card__images img:hover { transform: scale(1.05); }

.memory-card__meta {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 14px;
}

.memory-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.memory-card__actions .btn--sm {
  flex: 1;
  min-width: 80px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-state .emoji { font-size: 48px; display: block; margin-bottom: 16px; }
.empty-state p { font-size: 1rem; }

/* ---------- Celebrate / Gallery View ---------- */
.celebrate-hero {
  background: linear-gradient(160deg, #fff0f5 0%, #fffbea 50%, #fff5f0 100%);
  text-align: center;
  padding: 60px 20px 48px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.celebrate-hero .confetti {
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
  overflow: hidden;
  height: 100%;
}

.celebrate-hero h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
  color: var(--rose-deep);
  margin-bottom: 12px;
}

.celebrate-hero .tagline {
  font-size: 1.1rem;
  color: var(--text-mid);
  max-width: 500px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 40px 0 60px;
}

.gallery-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery-card__photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.gallery-card__photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.gallery-card__body {
  padding: 20px;
}

.gallery-card__quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 16px;
}

.gallery-card__quote::before { content: '\201C'; }
.gallery-card__quote::after  { content: '\201D'; }

.gallery-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-card__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-mid), var(--rose-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.gallery-card__name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.gallery-card__date {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 10, 20, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Loading ---------- */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,248,245,0.85);
  z-index: 500;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.loading-overlay.active { display: flex; }

.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--rose-light);
  border-top-color: var(--rose-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--text-dark);
  color: white;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

.toast.success { background: #065F46; }
.toast.error   { background: var(--rose-deep); }

@keyframes toastIn  { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Section headings ---------- */
.section-heading {
  margin: 40px 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2 {
  font-size: 1.6rem;
  color: var(--rose-deep);
}

.section-heading .count {
  background: var(--rose-light);
  color: var(--rose-deep);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .memory-card__actions .btn--sm { font-size: 0.78rem; padding: 8px 10px; }
  .hero-photo-slot { width: 96px; height: 96px; }
  .hero-photo-slot:nth-child(1),
  .hero-photo-slot:nth-child(3) { transform: none; }
  .hero-photo-slot:nth-child(2) { transform: none; }
  .admin-stats { gap: 8px; }
}
