* { box-sizing: border-box; }

:root {
  --cream: #fdf6ec;
  --warm-white: #fffcf8;
  --amber: #c9762f;
  --rust: #a8481f;
  --maroon: #6e2c2c;
  --gold: #c8992e;
  --text-dark: #4a342a;
  --text-muted: #8b6f5e;
  --card-border: #ecd9bd;
}

body {
  margin: 0;
  font-family: "Lora", Georgia, serif;
  background: linear-gradient(180deg, #fdf1de 0%, #f7ddb8 55%, #f0c896 100%);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

h1, h2 {
  font-family: "Playfair Display", Georgia, serif;
}

#leaves {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.leaf {
  position: absolute;
  top: -40px;
  font-size: 22px;
  opacity: 0.85;
  animation-name: fall, sway;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: 1, infinite;
  will-change: transform;
}

@keyframes fall {
  from { transform: translateY(-5vh); }
  to { transform: translateY(105vh); }
}

@keyframes sway {
  0%, 100% { margin-left: 0px; }
  50% { margin-left: 40px; }
}

header {
  text-align: center;
  padding: 56px 20px 28px;
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */
header {
  text-align: center;
  padding: 56px 20px 28px;
  position: relative;
  z-index: 1;
}

.photo-carousel {
  width: min(90vw, 420px);
  height: min(60vw, 280px);
  margin: 0 auto 18px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(110, 44, 44, 0.28);
  border: 4px solid var(--warm-white);
}

.photo-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.photo-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.photo-slide.active {
  opacity: 1;
}

.photo-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.photo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.photo-dot.active {
  background: var(--warm-white);
  transform: scale(1.3);
}

header h1 {
  margin: 0 0 14px;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: 0.3px;
}

.welcome {
  max-width: 560px;
  margin: 0 auto 6px;
  color: var(--text-dark);
  font-size: 1.05rem;
  line-height: 1.6;
  font-style: italic;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

#search {
  width: 90%;
  max-width: 360px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--warm-white);
  font-family: "Lora", serif;
  font-size: 0.95rem;
  color: var(--text-dark);
}

#search:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(201, 118, 47, 0.15);
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}
.community-section {
  max-width: 700px;
  margin: 0 auto 40px;
  padding: 0 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.community-section h2 {
  color: var(--maroon);
  font-size: 1.4rem;
  margin: 0 0 16px;
}

.community-carousel {
  width: 100%;
  max-width: 100%;
  height: min(50vw, 320px);
}
.view-all-btn {
  margin-top: 16px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--rust);
  background: transparent;
  color: var(--rust);
  font-family: "Lora", serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.view-all-btn:hover {
  background: var(--rust);
  color: var(--warm-white);
}

.gallery-inner {
  max-width: 760px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
}

.gallery-title {
  margin: 0 0 16px;
  color: var(--maroon);
  font-size: 1.3rem;
  text-align: center;
}

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

.gallery-grid img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.gallery-grid img:hover {
  transform: scale(1.04);
}

.lightbox {
  background: rgba(20, 10, 5, 0.92);
}

.lightbox img {
  max-width: 88vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.play-all-btn {
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--rust), var(--amber));
  color: var(--warm-white);
  font-family: "Lora", serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(168, 72, 31, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.play-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(168, 72, 31, 0.4);
}

.play-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.now-playing-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(168, 72, 31, 0.12);
  color: var(--rust);
  font-size: 0.8rem;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  padding: 10px 32px 70px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--warm-white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 6px 18px rgba(110, 44, 44, 0.1);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(110, 44, 44, 0.18);
}

.card-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-bg-1 { background: linear-gradient(135deg, #d98a3d 0%, #a8481f 100%); }
.card-bg-2 { background: linear-gradient(135deg, #6e2c2c 0%, #c8992e 100%); }
.card-bg-3 { background: radial-gradient(circle at 32% 30%, #d9ae4e 0%, #a8481f 75%); }
.card-bg-4 { background: linear-gradient(135deg, #a8481f 0%, #5a2323 100%); }

.play-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--rust);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  padding-left: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.card-body { padding: 14px 16px 18px; }
.card-name { font-weight: 600; color: var(--rust); font-size: 1.08rem; font-family: "Playfair Display", serif; }
.card-relationship { color: var(--text-muted); font-size: 0.85rem; margin-top: 3px; }

.card-body { padding: 14px 16px 18px; }
.card-name { font-weight: 600; color: var(--rust); font-size: 1.08rem; font-family: "Playfair Display", serif; }
.card-relationship { color: var(--text-muted); font-size: 0.85rem; margin-top: 3px; }

.empty-msg {
  text-align: center;
  color: var(--text-muted);
  margin-top: 60px;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(60, 30, 20, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal[hidden] {
  display: none;
}

.modal-inner {
  background: var(--warm-white);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 2;
}

.modal-inner video {
  width: 100%;
  max-height: 60vh;
  background: #000;
  display: block;
}

.modal-meta { padding: 18px 22px 24px; }
.modal-meta h2 { margin: 0 0 4px; color: var(--rust); font-size: 1.3rem; }
.modal-meta p { margin: 4px 0; color: var(--text-muted); }