:root {
  --red: #dc0000;
  --red-dark: #a40000;
  --yellow: #ffff00;
  --black: #000;
  --white: #fff;
  --paper: #f0f0f0;
  --green: #1fbf4a;
  --grey: #8a8a8a;
  --slab: "Alfa Slab One", "Rockwell Extra Bold", "Rockwell", "Cooper Black", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --line: 3px solid var(--black);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--red);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

img { max-width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.chat-box :focus-visible, .users :focus-visible { outline-color: var(--yellow); }

.noscript { position: fixed; inset: auto 0 0 0; z-index: 10; margin: 0; padding: 10px 16px; text-align: center; font-family: var(--slab); color: var(--yellow); background: var(--black); }

/* ------------------------------ Přihlášení do chatu ------------------------------ */
.chat-login { padding: 18px 20px 22px; max-width: 420px; width: 100%; margin: 0 auto; text-align: left; }
.chat-login-logo { margin: 0 auto 6px; width: 84px; }
.chat-login-sub { margin: 0 0 8px; text-align: center; color: var(--yellow); font-family: var(--slab); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.chat-login label { display: block; margin: 12px 0 4px; color: var(--yellow); font-family: var(--slab); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
.chat-login input {
  width: 100%; padding: 12px; font: inherit; font-size: 1.05rem; color: var(--black);
  background: var(--paper); border: 3px solid var(--white); border-radius: 0;
}
.chat-login input:focus { border-color: var(--yellow); outline: none; box-shadow: 0 0 0 3px var(--red); }
.login-error { min-height: 1.5em; margin: 12px 0 4px; color: #ff9b9b; font-weight: 700; }
.chat-login button {
  width: 100%; margin-top: 6px; padding: 14px; cursor: pointer; min-height: 48px;
  font-family: var(--slab); font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--black); background: var(--yellow); border: 3px solid var(--white); border-radius: 0;
}
.chat-login button:hover { background: var(--white); }
.chat-login button:disabled { opacity: .6; cursor: wait; }
.chat-tools { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.chat-main { position: relative; display: flex; flex-direction: column; }

/* ------------------------------ Rozložení ------------------------------ */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, .38fr) minmax(0, 1.4fr);
  max-width: 1700px; margin: 0 auto; min-height: 100vh;
  background: var(--red); border-left: var(--line); border-right: var(--line);
}
.col-left { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.col-mid { border-left: var(--line); border-right: var(--line); }
.col-right { display: flex; flex-direction: column; min-width: 0; }

.title, .intro p, .premiere p, .teaser, .chat-head h2, .users h2 { font-family: var(--slab); font-weight: 400; margin: 0; }

/* Úvodní texty */
.intro { color: var(--yellow); text-transform: uppercase; text-align: center; }
.intro-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 8px; }
.intro .big { font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1.1; }
.intro .small { font-size: clamp(.8rem, 1.2vw, 1.05rem); }
.intro-mid { font-size: clamp(1rem, 1.6vw, 1.3rem); margin: 6px 0 2px !important; }
.intro-line { font-size: clamp(.95rem, 1.5vw, 1.2rem); margin-top: 4px !important; }
.intro-line.tiny { font-size: clamp(.7rem, 1vw, .9rem); }
.intro-line b { font-weight: 400; font-size: 1.15em; }

/* Stream */
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; background: var(--black); border: var(--line); box-shadow: 0 0 0 3px var(--white); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kick-notice {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  color: var(--yellow); font-family: var(--slab); font-size: clamp(.9rem, 2vw, 1.2rem);
}

/* Chat */
.chat-box { position: relative; background: var(--black); border: var(--line); box-shadow: 0 0 0 3px var(--white); display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-bottom: 2px solid var(--yellow); }
.chat-head h2 { color: var(--yellow); font-size: 1.25rem; text-transform: uppercase; letter-spacing: .05em; }
.conn { font-size: .85rem; padding: 2px 10px; border-radius: 99px; background: #444; color: var(--white); }
.conn.ok { background: var(--green); color: #00280c; font-weight: 700; }
.me-info { margin-left: auto; font-size: .9rem; color: var(--white); }
.me-info b { color: var(--yellow); }
.btn-small {
  font: inherit; font-size: .85rem; font-weight: 700; padding: 8px 14px; min-height: 40px; cursor: pointer;
  color: var(--black); background: var(--yellow); border: 2px solid var(--white); border-radius: 0;
}
.btn-small:hover { background: var(--white); }

.chat-log {
  height: 420px; overflow-y: auto; overscroll-behavior: contain; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; background: #0b0b0b;
  scrollbar-color: var(--yellow) #222;
}
.msg { max-width: 88%; padding: 7px 11px; background: #232323; border: 1px solid #444; align-self: flex-start; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.msg-meta { display: flex; gap: 8px; align-items: baseline; font-size: .75rem; margin-bottom: 2px; }
.msg-nick { font-weight: 800; color: var(--yellow); font-size: .9rem; }
.msg.mine .msg-nick { color: var(--red-dark); }
.msg-time { opacity: .75; }
.msg-text { white-space: pre-wrap; font-size: 1rem; }
.chat-empty { margin: auto; color: #aaa; text-align: center; }

.jump {
  position: absolute; right: 16px; bottom: 150px; z-index: 2; cursor: pointer; font: inherit; font-weight: 700;
  padding: 8px 14px; color: var(--black); background: var(--yellow); border: 2px solid var(--white); border-radius: 99px;
}

.chat-form { display: flex; gap: 10px; padding: 10px 12px 6px; border-top: 2px solid var(--yellow); align-items: stretch; }
.chat-form textarea {
  flex: 1; min-width: 0; resize: none; font: inherit; font-size: 1rem; padding: 10px; color: var(--black);
  background: var(--paper); border: 3px solid var(--white); border-radius: 0;
}
.chat-form textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px var(--red); }
.chat-form textarea:disabled { opacity: .55; }
.chat-actions { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: 6px; }
.counter { font-size: .75rem; color: #bbb; }
.counter.warn { color: #ff9b9b; font-weight: 700; }
.chat-form button {
  font-family: var(--slab); font-size: 1rem; padding: 10px 16px; min-height: 48px; cursor: pointer; text-transform: uppercase;
  color: var(--black); background: var(--yellow); border: 3px solid var(--white); border-radius: 0;
}
.chat-form button:hover:not(:disabled) { background: var(--white); }
.chat-form button:disabled { opacity: .5; cursor: not-allowed; }
.chat-error { min-height: 1.4em; margin: 0; padding: 0 12px 8px; font-size: .85rem; color: #ff9b9b; font-weight: 700; }

/* Admin ovládání */
.btn-danger { background: #ff6b6b; }
.msg-del, .kick-btn {
  font: inherit; font-size: .75rem; font-weight: 700; cursor: pointer; border-radius: 0;
  color: var(--white); background: var(--red-dark); border: 1px solid var(--white);
}
.msg-del { margin-left: auto; padding: 2px 8px; min-height: 28px; }
.kick-btn { padding: 3px 10px; min-height: 30px; }
.msg-del:hover, .kick-btn:hover { background: var(--red); }
.u-state + .kick-btn { margin-left: 8px; }

/* Uživatelé */
.users { background: var(--black); border: var(--line); box-shadow: 0 0 0 3px var(--white); padding: 12px 14px 14px; }
.users h2 { color: var(--yellow); font-size: 1.25rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.online-count { font-family: var(--body); font-size: .85rem; color: var(--white); letter-spacing: 0; text-transform: none; margin-left: 6px; }
.user-list { list-style: none; margin: 0; padding: 0; }
.user-list li { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid #2a2a2a; }
.user-list li:last-child { border-bottom: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--grey); flex: none; }
.user-list .online .dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.u-nick { font-weight: 700; color: var(--white); }
.u-self { color: var(--yellow); font-size: .8rem; font-weight: 400; margin-left: 4px; }
.u-state { margin-left: auto; font-size: .85rem; color: var(--grey); }
.user-list .online .u-state { color: var(--green); font-weight: 700; }

/* Promo vlevo dole */
.promo { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.promo-logo { margin: 0; width: clamp(130px, 17vw, 215px); background: var(--paper); border: var(--line); padding: 0; }
.premiere { display: flex; flex-direction: column; align-items: flex-start; text-transform: uppercase; line-height: 1; }
.premiere p { text-align: center; }
.premiere .p1 { color: var(--white); font-size: clamp(1.1rem, 2vw, 1.7rem); letter-spacing: -.02em; transform: scaleY(1.25); transform-origin: left; margin-bottom: 10px; }
.premiere .p2, .premiere .p3 { align-self: center; color: var(--yellow); font-size: clamp(1.4rem, 2.6vw, 2.2rem); margin-top: 4px; }
.premiere .p4 { align-self: center; color: var(--yellow); font-size: clamp(2.4rem, 4.6vw, 4rem); margin-top: 8px; }

/* Pravý sloupec */
.hero { background: var(--black); text-align: center; padding: 26px 16px 18px; border-bottom: var(--line); }
.title { display: flex; flex-direction: column; align-items: center; color: var(--yellow); text-transform: uppercase; line-height: .95; }
.title .t1 { font-size: clamp(1.5rem, 3.4vw, 3rem); }
.title .t2 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); }
.title .t3 { font-size: clamp(2.8rem, 7.6vw, 6.8rem); }
.hero-logo { margin: 22px auto 0; width: clamp(80px, 9vw, 130px); }

.portraits { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 28px 18px 30px; gap: 56px; }
.frame { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(100%, 560px); padding: 14px; background: var(--white); border: 2px solid var(--black); }
.frame img { width: 100%; height: auto; border: 3px solid var(--black); }
.teaser { color: var(--yellow); font-size: clamp(2rem, 4.4vw, 4rem); letter-spacing: .06em; margin-top: auto !important; padding-bottom: 20px; }

@media (min-width: 1001px) {
  .col-right { position: sticky; top: 0; align-self: start; min-height: 100vh; }
}

/* Tablet / mobil: vše pod sebe */
@media (max-width: 1000px) {
  .stage { grid-template-columns: minmax(0, 1fr); border: 0; }
  .col-mid { display: none; }
  .col-right { order: -1; border-bottom: var(--line); }
  .col-left { order: 0; padding: 16px 14px 22px; }
  .hero { padding: 18px 12px 12px; }
  .hero-logo { margin-top: 12px; width: 76px; }
  .portraits { flex-direction: column; gap: 22px; padding: 18px 12px 20px; }
  .teaser { margin-top: 0 !important; padding-bottom: 0; }
  .promo { justify-content: center; }
}

@media (max-width: 560px) {
  .chat-log { height: min(55vh, 420px); }
  .msg { max-width: 94%; }
  .chat-form { flex-direction: column; }
  .chat-actions { flex-direction: row; align-items: center; }
  .chat-form button { flex: 1; margin-left: 12px; }
  .jump { bottom: 190px; }
  .me-info { margin-left: 0; width: 100%; order: 3; }
  .frame { gap: 8px; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ------------------------------ Úvodní video (okno) ------------------------------ */
body.intro-lock { overflow: hidden; }
.intro-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .78); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.intro-window {
  width: min(100%, 760px); background: var(--black); border: var(--line);
  box-shadow: 0 0 0 4px var(--white), 0 0 0 7px var(--black), 0 12px 40px rgba(0, 0, 0, .6);
}
.intro-screen { position: relative; aspect-ratio: 16 / 9; background: var(--black); }
.intro-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--black); }
.intro-ui { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 2px solid var(--yellow); }
.intro-btn, .intro-play {
  font-family: var(--slab); font-size: .95rem; letter-spacing: .04em; cursor: pointer; border-radius: 0;
  color: var(--black); background: var(--yellow); border: 3px solid var(--white); min-height: 44px; padding: 8px 16px;
}
.intro-btn:hover, .intro-play:hover { background: var(--white); }
.intro-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.2rem; padding: 12px 22px; }
.noscript { z-index: 60; }

@media (max-width: 480px) {
  .intro-overlay { padding: 10px; }
  .intro-btn { font-size: .85rem; padding: 8px 10px; flex: 1; }
}

/* ------------------------------ Galerie ------------------------------ */
.gallery { max-width: 1700px; margin: 0 auto; padding: 26px 22px 40px; background: var(--red); border: var(--line); border-bottom: 0; border-top-width: 3px; }
.gallery-title { margin: 0 0 18px; font-family: var(--slab); font-weight: 400; color: var(--yellow); font-size: clamp(1.6rem, 3.4vw, 2.6rem); text-align: center; letter-spacing: .06em; }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.g-item { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; cursor: zoom-in; overflow: hidden; background: var(--black); border: 3px solid var(--black); box-shadow: 0 0 0 3px var(--white); border-radius: 0; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.g-item:hover img { transform: scale(1.04); }
.g-item.is-video { cursor: pointer; }
.g-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 56px; height: 56px; padding-left: 4px; border-radius: 50%; font-size: 1.3rem; color: var(--black); background: var(--yellow); border: 3px solid var(--white); }

.lightbox { position: fixed; inset: 0; z-index: 45; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 56px 10px 16px; background: rgba(0, 0, 0, .92); }
.lightbox[hidden] { display: none; }
.lb-stage { display: grid; place-items: center; min-width: 0; height: 100%; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; background: var(--black); border: 3px solid var(--white); }
.lb-btn { font-family: var(--slab); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--black); background: var(--yellow); border: 3px solid var(--white); border-radius: 0; min-width: 48px; min-height: 48px; }
.lb-btn:hover { background: var(--white); }
.lb-close { position: absolute; top: 8px; right: 10px; }

@media (max-width: 560px) {
  .gallery { padding: 20px 12px 30px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lightbox { grid-template-columns: minmax(0, 1fr); padding: 56px 8px 70px; }
  .lb-prev, .lb-next { position: absolute; bottom: 10px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}

/* ------------------------------ Postavy ------------------------------ */
.cast { max-width: 1700px; margin: 0 auto; padding: 26px 22px 12px; background: var(--red); border: var(--line); border-bottom: 0; }
.cast-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; }
.c-item { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; cursor: zoom-in; text-align: center; overflow: hidden; color: var(--white); background: var(--black); border: 3px solid var(--black); box-shadow: 0 0 0 3px var(--white); border-radius: 0; }
.c-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 6%; background: var(--paper); transition: transform .25s; }
.c-item:hover img { transform: scale(1.04); }
.c-item:hover { box-shadow: 0 0 0 3px var(--yellow); }
.c-num { position: absolute; top: 0; left: 0; min-width: 30px; padding: 2px 8px; font-family: var(--slab); font-size: .95rem; color: var(--black); background: var(--yellow); border-right: 3px solid var(--black); border-bottom: 3px solid var(--black); }
.c-nick { display: block; padding: 8px 6px 0; font-family: var(--slab); font-size: 1.05rem; color: var(--yellow); letter-spacing: .03em; }
.c-role { display: block; padding: 2px 8px 10px; font-size: .78rem; line-height: 1.25; color: var(--white); }

@media (max-width: 560px) {
  .cast { padding: 20px 12px 8px; }
  .cast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .c-nick { font-size: .95rem; }
}

/* Stav online/offline u postav (jen pro přihlášené) */
.c-status { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; font-size: .72rem; font-weight: 700; color: var(--white); background: rgba(0, 0, 0, .78); border: 1px solid #555; border-radius: 99px; }
.c-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--grey); }
.c-item.is-online .c-status { color: #7dff9c; border-color: var(--green); }
.c-item.is-online .c-status::before { background: var(--green); box-shadow: 0 0 6px var(--green); }
