/* style.css — updated: bigger white background (container) + existing gallery/lightbox/heart styles */

/* Load cute Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Quicksand:wght@300;400;600;700&display=swap');

/* Theme variables */
:root {
  --bg-start: #ffd1dc;
  --bg-end: #fff0f5;
  --card: #ffffff;
  --muted: #6b6b6b;
  --accent-start: #ff9ab8;
  --accent-end: #ff6fa3;
  --accent-text: #ffffff;
  --shadow: rgba(0, 0, 0, 0.06);
  --pink-glow: rgba(255, 105, 180, 0.3);
  --close-btn-bg: #ffffff;
}

/* Reset & base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  /* Cute rounded sans for body, playful script for headings below */
  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(to bottom right, var(--bg-start), var(--bg-end));
  color: #ff5c8a;
  text-align: center;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Use a cute script for headings */
h1, h2, h3, #pageTitle {
  font-family: "Pacifico", "Quicksand", cursive;
}

/* Container card — MADE BIGGER */
.container {
  animation: fadeIn 1.2s ease-in-out;
  /* wider, responsive white background */
  width: 92%;
  max-width: 1200px; /* increased from 980px -> larger white area on wide screens */
  margin: 36px auto; /* center it */
  padding: 40px 36px; /* more padding for roomy interior */
  background: var(--card);
  border-radius: 18px; /* slightly larger rounding for a softer look */
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08); /* stronger, softer shadow */
  min-height: 72vh; /* takes more vertical space so white area looks bigger */
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Messages */
#messageList p {
  background: #ffe6ef;
  border-radius: 10px;
  padding: 10px;
  margin: 10px auto;
  width: 80%;
  box-shadow: 0 0 5px pink;
  color: #9b2b53;
  font-weight: 600;
}

/* Generic helpers */
.media {
  /* generic class used in some HTML files — avoid sizing conflicts */
  display: block;
  margin: 12px auto;
  max-width: 720px;
  width: auto; /* don't force a percent globally */
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 10px pink;
}

/* Large image for index / hero */
.media-large {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 12px auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* Gallery layout (flex) */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  max-width: 100%;
  padding: 6px; /* prevents gallery from touching container edges */
  box-sizing: border-box;
}

/* Alternative grid layout (optional; used by JS) */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

/* Thumbnail class (use this for gallery thumbnails and for JS-created elements) */
.media-thumb {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 0 15px var(--pink-glow);
  transition: transform 0.3s, box-shadow 0.2s;
  overflow: hidden;
  display: block;
  background: linear-gradient(180deg, #f6f6f6, #ffffff);
  cursor: pointer;
}

/* for older markup where <img> elements inside .gallery had no class */
.gallery img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 0 15px var(--pink-glow);
  transition: transform 0.3s, box-shadow 0.2s;
  display: block;
}

/* Hover & focus effects */
.media-thumb:hover,
.gallery img:hover,
.media-thumb:focus,
.gallery img:focus {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
  outline: none;
}

/* Video thumbnail wrapper */
.video-thumb {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Next button */
.nextBtn {
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  color: var(--accent-text);
  border: none;
  padding: 12px 30px;
  margin-top: 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 18px;
  transition: transform 160ms ease, box-shadow 160ms ease;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(255, 111, 163, 0.12);
}
.nextBtn:hover {
  transform: translateY(-3px);
  background: linear-gradient(90deg, #ff7aa7, #ff3b6f);
}

/* Edit button & panel */
#editBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffb6c1;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 1200;
}
#editPanel {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 20px;
  background: #fff0f5;
  border: 2px solid #ffb6c1;
  border-radius: 10px;
  padding: 15px;
  width: 250px;
  box-shadow: 0 0 10px pink;
  z-index: 1200;
}
#editPanel h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}
#editPanel textarea,
#editPanel input[type="file"],
#editPanel input[type="text"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid #eee;
  font-size: 13px;
}

/* Floating hearts (fixed — ensure visible but don't block clicks) */
#hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1000;
  pointer-events: none;
}
.heart {
  position: absolute;
  bottom: -40px;
  color: #ff6f91;
  font-size: 20px;
  animation: floatHearts 6s linear infinite;
}
@keyframes floatHearts {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-800px) scale(1.5);
    opacity: 0;
  }
}

/* Countdown */
#countdown {
  font-size: 24px;
  color: #ff4d6d;
  margin-top: 20px;
  text-shadow: 0 0 5px pink;
}

/* Lightbox for full-size media */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.lightbox-content {
  max-width: 96%;
  max-height: 92%;
  border-radius: 12px;
  overflow: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content img,
.lightbox-content video {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: fixed;
  right: 18px;
  top: 18px;
  background: var(--close-btn-bg);
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 18px;
  cursor: button;
  z-index: 2010;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Accessibility & reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive breakpoints */
@media (max-width: 800px) {
  .container {
    margin: 20px;
    padding: 18px;
  }
  .media-thumb {
    height: 100px;
    width: 100px;
    border-radius: 8px;
  }
  .thumb-video {
    height: 100px;
  }
  .lightbox-content img,
  .lightbox-content video {
    max-height: 70vh;
  }
  .gallery img {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 768px) {
  .gallery .media,
  .gallery img {
    width: 120px;
    height: 120px;
  }
  .media {
    width: 90%;
  } /* large media becomes wider on small screens */
  .media-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .gallery .media,
  .gallery img {
    width: 100px;
    height: 100px;
  }
  .gallery {
    gap: 10px;
  }
  .media-thumb {
    height: 96px;
  }
  .thumb-video {
    height: 96px;
  }
  #editPanel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 78px;
  }
}
/* (existing styles preserved) */

/* add a small style for user comments inserted by the edit panel */
.user-comment {
  background: #fff6fb;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px auto;
  max-width: 900px;
  color: #7a2d4a;
  box-shadow: 0 6px 18px rgba(255, 105, 180, 0.08);
  text-align: left;
  font-weight: 600;
}
