:root { --ink: #0E0E12; --card: #17181F; --line: #262733; --blue: #3646FF; --blue2: #8C96FF; --w: #fff; --mut: #9A9DB0; --red: #FF4D5E; --green: #2ED47A; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--w); font: 400 17px/1.5 "IBM Plex Sans Hebrew", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100svh; background: radial-gradient(120% 60% at 50% -10%, rgb(54 70 255 / .28), transparent 60%), var(--ink); }
#app { max-width: 480px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
button, input { font: inherit; color: inherit; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; color: var(--mut); font-size: 14px; }
.brand { font: 400 18px "Alfa Slab One"; color: var(--w); letter-spacing: -.5px; direction: ltr; }
.brand b { color: var(--blue); }
h1 { margin: 0; font-weight: 700; font-size: 54px; line-height: .95; letter-spacing: -.04em; }
h1 em { font-style: normal; color: var(--blue); }
h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.sub { color: var(--mut); margin: 10px 0 26px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; margin-bottom: 14px; }
.btn { display: block; width: 100%; border: 0; border-radius: 16px; padding: 17px; font-weight: 700; font-size: 18px; background: var(--blue); color: #fff; cursor: pointer; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn:disabled { opacity: .45; }
.row { display: flex; gap: 10px; }
.field { width: 100%; border: 1.5px solid var(--line); background: #0F1016; border-radius: 14px; padding: 15px; font-size: 18px; outline: none; }
.field:focus { border-color: var(--blue); }
.field.code { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 700; direction: ltr; }
label { display: block; font-weight: 600; font-size: 14px; color: var(--mut); margin: 0 0 8px; }
.gap { height: 12px; }
.code-big { font: 400 64px/1 "Alfa Slab One"; letter-spacing: .08em; direction: ltr; text-align: center; margin: 6px 0 4px; }
.hint { text-align: center; color: var(--mut); font-size: 14px; }
.players { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.players li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #101118; }
.players li.off { opacity: .45; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--line); color: var(--mut); }
.tag.host { background: rgb(54 70 255 / .2); color: var(--blue2); }
.tag.done { background: rgb(46 212 122 / .15); color: var(--green); }
.word { text-align: center; padding: 28px 16px; border-radius: 22px; background: linear-gradient(160deg, #2B3BFF, #1B26B8); box-shadow: 0 20px 60px rgb(43 59 255 / .35); cursor: pointer; user-select: none; }
.word small { display: block; opacity: .8; font-weight: 600; }
.word b { display: block; font-size: 48px; line-height: 1.1; letter-spacing: -.03em; margin-top: 6px; }
.word.hidden b { filter: blur(14px); }
.timer { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 14px 0 6px; }
.timer i { display: block; height: 100%; background: var(--blue); transition: width 1s linear; }
.timer.low i { background: var(--red); }
.secs { text-align: left; color: var(--mut); font-size: 13px; direction: ltr; }
.clues { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clue { background: #101118; border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-align: center; }
.clue b { display: block; font-size: 24px; letter-spacing: -.02em; }
.clue span { color: var(--mut); font-size: 13px; }
.vote { display: grid; gap: 10px; }
.vote button { display: flex; justify-content: space-between; align-items: center; border: 1.5px solid var(--line); background: #101118; border-radius: 16px; padding: 15px 16px; font-weight: 600; cursor: pointer; }
.vote button.on { border-color: var(--blue); background: rgb(54 70 255 / .18); }
.vote button small { color: var(--mut); font-weight: 400; }
.reveal { text-align: center; padding: 26px 18px; }
.reveal .who { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 8px 0; }
.reveal.caught .who { color: var(--green); }
.reveal.free .who { color: var(--red); }
.pair { display: flex; gap: 10px; margin-top: 14px; }
.pair div { flex: 1; background: #101118; border-radius: 14px; padding: 12px; }
.pair small { color: var(--mut); display: block; font-size: 12px; }
.pair b { font-size: 20px; }
.score { display: flex; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.score b { font: 400 18px "Alfa Slab One"; direction: ltr; }
.err { color: var(--red); text-align: center; min-height: 22px; font-size: 14px; margin-top: 8px; }
.how { color: var(--mut); font-size: 15px; padding-inline-start: 18px; margin: 0; }
.how li { margin-bottom: 6px; }
.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.twist { display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 14px; border-radius: 16px; background: linear-gradient(135deg, rgb(255 196 0 / .18), rgb(255 77 94 / .14)); border: 1px solid rgb(255 196 0 / .45); }
.twist b { color: #FFD24D; font-size: 18px; }
.twist span { color: #E8E3D3; font-size: 14px; }
.word.liar { background: linear-gradient(160deg, #FF4D5E, #A3122A); box-shadow: 0 20px 60px rgb(255 77 94 / .35); cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips button { border: 1.5px solid var(--line); background: #101118; border-radius: 999px; padding: 9px 14px; font-weight: 600; cursor: pointer; }
.chips button.on { border-color: var(--blue); background: rgb(54 70 255 / .2); }
.switch { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; color: var(--w); font-weight: 400; font-size: 15px; }
.switch input { width: 22px; height: 22px; accent-color: var(--blue); flex: none; margin-top: 2px; }
.det { border-color: rgb(140 150 255 / .5); }
.det b { color: var(--blue2); }
.det p { margin: 8px 0 0; }
.det .ok { color: var(--green); font-weight: 700; }
.det .bad { color: var(--red); font-weight: 700; }

/* a big room (up to 30): the lists in two columns */
.players.two, .vote.two { grid-template-columns: 1fr 1fr; }
.vote.two button { padding: 12px; flex-direction: column; align-items: flex-start; gap: 2px; }
.hurry { margin: 10px 0 0; text-align: center; font-weight: 700; color: #FFD24D; animation: pop .4s; }
/* the host ("המנחה") */
.mc { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgb(8 8 14 / .82); backdrop-filter: blur(6px); animation: mcin .3s ease-out; cursor: pointer; }
.mc.out { opacity: 0; transition: opacity .3s; }
@keyframes mcin { from { opacity: 0; } }
.mc-card { width: min(440px, 100%); padding: 26px 24px 18px; border-radius: 26px; background: linear-gradient(160deg, #1B1D33, #11121C); border: 1px solid rgb(140 150 255 / .35); box-shadow: 0 30px 90px rgb(43 59 255 / .35); animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.mc-who { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--blue2); font-size: 15px; letter-spacing: .02em; }
.mc-mic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); font-size: 20px; box-shadow: 0 0 0 6px rgb(54 70 255 / .2); animation: mcpulse 1.2s ease-in-out infinite; }
@keyframes mcpulse { 50% { box-shadow: 0 0 0 12px rgb(54 70 255 / .05); } }
.mc-text { min-height: 2.6em; margin: 16px 0 12px; font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.mc-caret { display: inline-block; width: 3px; height: 1em; margin-inline-start: 3px; vertical-align: -.12em; background: var(--blue2); animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mc small { color: var(--mut); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .mc, .mc-card, .mc-mic, .mc-caret { animation: none; } }
