/* Voice Club tech system theme: cyber-security glass over a living circuit mirror.
   Loaded last so it restyles the base glass design without touching layout. */

:root {
  --tech-bg-0: #010806;
  --tech-bg-1: #02120d;
  --tech-bg-2: #03241b;
  --tech-green: #2bff9e;
  --tech-green-dim: rgba(43, 255, 158, .55);
  --tech-cyan: #39e6ff;
  --tech-cyan-dim: rgba(57, 230, 255, .45);
  --tech-text: #eafff4;
  --tech-muted: #8fe6c4;
  --tech-glass: rgba(240, 255, 248, .07);
  --tech-glass-strong: rgba(240, 255, 248, .12);
  --tech-line: rgba(43, 255, 158, .38);
  --tech-line-soft: rgba(43, 255, 158, .18);
  --tech-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

body {
  background:
    radial-gradient(circle at 15% -5%, rgba(43, 255, 158, .16), transparent 34%),
    radial-gradient(circle at 88% 4%, rgba(57, 230, 255, .14), transparent 30%),
    linear-gradient(180deg, var(--tech-bg-2) 0%, var(--tech-bg-1) 46%, var(--tech-bg-0) 100%);
  color: var(--tech-text);
}

/* Circuit grid drifting under everything */
.mirror-bg {
  background:
    radial-gradient(circle at 18% 6%, rgba(43, 255, 158, .22), transparent 30%),
    radial-gradient(circle at 84% 10%, rgba(57, 230, 255, .18), transparent 28%),
    radial-gradient(circle at 50% 42%, rgba(43, 255, 158, .08), transparent 46%),
    linear-gradient(180deg, var(--tech-bg-2) 0%, var(--tech-bg-1) 48%, var(--tech-bg-0) 100%);
}

.mirror-bg::before {
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(43, 255, 158, .07) 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(43, 255, 158, .07) 40px),
    radial-gradient(circle at 22% 20%, rgba(43, 255, 158, .5) 0 2px, transparent 3px),
    radial-gradient(circle at 76% 14%, rgba(57, 230, 255, .5) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 30%, rgba(43, 255, 158, .4) 0 2px, transparent 3px);
  animation: tech-grid-drift 24s linear infinite;
}

/* Mirror floor with perspective circuit lines */
.mirror-bg::after {
  background:
    linear-gradient(180deg, rgba(43, 255, 158, .20), rgba(43, 255, 158, .02)),
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(43, 255, 158, .16) 75px 76px),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(57, 230, 255, .10) 35px 36px);
  box-shadow: 0 -22px 70px rgba(43, 255, 158, .18) inset;
  transform: perspective(420px) rotateX(38deg);
  transform-origin: bottom;
}

@keyframes tech-grid-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 0 80px, 80px 0, 0 0, 0 0, 0 0; }
}

/* Scanline sweep across the whole shell */
.shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* White glass tech panels with HUD corner brackets */
.glass,
.card,
.topbar,
.side-menu,
.seat,
.member,
.profile-modal-card,
.call-modal-card {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .13), rgba(220, 255, 240, .05) 55%, rgba(43, 255, 158, .05)),
    linear-gradient(180deg, rgba(43, 255, 158, .05), transparent);
  border: 1px solid var(--tech-line);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, .5),
    0 0 22px rgba(43, 255, 158, .10),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
}

.card,
.screen-room,
.profile-modal-card,
.call-modal-card {
  position: relative;
}

.card::before,
.screen-room::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  border-top: 2px solid var(--tech-green);
  border-left: 2px solid var(--tech-green);
  border-top-left-radius: 6px;
  pointer-events: none;
  opacity: .85;
}

.card::after,
.screen-room::after {
  content: "";
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-bottom: 2px solid var(--tech-cyan);
  border-right: 2px solid var(--tech-cyan);
  border-bottom-right-radius: 6px;
  pointer-events: none;
  opacity: .85;
}

/* Brand + headings in tech voice */
.brand strong {
  letter-spacing: .14em;
  text-shadow: 0 0 14px rgba(43, 255, 158, .55);
}

.brand-mark {
  background: linear-gradient(145deg, var(--tech-green), var(--tech-cyan));
  color: #02120d;
  box-shadow: 0 0 24px rgba(43, 255, 158, .5);
  cursor: pointer;
}

h1, h2, h3, .section-head h2 {
  letter-spacing: .06em;
  text-shadow: 0 0 12px rgba(43, 255, 158, .35);
}

#liveStatus {
  color: var(--tech-green);
  font-family: var(--tech-mono);
  text-transform: uppercase;
  letter-spacing: .18em;
}

/* Member IDs and meta read like terminal readouts */
.member small,
.room-member small,
.seat small,
#roomMeta {
  font-family: var(--tech-mono);
  color: var(--tech-muted);
  letter-spacing: .03em;
}

.presence-dot.online {
  background: var(--tech-green);
  box-shadow: 0 0 10px var(--tech-green), 0 0 3px var(--tech-green);
}

/* Neon controls */
button.primary,
.primary {
  background: linear-gradient(145deg, var(--tech-green), var(--tech-cyan));
  color: #02120d;
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 0 20px rgba(43, 255, 158, .35);
  font-weight: 700;
}

button.ghost,
.ghost {
  background: rgba(43, 255, 158, .06);
  border: 1px solid var(--tech-line);
  color: var(--tech-text);
}

button:active {
  transform: scale(.97);
  box-shadow: 0 0 26px rgba(43, 255, 158, .55);
}

input,
select,
textarea {
  background: rgba(1, 10, 7, .72);
  border: 1px solid var(--tech-line-soft);
  color: var(--tech-text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--tech-green);
  box-shadow: 0 0 0 2px rgba(43, 255, 158, .25), 0 0 18px rgba(43, 255, 158, .3);
  outline: none;
}

/* Seats: separate tech pods, speaking pod pulses green */
.seat {
  border-radius: 22px;
  transition: box-shadow .25s ease, transform .25s ease;
}

.seat img {
  border: 2px solid var(--tech-cyan-dim);
  box-shadow: 0 0 16px rgba(57, 230, 255, .3);
}

.seat.speaking {
  border-color: var(--tech-green);
  box-shadow: 0 0 30px rgba(43, 255, 158, .55), inset 0 0 18px rgba(43, 255, 158, .18);
  animation: tech-seat-pulse 1s ease-in-out infinite;
}

@keyframes tech-seat-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.seat[data-seat] {
  border-style: dashed;
  border-color: var(--tech-line-soft);
  color: var(--tech-muted);
}

/* Bottom phone nav as a tech dock */
.phone-nav {
  background: rgba(2, 18, 13, .82);
  border-top: 1px solid var(--tech-line);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .55), 0 0 24px rgba(43, 255, 158, .12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.phone-nav button.active {
  background: linear-gradient(145deg, var(--tech-green), var(--tech-cyan));
  color: #02120d;
  box-shadow: 0 0 18px rgba(43, 255, 158, .45);
}

/* Call + toast states */
.active-call-bar {
  border: 1px solid var(--tech-green);
  box-shadow: 0 0 26px rgba(43, 255, 158, .4);
}

.toast {
  border: 1px solid var(--tech-line);
  background: rgba(2, 18, 13, .92);
  box-shadow: 0 0 22px rgba(43, 255, 158, .25);
}

/* Slim tech scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(43, 255, 158, .45); border-radius: 3px; }
::-webkit-scrollbar-track { background: rgba(43, 255, 158, .06); }

@media (prefers-reduced-motion: reduce) {
  .mirror-bg::before,
  .seat.speaking { animation: none; }
}

/* ===== Tech growth layer: the system feels alive ===== */

.tech-fx-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
}

/* Aurora light breathing over the circuit mirror */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 26% at 22% 12%, rgba(43, 255, 158, .16), transparent 70%),
    radial-gradient(ellipse 38% 24% at 80% 20%, rgba(57, 230, 255, .13), transparent 70%),
    radial-gradient(ellipse 30% 20% at 55% 78%, rgba(43, 255, 158, .08), transparent 70%);
  animation: tech-aurora 16s ease-in-out infinite alternate;
}

@keyframes tech-aurora {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); opacity: .8; }
  to { transform: translate3d(1.5%, 1.5%, 0) scale(1.06); opacity: 1; }
}

/* Live system status strip under the topbar */
.tech-statusbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -6px 2px 14px;
  padding: 9px 16px;
  border: 1px solid var(--tech-line-soft);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(43, 255, 158, .10), rgba(57, 230, 255, .05), rgba(43, 255, 158, .10));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 18px rgba(43, 255, 158, .10);
  font-family: var(--tech-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--tech-muted);
  white-space: nowrap;
  overflow: hidden;
}

.tech-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tech-green);
  box-shadow: 0 0 12px var(--tech-green);
  animation: tech-dot-pulse 1.6s ease-in-out infinite;
  flex: none;
}

@keyframes tech-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: .65; }
}

.tech-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
  margin-left: auto;
}

.tech-eq i {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--tech-cyan), var(--tech-green));
  animation: tech-eq-bounce .9s ease-in-out infinite;
}

.tech-eq i:nth-child(1) { height: 55%; animation-delay: 0s; }
.tech-eq i:nth-child(2) { height: 90%; animation-delay: .15s; }
.tech-eq i:nth-child(3) { height: 65%; animation-delay: .3s; }
.tech-eq i:nth-child(4) { height: 100%; animation-delay: .45s; }
.tech-eq i:nth-child(5) { height: 45%; animation-delay: .6s; }

@keyframes tech-eq-bounce {
  0%, 100% { transform: scaleY(.45); }
  50% { transform: scaleY(1); }
}

.tech-status-code { color: var(--tech-cyan); }

/* Topbar light sweep */
.topbar { overflow: hidden; }
.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
  animation: tech-sweep 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tech-sweep {
  0%, 55% { left: -120px; }
  85%, 100% { left: calc(100% + 40px); }
}

/* Headings get a tech underline */
.screen > h2::after,
.section-head h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 7px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--tech-green), var(--tech-cyan), transparent);
  box-shadow: 0 0 12px rgba(43, 255, 158, .5);
}

.section-head h2::after { margin-top: 5px; }

/* Member cards: neon edge + sheen on touch */
.member {
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 3px 0 0 var(--tech-green),
    0 14px 40px rgba(0, 0, 0, .45),
    0 0 18px rgba(43, 255, 158, .08);
}

.member::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;
  left: -110px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .13), transparent);
  transition: left .7s ease;
  pointer-events: none;
}

.member:hover::after,
.member:active::after { left: calc(100% + 30px); }

.member img {
  border: 2px solid var(--tech-cyan-dim);
  box-shadow: 0 0 16px rgba(57, 230, 255, .3);
}

/* Buttons: living gradient + shine */
button.primary,
.primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--tech-green), var(--tech-cyan), var(--tech-green));
  background-size: 200% 100%;
  animation: tech-btn-flow 5s ease-in-out infinite;
}

@keyframes tech-btn-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

button.primary::after,
.primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 46px;
  left: -70px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transition: left .55s ease;
  pointer-events: none;
}

button.primary:hover::after,
button.primary:active::after,
.primary:hover::after,
.primary:active::after { left: calc(100% + 20px); }

/* Room voice core: rotating hologram rings + radar sweep */
.room-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  margin: 6px auto 18px;
  text-align: center;
}

.room-core-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0 18%, rgba(43, 255, 158, .55) 26%, transparent 38%, transparent 55%, rgba(57, 230, 255, .5) 64%, transparent 76%);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 59%, #000 72%, transparent 73%);
  mask: radial-gradient(circle, transparent 58%, #000 59%, #000 72%, transparent 73%);
  animation: tech-core-spin 9s linear infinite;
}

.room-core::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(43, 255, 158, .45);
  animation: tech-core-spin-rev 14s linear infinite;
}

.room-core::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(43, 255, 158, .28), transparent 24%);
  animation: tech-core-spin 3.2s linear infinite;
}

.room-core strong {
  position: relative;
  z-index: 1;
  font-size: 14px;
  letter-spacing: .22em;
  text-shadow: 0 0 14px rgba(43, 255, 158, .7);
}

.room-core small {
  position: relative;
  z-index: 1;
  font-family: var(--tech-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--tech-muted);
}

@keyframes tech-core-spin { to { transform: rotate(360deg); } }
@keyframes tech-core-spin-rev { to { transform: rotate(-360deg); } }

/* Seat pods: number chip, spinning avatar ring, voice meter */
.seat {
  position: relative;
  overflow: hidden;
}

.seat::before {
  content: "";
  position: absolute;
  inset: auto -30% -55% -30%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(43, 255, 158, .16), transparent 70%);
  pointer-events: none;
}

.seat-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 7px;
  border: 1px solid var(--tech-line-soft);
  border-radius: 999px;
  background: rgba(1, 10, 7, .65);
  font-family: var(--tech-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--tech-cyan);
}

@property --tech-ring-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.seat img {
  padding: 3px;
  background: conic-gradient(from var(--tech-ring-angle), var(--tech-green), var(--tech-cyan), transparent 55%, var(--tech-green));
  animation: tech-ring-rotate 7s linear infinite;
}

.seat.speaking img { animation-duration: 1.6s; }

@keyframes tech-ring-rotate { to { --tech-ring-angle: 360deg; } }

.voice-meter {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 16px;
  margin-top: 7px;
  opacity: .35;
}

.voice-meter i {
  width: 4px;
  height: 22%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--tech-cyan), var(--tech-green));
}

.seat.speaking .voice-meter { opacity: 1; }
.seat.speaking .voice-meter i { animation: tech-meter .55s ease-in-out infinite; }
.seat.speaking .voice-meter i:nth-child(2) { animation-delay: .09s; }
.seat.speaking .voice-meter i:nth-child(3) { animation-delay: .18s; }
.seat.speaking .voice-meter i:nth-child(4) { animation-delay: .27s; }
.seat.speaking .voice-meter i:nth-child(5) { animation-delay: .36s; }

@keyframes tech-meter {
  0%, 100% { height: 22%; }
  50% { height: 100%; }
}

.seat.empty .plus {
  border: 1px dashed var(--tech-line);
  color: var(--tech-green);
  text-shadow: 0 0 12px rgba(43, 255, 158, .6);
}

/* Gift cards: premium hologram glow */
.gift {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 209, 102, .4);
  box-shadow: 0 0 20px rgba(255, 209, 102, .12), inset 0 1px 0 rgba(255, 255, 255, .15);
}

.gift::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  left: -70px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  transition: left .6s ease;
  pointer-events: none;
}

.gift:hover::after,
.gift:active::after { left: calc(100% + 20px); }

/* Phone dock: active tab light bar */
.phone-nav button { position: relative; }
.phone-nav button.active::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 22%;
  right: 22%;
  height: 3px;
  border-radius: 2px;
  background: var(--tech-green);
  box-shadow: 0 0 12px var(--tech-green);
}

/* Inputs: corner-lit tech fields */
input,
select,
textarea {
  background:
    linear-gradient(90deg, rgba(43, 255, 158, .14), transparent 14px),
    rgba(1, 10, 7, .72);
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .tech-status-dot,
  .tech-eq i,
  .topbar::after,
  button.primary,
  .primary,
  .room-core-ring,
  .room-core::before,
  .room-core::after,
  .seat img,
  .seat.speaking .voice-meter i { animation: none; }
  .member::after,
  .gift::after,
  button.primary::after,
  .primary::after { transition: none; }
}
