:root {
  --pink:   #FF006E;
  --yellow: #FFE600;
  --cyan:   #00EAFF;
  --green:  #39FF14;
  --bg:     #07000F;
  --panel-bg: rgba(7, 0, 15, 0.94);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  font-family: 'Press Start 2P', monospace;
  color: #fff;
}

/* ── Camera frame ────────────────────────────────────── */

#camera-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
  pointer-events: none;
}

/* ── Vote overlay ────────────────────────────────────── */

#vote-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  background: var(--panel-bg);
  border: 2px solid var(--pink);
  box-shadow:
    0 0 0 1px var(--bg),
    0 0 0 3px var(--pink),
    0 0 28px rgba(255, 0, 110, 0.55),
    0 0 56px rgba(255, 0, 110, 0.2),
    inset 0 0 28px rgba(255, 0, 110, 0.06);
  padding: 14px 28px 18px;
  max-width: min(700px, calc(100vw - 40px));
}

#site-label {
  font-size: 0.4rem;
  color: var(--green);
  text-shadow: 0 0 8px var(--green), 0 0 18px var(--green);
  letter-spacing: 0.45em;
  margin-bottom: 12px;
}

#vote-prompt {
  font-size: 0.7rem;
  line-height: 2;
  color: var(--yellow);
  text-shadow: 0 0 10px var(--yellow), 0 0 22px rgba(255, 230, 0, 0.45);
  margin-bottom: 10px;
}

#countdown {
  font-size: 1.2rem;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan), 0 0 26px rgba(0, 234, 255, 0.5);
  letter-spacing: 0.15em;
}

/* ── Chat toggle button ──────────────────────────────── */

#chat-toggle {
  position: fixed;
  bottom: 28px;
  right: 20px;
  z-index: 20;
  background: var(--bg);
  color: var(--pink);
  border: 2px solid var(--pink);
  box-shadow:
    0 0 14px rgba(255, 0, 110, 0.6),
    0 0 28px rgba(255, 0, 110, 0.25),
    inset 0 0 10px rgba(255, 0, 110, 0.08);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  padding: 12px 18px;
  cursor: pointer;
  letter-spacing: 0.15em;
  transition: background 0.15s, box-shadow 0.15s;
}

#chat-toggle:hover {
  background: rgba(255, 0, 110, 0.14);
  box-shadow:
    0 0 22px rgba(255, 0, 110, 0.8),
    0 0 44px rgba(255, 0, 110, 0.4),
    inset 0 0 16px rgba(255, 0, 110, 0.15);
}

#chat-toggle.hidden {
  display: none;
}

/* ── Chat panel ──────────────────────────────────────── */

#chat-panel {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100%;
  z-index: 15;
  background: var(--panel-bg);
  border-left: 2px solid var(--pink);
  box-shadow: -6px 0 40px rgba(255, 0, 110, 0.4);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#chat-panel.open {
  right: 0;
}

#chat-header {
  background: linear-gradient(90deg, var(--pink), #FF4500, var(--yellow));
  color: #000;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

#chat-close {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.4);
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  padding: 5px 8px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
}

#chat-close:hover {
  background: rgba(0, 0, 0, 0.35);
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--pink) transparent;
}

#chat-messages::-webkit-scrollbar {
  width: 3px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: var(--pink);
}

.chat-msg {
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
  word-break: break-word;
}

.chat-user {
  color: var(--cyan);
}

.chat-system {
  color: var(--yellow);
  opacity: 0.8;
  font-style: italic;
}

#chat-input-area {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid rgba(255, 0, 110, 0.25);
  flex-shrink: 0;
}

#chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 0, 110, 0.5);
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#chat-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 8px rgba(255, 230, 0, 0.35);
}

#chat-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

#chat-send {
  background: var(--pink);
  color: #000;
  border: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.45rem;
  padding: 8px 12px;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: background 0.15s;
}

#chat-send:hover {
  background: var(--yellow);
}

/* ── Location overlay ────────────────────────────────── */

#location-overlay {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  background: var(--panel-bg);
  border: 2px solid var(--cyan);
  box-shadow:
    0 0 0 1px var(--bg),
    0 0 0 3px var(--cyan),
    0 0 28px rgba(0, 234, 255, 0.4),
    0 0 56px rgba(0, 234, 255, 0.15),
    inset 0 0 20px rgba(0, 234, 255, 0.04);
  padding: 10px 16px 12px;
  max-width: 280px;
  pointer-events: none;
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
}

#location-overlay.visible {
  transform: translateY(0);
  opacity: 1;
}

#loc-name {
  font-size: 0.45rem;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan), 0 0 18px rgba(0, 234, 255, 0.45);
  letter-spacing: 0.1em;
  line-height: 1.8;
  margin-bottom: 4px;
}

#loc-time {
  font-family: 'VT323', monospace;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

#loc-weather {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(255, 230, 0, 0.4);
  line-height: 1.3;
}
