/* styles.css */
:root {
  --bg: #020617;
  --bg-soft: #0b1220;
  --accent: #eab308;
  --accent-soft: rgba(234, 179, 8, 0.15);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --card-bg: #020617;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #020617, #000000 60%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header / nav */

header {
  padding: 0.85rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.7),
    transparent
  );
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

header .logo-pill {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0%, #facc15, #a16207);
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.6);
  font-size: 20px;
}

header h1 {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

header h1 span {
  color: var(--accent);
}

header .tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 0.8rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.nav-links a {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  border-color: var(--border-subtle);
  background: rgba(15, 23, 42, 0.8);
}

.nav-links a.active {
  border-color: rgba(234, 179, 8, 0.7);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Map container */

main {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

#map {
  flex: 1;
  height: calc(100vh - 64px);
  z-index: 1;
}

/* Mug icon used by Leaflet markers */
.mug-icon {
  font-size: 1.7rem;
  line-height: 1;
  text-align: center;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0%, #facc15, #a16207);
  color: #111827;
  box-shadow:
    0 0 14px rgba(15, 23, 42, 0.9),
    0 0 24px rgba(234, 179, 8, 0.7);
  border: 2px solid rgba(15, 23, 42, 0.9);
  transform: translateY(-4px);
}

/* Simple container layout */

.main-container {
  max-width: 1100px;
  margin: 1.4rem auto;
  padding: 0 1.4rem 2rem;
}

/* Generic card */

.card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 1.2rem;
  border: 1px solid var(--border-subtle);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65);
}

/* Modern, simple gallery */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 0.85rem;
  overflow: hidden;
  background: radial-gradient(circle at 30% 0%, #1f2937, #020617);
  border: 1px solid rgba(148, 163, 184, 0.6);
  cursor: pointer;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1.06);
}

.gallery-item-info {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #e5e7eb;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
}

.gallery-item-tag {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.85);
}

/* Like button */

.like-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.9);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  background: rgba(15, 23, 42, 0.92);
  color: var(--text-muted);
  cursor: pointer;
}

.like-btn span.heart {
  font-size: 0.9rem;
}

.like-btn.liked {
  color: #fecaca;
  border-color: #f97373;
  background: rgba(127, 29, 29, 0.6);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  display: none;
  z-index: 2000;
}

.lightbox.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-inner {
  max-width: 960px;
  width: 100%;
  padding: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: center;
}

.lightbox-img-wrapper {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #020617;
}

.lightbox-img-wrapper img {
  display: block;
  width: 100%;
  height: min(70vh, 520px);
  object-fit: cover;
}

.lightbox-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lightbox-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.lightbox-subtitle {
  font-size: 0.85rem;
}

.lightbox-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.chip {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
}

.lightbox-controls {
  position: absolute;
  inset: 0.8rem;
  pointer-events: none;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 1.3rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-btn:hover {
  background: rgba(15, 23, 42, 1);
}

.lightbox-prev {
  left: 0.8rem;
}

.lightbox-next {
  right: 0.8rem;
}

.lightbox-close {
  top: 3.0rem; 
  right: 0.8rem;
  transform: none;
}

/* New Mug Mapper header + mobile nav */

.mm-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.85)
  );
  border-bottom: 1px solid var(--border-subtle);
  z-index: 9999;
  backdrop-filter: blur(10px);
}

.mm-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mm-emoji {
  font-size: 1.2rem;
}

.mm-title {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mm-title::first-letter {
  color: var(--accent);
}

.mm-hamburger {
  font-size: 1.4rem;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

/* Fullscreen overlay nav */

.mm-nav-overlay {
  position: fixed;
  /*inset: 0;*/
  top: 58px; /* exact header height */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.96);
  display: none;
  z-index: 9998;
}

.mm-nav-content {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.8rem 1.4rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mm-nav-close {
  position: absolute;
  top: 0px;
  right: 18px;
  background: transparent;
  border: none;
  color: #f9fafb;
  font-size: 28px;
  cursor: pointer;
}

.mm-nav-link {
  padding: 0.6rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 0.9rem;
}

.mm-nav-link:hover {
  border-color: var(--border-subtle);
  background: rgba(15, 23, 42, 1);
}

/* Auth section in menu */

.mm-auth-section {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.mm-auth-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.mm-auth-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.mm-auth-btn {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #020617;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
}

.mm-auth-btn + .mm-auth-btn {
  margin-top: 0.25rem;
}

.mm-google-btn {
  border-color: #facc15;
}

.mm-logout-btn {
  border-color: #f97316;
}

/* Desktop: you can optionally hide the overlay until clicked */
@media (min-width: 900px) {
  .mm-nav-content {
    max-width: 360px;
  }
}
