/* ===== Base ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

a {
  color: #fff;
}

#main {
  width: 100%;
}

.d-none {
  display: none !important;
}

/* ===== Password gate ===== */
#password-box {
  text-align: center;
  margin-top: min(150px, 25vh);
  padding: 0 16px;
}

#password-box p {
  font-size: 20px;
}

#password-box input {
  padding: 12px;
  font-size: 16px; /* 16px+ prevents iOS auto-zoom on focus */
  text-align: center;
  width: min(260px, 80vw);
  border-radius: 8px;
  border: 1px solid #555;
}

#password-box button {
  padding: 12px 32px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  border: none;
}

#password-error {
  display: none;
  color: pink;
  margin-top: 10px;
}

/* Fade-out used when the password is accepted */
#password-box.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* ===== Welcome page ===== */
.title {
  text-align: center;
  font-size: clamp(28px, 8vw, 40px);
  margin: 30px 16px 20px;
  color: #fff;
}

.counter {
  padding: 30px 16px;
  text-align: center;
}

.time {
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  color: #fff;
}

/* Collage – phone first */
.collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 16px;
  max-width: 100%;
}

.collage img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.collage img:hover {
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .collage {
    gap: 60px;
    padding: 20px 25px;
    max-width: 1100px;
    margin: 0 auto;
  }

  .collage img {
    height: 300px;
  }
}

/* bottom space so the menu bar doesn't cover the last content */
#welcome {
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* ===== Photo upload (shown only when server.js is running) ===== */
#upload-box {
  text-align: center;
  padding: 10px 16px;
}

#upload-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 16px;
  color: #fff;
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  cursor: pointer;
}

#upload-status {
  color: #e8a94a;
  min-height: 1.2em;
  margin: 10px 0 0;
}

/* ===== Bottom bar (injected by js/menu.js) ===== */
#bottom-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

#menu-btn,
#places-btn {
  color: #fff;
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#menu-btn {
  padding: 12px 28px;
  font-size: 17px;
  font-family: inherit;
}

/* round map-pin button that opens our-places.html */
#places-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  text-decoration: none;
}

#places-btn.current {
  color: #e8a94a;
  border-color: rgba(232, 169, 74, 0.6);
}

/* ===== Bottom-sheet menu ===== */
#offcanvas {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.35s ease;
  z-index: 1002;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
}

/* drag-handle bar at the top of the sheet */
#offcanvas::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #ccc;
  margin: 0 auto 12px;
}

#offcanvas.active {
  transform: translateY(0);
}

#offcanvas ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#offcanvas li + li {
  border-top: 1px solid #eee;
}

#offcanvas a {
  display: block;
  padding: 16px 8px;
  text-decoration: none;
  font-size: 20px;
  color: #222;
  text-align: center;
}

#offcanvas a.current {
  font-weight: bold;
  color: #b30000;
}

/* ===== Overlay ===== */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 1001;
}

#overlay.active {
  opacity: 1;
  pointer-events: all;
}
