:root {
  color-scheme: dark;
  --ink: #f6f8ff;
  --muted: #aab5cc;
  --panel: rgba(20, 31, 55, .82);
  --line: rgba(255,255,255,.1);
  --accent: #ffcb69;
  --accent-2: #f08f5d;
  --green: #58d6a3;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(240,143,93,.18), transparent 28rem),
    radial-gradient(circle at 88% 80%, rgba(69,117,183,.2), transparent 30rem),
    #0a1120;
}
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 70px; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
h1, .hero h2 { margin: 3px 0 8px; font: 700 clamp(2rem, 5vw, 4.4rem)/.95 Georgia, serif; letter-spacing: -.04em; }
h2, h3, p { margin-top: 0; }
.intro { max-width: 650px; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.room-title { margin: 14px 0 10px; padding: 9px 11px; color: #fff4c9; background: rgba(111,119,66,.3); border: 1px solid rgba(255,203,105,.35); border-left: 3px solid var(--accent); border-radius: 3px 8px 8px 3px; font-size: .86rem; font-weight: 750; line-height: 1.45; }
.room-title::before { content: "Temat dnia: "; color: var(--accent); font-size: .75rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.eyebrow { margin-bottom: 10px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.badge { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--muted); font-size: .82rem; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; }
.badge span { width: 8px; height: 8px; border-radius: 50%; background: #78839a; }
.badge.online span { background: var(--green); box-shadow: 0 0 12px var(--green); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 22px 65px rgba(0,0,0,.24); backdrop-filter: blur(14px); }
.login-card { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: end; padding: clamp(26px, 5vw, 54px); }
.login-card p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .84rem; }
.moderator-label { margin-top: 17px; }
.moderator-label span { opacity: .7; }
.join-row { display: flex; gap: 10px; }
input { min-width: 0; flex: 1; color: var(--ink); background: #0c1528; border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; outline: none; }
#mainModeratorSecret { width: 100%; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,203,105,.12); }
.primary { border: 0; border-radius: 12px; padding: 14px 20px; color: #251709; background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 800; box-shadow: 0 8px 24px rgba(240,143,93,.2); }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.room { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .75fr); gap: 20px; }
.stage { height: 530px; padding: clamp(30px, 6vw, 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.speaker-avatar { display: grid; place-items: center; width: 132px; height: 132px; margin: 16px 0 22px; border-radius: 50%; color: #2b1909; background: linear-gradient(145deg, #ffe1a6, #e98150); font: 700 2.8rem Georgia, serif; box-shadow: 0 0 0 12px rgba(255,203,105,.07), 0 0 70px rgba(240,143,93,.18); }
.stage h2 { margin-bottom: 8px; font: 700 2rem Georgia, serif; }
#speakerHint { min-height: 24px; color: var(--muted); }
.meter { height: 40px; display: flex; align-items: center; gap: 5px; margin: 10px 0 26px; }
.meter i { display: block; width: 4px; height: 10px; border-radius: 8px; background: var(--accent); opacity: .35; }
.stage.speaking .meter i { animation: pulse .9s ease-in-out infinite alternate; opacity: 1; }
.stage.speaking .meter i:nth-child(2), .stage.speaking .meter i:nth-child(4) { animation-delay: -.45s; }
.stage.speaking .meter i:nth-child(3) { animation-delay: -.7s; }
@keyframes pulse { to { height: 36px; } }
.wide { width: min(310px, 100%); }
.text-button { margin-top: 13px; border: 0; color: var(--muted); background: transparent; padding: 8px; }
.sidebar { display: grid; gap: 20px; align-content: start; }
.compact { padding: 24px; }
.room-about h3 { margin: 0; font: 700 1.2rem/1.2 Georgia, serif; }
.room-about .eyebrow { margin-bottom: 7px; }
.room-about-copy { margin: 12px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.section-title { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.section-title h3 { margin: 0; font-size: 1rem; }
.section-title span { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 99px; color: #17120a; background: var(--accent); font-size: .75rem; font-weight: 800; }
.people-list { list-style: none; margin: 10px 0 0; padding: 0; }
.people-list li { display: flex; align-items: center; gap: 10px; padding: 11px 2px; color: #dbe2f2; border-bottom: 1px solid rgba(255,255,255,.055); }
.people-list li:last-child { border-bottom: 0; }
.people-list .person-dot { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #273653; color: var(--accent); font-size: .7rem; font-weight: 800; }
.people-list small { color: var(--muted); }
.people-list button { padding: 5px 8px; color: var(--accent); background: transparent; border: 1px solid var(--line); border-radius: 7px; font-size: .7rem; }
.person-meta { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.stats-list { list-style: none; margin: 10px 0 0; padding: 0; }
.stats-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px solid rgba(255,255,255,.055); }
.stats-list li:last-child { border-bottom: 0; }
.stats-person, .stats-values { display: grid; gap: 3px; }
.stats-person strong { color: #e8ecf6; font-size: .84rem; }
.stats-person small { color: var(--muted); font-size: .7rem; }
.stats-values { color: #c8d0e0; text-align: right; font-size: .7rem; }
.stats-note { margin: 13px 0 0; padding-top: 12px; color: #77839b; border-top: 1px solid var(--line); font-size: .68rem; line-height: 1.45; }
.empty-list li { color: var(--muted); font-style: italic; font-size: .85rem; }
.status { min-height: 24px; margin: 18px auto 0; text-align: center; color: var(--muted); }
.status.error { color: #ff9b91; }
.notifications { position: fixed; z-index: 30; right: 22px; bottom: 22px; display: grid; gap: 9px; width: min(340px, calc(100% - 44px)); pointer-events: none; }
.notification { position: relative; padding: 13px 16px 13px 38px; color: #fff6d7; background: linear-gradient(135deg, rgba(57,68,38,.97), rgba(25,34,24,.97)); border: 1px solid rgba(255,203,105,.38); border-left: 4px solid var(--green); border-radius: 5px 12px 12px 5px; box-shadow: 0 15px 35px rgba(0,0,0,.32); font-size: .84rem; font-weight: 750; opacity: 0; transform: translateY(12px); transition: opacity .22s ease,transform .22s ease; }
.notification::before { content: "+"; position: absolute; margin-left: -24px; color: var(--green); font-size: 1rem; font-weight: 900; }
.notification.visible { opacity: 1; transform: translateY(0); }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .shell { padding-top: 24px; }
  .hero, .login-card, .room { display: block; }
  .badge { margin-top: 18px; width: fit-content; }
  .login-card form { margin-top: 28px; }
  .stage { min-height: 470px; margin-bottom: 18px; }
  .sidebar section { margin-bottom: 18px; }
}

@media (max-width: 430px) {
  .join-row { display: block; }
  .join-row button { width: 100%; margin-top: 10px; }
}
