/* Wyniesione z src/routes/publiczne.js (R19, dostepnosc /live i /live/tv:
   bez blokow <style> i stylu inline w odpowiedzi, CSP bez unsafe-inline). */

body.live-body {
  font-family: 'Barlow', sans-serif; background: #15171b; color: #e0e0e0;
  margin: 0; padding: 16px 16px 40px;
}
.live-header { text-align: center; margin-bottom: 20px; padding: 20px 0; position: relative; }
.live-header::after {
  content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px;
  background: linear-gradient(90deg, transparent, #ec2028, #c8a84e, transparent);
}
.live-header h1 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; margin: 0;
  text-transform: uppercase; letter-spacing: .04em; color: #fff;
}
.live-header .live-data { color: #c8a84e; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.live-status {
  text-align: center; padding: 8px 14px; background: rgba(42,122,90,.2); color: #5fbe8a;
  border: 1px solid rgba(42,122,90,.25); border-radius: 6px; margin-bottom: 20px; font-size: 12px;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.live-status.live-status-przerwa { background: #c44; }
.live-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #5fbe8a; animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; box-shadow: 0 0 6px rgba(95,190,138,.6); } 50% { opacity: .3; box-shadow: none; } }

.live-filtry { margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.live-filtry .label-niewidoczna { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.live-filtry input, .live-filtry select {
  padding: 8px 12px; background: #2a2d33; border: 1px solid rgba(255,255,255,.1); border-radius: 6px;
  color: #e0e0e0; font-size: 13px; outline: none;
}
.live-filtry input { flex: 1; min-width: 200px; }

.live-kategoria { margin-bottom: 20px; background: #2a2d33; border-radius: 10px; padding: 18px; position: relative; overflow: hidden; }
.live-kategoria::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, #ec2028, #c8a84e); }
.live-kategoria h2 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-size: 14px; letter-spacing: .08em; color: #c8a84e; margin: 0 0 12px; padding: 0; border: none; }
.live-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.live-tabela caption { text-align: left; font-size: 11px; color: #777; padding-bottom: 6px; }
.live-tabela th { text-align: left; padding: 6px 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #888; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 600; }
.live-tabela td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.04); }
.live-msc { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; width: 44px; text-align: center; }
tr.miejsce-1 .live-msc { color: #ffd700; text-shadow: 0 0 10px rgba(255,215,0,.3); font-size: 18px; }
tr.miejsce-1 td { background: linear-gradient(90deg, rgba(255,215,0,.08) 0%, transparent 60%); }
tr.miejsce-2 .live-msc { color: #c0c0c0; }
tr.miejsce-2 td { background: linear-gradient(90deg, rgba(192,192,192,.05) 0%, transparent 60%); }
tr.miejsce-3 .live-msc { color: #cd7f32; }
tr.miejsce-3 td { background: linear-gradient(90deg, rgba(205,127,50,.05) 0%, transparent 60%); }
#live-wyniki { transition: opacity .3s; }
.live-logo { text-align: center; margin-top: 24px; font-size: 11px; color: #555; letter-spacing: .1em; text-transform: uppercase; }
.live-medalisci { margin-bottom: 24px; background: #2a2d33; border-radius: 10px; padding: 18px; position: relative; overflow: hidden; }
.live-medalisci::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, #ffd700, #c0c0c0, #cd7f32); }
.live-medalisci h2 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-size: 14px; letter-spacing: .08em; color: #ffd700; margin: 0 0 12px; padding: 0; border: none; }
.live-medal { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
tr.medal-zloty .live-medal { color: #ffd700; }
tr.medal-srebrny .live-medal { color: #c0c0c0; }
tr.medal-brazowy .live-medal { color: #cd7f32; }

/* ---------- ekran TV (poza powloka strony, rozstrzygniecie R19) ---------- */
body.tv-body {
  margin: 0; padding: 0; box-sizing: border-box;
  background: #0a0a0a; color: #e8e8e8;
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  overflow: hidden; min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(236,32,40,.06) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(200,168,78,.04) 0%, transparent 40%);
}
body.tv-body * { box-sizing: border-box; }
.tv-header { text-align: center; padding: 28px 24px 20px; position: relative; }
.tv-header::after {
  content: ''; position: absolute; bottom: 0; left: 10%; right: 10%; height: 2px;
  background: linear-gradient(90deg, transparent, #ec2028 30%, #c8a84e 70%, transparent);
}
.tv-header h1 { font-size: 3.2rem; text-transform: uppercase; letter-spacing: 3px; font-weight: 800; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.tv-header .tv-data { font-size: 1.1rem; color: #c8a84e; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.tv-kategoria { padding: 16px 50px 0; display: none; animation: tvSlideIn .5s ease-out; }
.tv-kategoria.active { display: block; }
@keyframes tvSlideIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.tv-kategoria h2 { font-size: 1.8rem; text-transform: uppercase; color: #c8a84e; margin-bottom: 14px; letter-spacing: .06em; padding-left: 16px; border-left: 4px solid #ec2028; }
.tv-tabela { width: 100%; font-size: 1.5rem; border-collapse: collapse; }
.tv-tabela caption { text-align: left; font-size: 1rem; color: #777; padding-bottom: 8px; }
.tv-tabela th { text-align: left; padding: 10px 16px; color: #666; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid rgba(255,255,255,.08); }
.tv-tabela td { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.04); }
.tv-tabela tbody tr { transition: background .3s; }
.tv-msc { font-weight: 800; font-size: 2.2rem; width: 80px; text-align: center; }
tr.miejsce-1 { background: linear-gradient(90deg, rgba(255,215,0,.1) 0%, transparent 50%); }
tr.miejsce-1 td { color: #ffd700; }
tr.miejsce-1 .tv-msc { text-shadow: 0 0 16px rgba(255,215,0,.4); }
tr.miejsce-2 { background: linear-gradient(90deg, rgba(192,192,192,.06) 0%, transparent 50%); }
tr.miejsce-2 td { color: #c0c0c0; }
tr.miejsce-3 { background: linear-gradient(90deg, rgba(205,127,50,.06) 0%, transparent 50%); }
tr.miejsce-3 td { color: #cd7f32; }
.tv-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; height: 40px;
  background: linear-gradient(90deg, #15171b, rgba(236,32,40,.15) 30%, rgba(200,168,78,.1) 70%, #15171b);
  display: flex; align-items: center; justify-content: space-between; padding: 0 30px; font-size: .85rem; color: #555;
}
.tv-bottom .tv-club { color: #c8a84e; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tv-bottom .tv-na-zywo { display: flex; align-items: center; gap: 8px; }
.tv-pulse { width: 8px; height: 8px; border-radius: 50%; background: #5fbe8a; animation: tvPulse 2s ease-in-out infinite; }
@keyframes tvPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@media (max-width: 620px) {
  .tv-kategoria { padding: 8px 12px 0; }
  .tv-kategoria h2 { font-size: 1.2rem; }
  .tv-tabela { font-size: .85rem; }
  .tv-tabela th, .tv-tabela td { padding: 5px 4px; }
  .tv-msc { font-size: 1rem; width: 36px; }
  .tv-header h1 { font-size: 1.6rem; letter-spacing: 1px; }
}

/* Osoby z wrazliwoscia na ruch: bez pulsowania i wjazdu kategorii (K19). */
@media (prefers-reduced-motion: reduce) {
  .live-status::before, .tv-pulse, .tv-kategoria { animation: none; }
}
