@font-face {
  font-family: "hanged";
  src: url(assets/fonts/Hanged\ Letters.ttf);
}

@font-face {
  font-family: "hand";
  src: url(assets/fonts/Royalty.ttf);
}

/* Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);
  color: #e0e0e0;
  line-height: 1.5;
  transition: background 0.3s;
}

/* Overlay */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal box */
.modal-content {
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.modalHeader {
  text-align: center;
  font-family: "hanged";
  color: #bb86fc;
  font-size: 25px;
  letter-spacing: 3px;
  text-shadow: 0 0 4px #bb86fc;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #bb86fc;
  text-shadow: 0 0 4px #bb86fc;
}

/* Open modal button */
.open-modal-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);
  text-shadow: 1px 1px 3px #1e1e1e;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.open-modal-btn svg {
  filter: drop-shadow(0 0 4px #bb86fc);
}

.open-modal-btn:hover {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

/* Form inside modal */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Message */
.modal-message {
  margin-top: 1rem;
  color: #bb86fc;
  font-weight: 500;
}

/* Headings */
.titleContainer {
  width: 100vw;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff;
  margin-bottom: 5px;
  position: relative;
  padding: 1rem;
  transition: height 0.3s ease;
  overflow: hidden;
}

h1 {
  font-family: "hanged";
  font-size: 1.5rem;
  font-weight: 800;
  text-align: left;
  color: #bb86fc;
  letter-spacing: 0.5rem;
  text-shadow: 2px 2px 6px #7b3fcf; /* darker glow */
}

.coupleName {
  text-align: center;
  font-family: "hand";
  font-size: 2.5rem;
  color: #bb86fc;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  align-items: center;
}

/* File input styling matching the camera button */
input[type="file"] {
  padding: 10px;
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  color: #bb86fc;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  transform: rotate(0deg);
}

/* Hover effect */
input[type="file"]:hover {
  filter: brightness(1.2); /* slightly brighten on hover */
}

button {
  padding: 10px;
  color: #bb86fc;
  border: none;
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);
  text-shadow: 0 0 4px #bb86fc;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  transform: rotate(0deg);
}

/* Upload buttons container */
.upload-buttons {
  display: flex;
  flex-direction: column; /* stack buttons vertically */
  gap: 1.2rem; /* more space between buttons */
  width: 100%; /* take full width of modal */
  align-items: center; /* center buttons horizontally */
  margin-top: 1rem; /* optional extra space from top inputs */
}

/* Buttons styling */
.upload-buttons button {
  width: 80%; /* consistent width */
  max-width: 250px; /* prevent over-stretching on large screens */
  padding: 12px 0; /* vertical padding */
  display: flex;
  justify-content: center; /* center icon inside button */
  align-items: center;
  font-size: 1rem;
}

/* Make icons inside buttons scale nicely */
.upload-buttons button svg {
  width: 40px;
  height: 40px;
}

/* Submit button disabled state */
.submitButton:disabled {
  background-color: #444;
  cursor: not-allowed;
  opacity: 0.6;
}

#openCameraBtn {
  padding: 10px;
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);

  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.5);
  color: #bb86fc;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  transform: rotate(0deg);
}

#openFileBtn {
  padding: 10px;
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);

  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.5);
  color: #bb86fc;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  transform: rotate(0deg);
}

#openFileBtn svg {
  filter: drop-shadow(0 0 4px #bb86fc);
}

#openCameraBtn svg {
  filter: drop-shadow(0 0 4px #bb86fc);
}

.submitButton {
  padding: 10px;
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);

  .submitButton:disabled {
    background-color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
  }

  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.5);
  color: #bb86fc;
  text-shadow: 0 0 4px #bb86fc;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  transform: rotate(0deg);
}

.nav-toggle.clicked {
  transform: rotate(90deg);
}

/* Message */
#message {
  text-align: center;
  margin-bottom: 1rem;
  color: #bb86fc;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Masonry Gallery Grid */
.grid {
  column-count: 2;
  column-gap: 0.2rem;
  padding: 0.5rem;
}

@media (min-width: 640px) {
  .grid {
    column-count: 3;
  }
}

@media (min-width: 1024px) {
  .grid {
    column-count: 4;
  }
}

.grid img,
.grid video {
  width: 100%;
  display: block;
  margin-bottom: 0.2rem;
  border-radius: 12px;
  background-color: #1e1e1e;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s, box-shadow 0.2s;
}

.grid img:hover,
.grid video:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
}

.grid video {
  outline: none;
  border: 2px solid #333;
}

/* Responsive tweaks */
@media (max-width: 480px) {
  body {
    padding: 0rem;
  }

  h1 {
    padding-top: 15px;
    font-size: 2rem;
    text-align: center;
    text-shadow: 2px 2px 6px #7b3fcf; /* darker glow */
  }

  .titleContainer {
    padding: 5px;
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: space-around;
    position: relative;
  }

  .coupleName {
    color: #bb86fc;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  button {
    width: 100%;
  }
}

/* Navbar inside titleContainer */
.navbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: auto;
}

/* Burger toggle button */
.nav-toggle {
  display: none;
  font-size: 2.5rem;
  background: none;
  border: none;
  color: #bb86fc;
  cursor: pointer;
  transition: transform 0.3s;
}

/* Rotate burger when clicked */
.nav-toggle.clicked {
  transform: rotate(90deg);
}

/* Nav menu hidden by default */
.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Show menu when expanded */
.nav-menu.show {
  max-height: 200px;
  opacity: 1;
}

.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  display: block;
  text-align: center;
}

/* Responsive: show toggle on small screens */
@media (max-width: 600px) {
  .nav-toggle {
    display: block;
  }
}

.lightbox {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* semi-transparent dark background */
  justify-content: center;
  align-items: center;
  z-index: 9999; /* on top of everything */
  transition: background 0.3s ease;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  position: absolute; /* always absolute for sliding */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  cursor: grab;
  touch-action: pan-y; /* mobile swipe support */
}

.lightbox-img.transitioning {
  z-index: 3; /* above current image */
  opacity: 0;
  /* initial X offset will be set dynamically via JS */
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10000;
}

.lightbox-close:hover {
  color: #bb86fc;
}

/* Navigation arrows */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
  padding: 10px 20px;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 0.7;
  z-index: 10000;
}

.lightbox-arrow,
.lightbox-close {
  transition: opacity 0.3s ease, color 0.3s ease;
}

.lightbox-arrow:hover {
  color: #bb86fc;
  opacity: 1;
}

.lightbox-arrow.left {
  left: 30px;
}

.lightbox-arrow.right {
  right: 30px;
}

/* Optional: fade-in of arrows when hovering the lightbox */
.lightbox:hover .lightbox-arrow {
  opacity: 1;
}

/* Touch-friendly tweak: slightly larger hit area on mobile */
@media (max-width: 768px) {
  .lightbox-arrow {
    font-size: 2.5rem;
    padding: 15px;
  }

  .lightbox-close {
    font-size: 2.5rem;
    right: 20px;
    top: 15px;
  }
}

/* Splash overlay */

#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgb(37, 37, 37) 0%, rgb(14, 14, 14) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Individual letter swing animation + fade-in */
.splash-letter {
  display: inline-block;
  transform-origin: top center;
  opacity: 0; /* start hidden */
  animation: fadeIn 0.5s forwards ease-out,
    swing 1s infinite alternate ease-in-out;
}

/* Add slight delays to letters for wave effect and fade-in */
.splash-letter:nth-child(1) {
  animation-delay: 0s, 0s;
}
.splash-letter:nth-child(2) {
  animation-delay: 0.05s, 0.05s;
}
.splash-letter:nth-child(3) {
  animation-delay: 0.1s, 0.1s;
}
.splash-letter:nth-child(4) {
  animation-delay: 0.15s, 0.15s;
}
.splash-letter:nth-child(5) {
  animation-delay: 0.2s, 0.2s;
}
.splash-letter:nth-child(6) {
  animation-delay: 0.25s, 0.25s;
}
.splash-letter:nth-child(7) {
  animation-delay: 0.3s, 0.3s;
}
.splash-letter:nth-child(8) {
  animation-delay: 0.35s, 0.35s;
}
.splash-letter:nth-child(9) {
  animation-delay: 0.4s, 0.4s;
}
.splash-letter:nth-child(10) {
  animation-delay: 0.45s, 0.45s;
}
.splash-letter:nth-child(11) {
  animation-delay: 0.5s, 0.5s;
}

/* Fade-in animation */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Swing animation */
@keyframes swing {
  0% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(-5deg);
  }
}

.camera-container video,
.camera-container canvas {
  width: 100%;
  border-radius: 12px;
}
.camera-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.modal.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.camera-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#cameraFeedFull,
#overlayCanvasFull {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-ui {
  position: absolute;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  z-index: 10;
}

.filter-selector {
  position: absolute;
  bottom: 70px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 0;
  z-index: 10;
}

.filter-selector button {
  color: white;
  background: none;
  border: 1px solid white;
  border-radius: 8px;
  padding: 5px 10px;
}
