@font-face { font-family: 'Manrope'; font-weight: 400; font-display: swap; src: url('/fonts/Manrope-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url('/fonts/Manrope-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url('/fonts/Manrope-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-weight: 700 800; font-display: swap; src: url('/fonts/Manrope-Bold.ttf') format('truetype'); }

:root {
  --blue: #019fe2;
  --blue-hover: #0088c2;
  --navy: #2b2e83;
  --dark: #192a3d;
  --gold: #f3c969;
  --white: #ffffff;
  --off: #fafbfc;
  --g100: #e8ebef;
  --g500: #5e6676;
  --black: #0d0d0d;
  --success: #2bb673;
  --danger: #e04b4b;
  --radius: 16px;
  --font: 'Manrope', Arial, Calibri, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--off);
  color: var(--dark);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--g100);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar img { height: 44px; width: auto; display: block; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  margin: 6px 0 8px;
  color: var(--navy);
}
h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px; color: var(--navy); }
.muted { color: var(--g500); }
.small { font-size: 13px; }

main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px; }

.card {
  background: var(--white);
  border: 1px solid var(--g100);
  border-radius: var(--radius);
  padding: 24px;
}

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  background: var(--blue);
  color: var(--white);
  transition: background 0.15s;
}
.btn:hover { background: var(--blue-hover); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--g100); }
.btn.ghost:hover { background: var(--off); }
.btn.sm { padding: 6px 12px; font-size: 13px; }

input[type='email'], textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--dark);
  padding: 12px 14px;
  border: 1px solid var(--g100);
  border-radius: 10px;
  background: var(--white);
}
input[type='email']:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
textarea { resize: vertical; min-height: 110px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--g500); margin: 14px 0; }
label.check input { margin-top: 3px; accent-color: var(--blue); }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 8px 0 0; }

footer {
  text-align: center;
  padding: 20px 24px 28px;
  color: var(--g500);
  font-size: 13px;
}
footer a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ----- widok wejścia ----- */
.gate {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.gate .hero {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
}
.gate .hero .eyebrow { color: var(--gold); }
.gate .hero h1 { color: var(--white); }
.gate .hero p { margin: 0; opacity: 0.9; }
.gate form.card { display: flex; flex-direction: column; justify-content: center; }

/* ----- widok oglądania ----- */
.watch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}
.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, var(--dark) 0%, var(--navy) 100%);
  border-radius: var(--radius);
  overflow: hidden;
}
.stage video { width: 100%; height: 100%; display: block; background: #000; }
.waiting {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: var(--white); padding: 24px;
  background: linear-gradient(180deg, var(--dark) 0%, var(--navy) 100%);
}
.waiting .pulse {
  width: 14px; height: 14px; border-radius: 50%; background: var(--gold); margin-bottom: 18px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: 0.4; } }
.waiting h2 { color: var(--white); font-size: 22px; }
.unmute {
  position: absolute; left: 16px; bottom: 56px; z-index: 2;
  background: var(--gold); color: var(--dark); font-weight: 800; border: 0; border-radius: 10px;
  padding: 10px 14px; cursor: pointer; font-family: inherit;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--g100); color: var(--g500);
}
.live-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live-pill.on { background: rgba(224, 75, 75, 0.12); color: var(--danger); }
.watch-head { margin: 16px 0 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.watch-head h1 { font-size: 26px; margin: 0; }

.ask { display: flex; flex-direction: column; gap: 12px; }
.ask .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.counter { font-size: 12px; color: var(--g500); }
.ok { color: var(--success); font-size: 14px; font-weight: 600; min-height: 20px; margin: 0; }
.mine { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mine li { background: var(--off); border: 1px solid var(--g100); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 920px) {
  .gate, .watch { grid-template-columns: 1fr; }
  .gate .hero { min-height: 220px; padding: 28px; }
  main { padding: 16px; }
}

/* ----- admin ----- */
.stats { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stat { background: var(--white); border: 1px solid var(--g100); border-radius: 12px; padding: 10px 16px; min-width: 120px; }
.stat b { display: block; font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 20px 0 12px; }
.tab { font-family: inherit; font-weight: 700; font-size: 14px; border: 1px solid var(--g100); background: var(--white); color: var(--g500); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.tab.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.toolbar .spacer { flex: 1; }
.toolbar a { color: var(--blue); font-weight: 700; font-size: 14px; text-decoration: none; margin-left: 8px; }
.qlist { display: flex; flex-direction: column; gap: 10px; }
.q { background: var(--white); border: 1px solid var(--g100); border-left: 4px solid var(--blue); border-radius: 12px; padding: 14px 16px; display: flex; gap: 16px; align-items: flex-start; }
.q.done { border-left-color: var(--success); opacity: 0.65; }
.q.fresh { animation: flash 2.4s ease-out; }
@keyframes flash { from { background: rgba(243, 201, 105, 0.45); } to { background: var(--white); } }
.q .body { flex: 1; min-width: 0; }
.q .text { white-space: pre-wrap; word-break: break-word; font-size: 16px; }
.q .meta { font-size: 12px; color: var(--g500); margin-top: 6px; }
.empty { text-align: center; padding: 48px 16px; color: var(--g500); }
