/* base.css — reset, vars, shared layout (top buttons, name banner, background, page title) */

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

:root {
  --theme-color: #00f0ff;
  --theme-bg: rgba(0,20,60,0.95);
  --theme-bg-light: rgba(0,20,60,0.9);
  --theme-glow: rgba(0,240,255,0.4);
  --title-color: #ffffff;
  --title-font: 'Arial', sans-serif;
}

html {
  height: 100%;
  background: #0a0a1a; /* canvas fallback only */
}

body {
  height: 100%;
  font-family: 'Arial', sans-serif;
  color: #fff;
  background: transparent; /* must be transparent so .background-img (z-index:-1) shows through */
  overflow: hidden;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }

/* Background layer */
.background-img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  display: block;
}

/* Page title */
.page-title {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0) + 4%);
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: bold;
  color: var(--title-color, #fff);
  font-family: var(--title-font, Arial);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  text-align: center;
  z-index: 10;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offline-text {
  color: #ff3333;
  animation: shadowFlash 2s ease-in-out infinite;
}

@keyframes shadowFlash {
  0%,100% { text-shadow: 0 0 10px rgba(255,0,0,0.3), 0 0 20px rgba(255,0,0,0.2); }
  50%     { text-shadow: 0 0 40px rgba(255,0,0,0.9), 0 0 80px rgba(255,0,0,0.6); }
}

@media (max-width: 768px) {
  .page-title { font-size: clamp(1.4rem, 8vw, 2.6rem); }
}

/* DJ overlay image (per-page accent) */
.overlay-img {
  position: absolute;
  width: auto;
  height: 25vh;
  max-height: 200px;
  z-index: 5;
  opacity: 0.95;
  pointer-events: none;
}

.ginger-overlay {
  bottom: 80px; left: 20px;
  animation: pulse 2s ease-in-out infinite;
}
.hubby-overlay {
  right: 0; top: 50%;
  height: 60vh; max-height: 500px;
  transform: translateY(-50%);
  animation: pulseHubby 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 10px var(--theme-glow)); }
  50%     { transform: scale(1.07); filter: drop-shadow(0 0 25px var(--theme-color)); }
}
@keyframes pulseHubby {
  0%,100% { transform: translateY(-50%) scale(1); filter: drop-shadow(0 0 10px var(--theme-glow)); }
  50%     { transform: translateY(-50%) scale(1.05); filter: drop-shadow(0 0 25px var(--theme-color)); }
}
@media (max-width: 768px) {
  .overlay-img {
    left: 50%; right: auto;
    transform: translateX(-50%);
    bottom: 180px; top: auto;
    height: 22vh;
  }
  .hubby-overlay { transform: translateX(-50%); animation: pulse 2s ease-in-out infinite; }
}

/* Top-left button cluster */
.top-buttons {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0) + 12px);
  left: calc(env(safe-area-inset-left, 0) + 12px);
  display: flex;
  gap: 8px;
  z-index: 10000;
}
.top-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 18px;
  background: var(--ui-bg, rgba(0, 20, 60, 0.85));
  color: #fff;
  border: 1.5px solid var(--theme-color);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform .15s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.top-btn:hover { background: rgba(0, 240, 255, 0.18); transform: translateY(-1px); }
.top-btn:active { transform: translateY(0); }
.top-btn .icon { font-size: 14px; }
/* Icon-only button (admin) — square pill */
.top-btn--icon { padding: 0; width: 36px; justify-content: center; }

/* Name banner (top-right) */
.name-banner {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0) + 12px);
  right: calc(env(safe-area-inset-right, 0) + 12px);
  z-index: 10000;
  background: var(--ui-bg, rgba(0, 20, 60, 0.75));
  border: 1px solid var(--theme-color);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: #fff;
  backdrop-filter: blur(10px);
  cursor: pointer;
  user-select: none;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.name-banner small { opacity: 0.7; margin-right: 4px; }
.name-banner strong { color: var(--theme-color); font-weight: 700; }

/* First-visit name modal */
.name-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 20000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.name-modal {
  width: min(420px, 96vw);
  background: rgba(0, 15, 40, 0.98);
  border: 2px solid var(--theme-color);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 16px 60px rgba(0,240,255,0.3);
  text-align: center;
}
.name-modal h2 {
  color: var(--theme-color);
  margin-bottom: 8px;
  font-size: 1.6rem;
  text-shadow: 0 0 12px rgba(0,240,255,0.4);
}
.name-modal p { opacity: 0.85; font-size: 14px; margin-bottom: 18px; }
.name-modal input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(0,240,255,0.5);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 16px;
  outline: none;
  margin-bottom: 14px;
}
.name-modal input:focus { border-color: var(--theme-color); box-shadow: 0 0 0 3px rgba(0,240,255,0.2); }
.name-modal button {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(45deg, #00f0ff, #4a90ff);
  color: #001122;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.name-modal button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Nav removed from visual layout (kept in DOM for history). Hide by default. */
nav { display: none; }

/* Hide top buttons on mobile */
@media (max-width: 768px) {
  .top-buttons { display: none; }
}
