/* ─────────────────────────────────────────────
   Patron View — Vanessa App
   Dark theme; centered stoplight; no browser chrome.
   ───────────────────────────────────────────── */

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

html, body {
  height: 100%;
  overflow: hidden;           /* no scroll — native app feel */
  background: #0f0f0f;
  color: #f0f0f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-user-select: none;  /* no text selection */
  user-select: none;
}

/* Disable right-click context menu via JS in patron.js,
   but also visually indicate nothing is selectable here. */

/* ── Layout ─────────────────────────────────── */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 16px;
}

/* ── Tagline ─────────────────────────────────── */
.tagline {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
}

/* ── Logo ────────────────────────────────────── */
.logo {
  max-width: 200px;
  width: 60vw;
  object-fit: contain;
}

/* ── Stoplight housing ───────────────────────── */
.stoplight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: linear-gradient(to bottom, #272727 0%, #181818 100%);
  border: 2px solid #2a2a2a;
  border-top-color: #3e3e3e;
  border-bottom-color: #111;
  border-radius: 60px;
  padding: 24px 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.04);
}

/* ── Individual bulbs ────────────────────────── */
.bulb {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  /* recessed look when inactive */
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* Inactive — lens gradient: faint highlight spot simulates glass surface */
.bulb.red {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.10) 0%, transparent 55%),
    #3d1010;
}
.bulb.yellow {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.10) 0%, transparent 55%),
    #3d2e08;
}
.bulb.green {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.10) 0%, transparent 55%),
    #0a2e12;
}

/* ── Pulse animation ─────────────────────────── */
/* Plays once when the active class is first added. */
/* The bulb pops to a brighter glow then settles.  */
@keyframes bulb-pulse {
  0%   { transform: scale(1);    filter: brightness(1);   }
  35%  { transform: scale(1.1);  filter: brightness(1.4); }
  100% { transform: scale(1);    filter: brightness(1);   }
}

/* ── Active / glowing states ─────────────────── */
/* These classes are toggled by patron.js           */

.bulb.red.active {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25) 0%, transparent 50%),
    #ff3b30;
  box-shadow:
    0 0 10px 4px  rgba(255, 59, 48, 0.95),
    0 0 45px 18px rgba(255, 59, 48, 0.35),
    inset 0 4px 10px rgba(255, 255, 255, 0.15);
  animation: bulb-pulse 0.55s ease-out;
}

.bulb.yellow.active {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25) 0%, transparent 50%),
    #ffcc00;
  box-shadow:
    0 0 10px 4px  rgba(255, 204, 0, 0.95),
    0 0 45px 18px rgba(255, 204, 0, 0.35),
    inset 0 4px 10px rgba(255, 255, 255, 0.15);
  animation: bulb-pulse 0.55s ease-out;
}

.bulb.green.active {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25) 0%, transparent 50%),
    #34c759;
  box-shadow:
    0 0 10px 4px  rgba(52, 199, 89, 0.95),
    0 0 45px 18px rgba(52, 199, 89, 0.35),
    inset 0 4px 10px rgba(255, 255, 255, 0.15);
  animation: bulb-pulse 0.55s ease-out;
}

/* ── Status text ─────────────────────────────── */
.status-text {
  font-size: clamp(1rem, 4vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  color: #d0d0d0;
  min-height: 1.6em;   /* prevents layout shift while loading */
  transition: color 0.4s ease;
}
