/* =========================
   OGÓLNE
========================= */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: linear-gradient(
    135deg,
    #6b0f1a 0%,
    #a4161a 30%,
    #c9184a 100%
  );
}

/* =========================
   STRONA GŁÓWNA
========================= */

.table-page tbody tr:nth-child(even){
  background: rgba(255,255,255,0.04);
}
.table-page tbody tr:nth-child(odd){
  background: transparent;
}
tbody tr:hover{
  background:#e2f1ff;
}
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
}

.panel {
  background: linear-gradient(135deg, #0b1c2d 0%, #102a43 100%);
  border-radius: 24px;
  padding: 80px 60px;
  min-height: 55vh;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.panel h1,
.panel h2,
.panel h3,
.panel h4,
.panel p {
  color: #f1f5f9;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 50px;
}
.filter-box{
  margin-left:20px;
  background:#ffffff;
  padding:6px 12px;
  border-radius:6px;
  font-weight:bold;
  cursor:pointer;
}

.filter-box input{
  transform:scale(1.3);
  margin-right:6px;
}
/* =========================
   KARTY KATEGORII
========================= */
.cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.split-button {
  display: flex;
  flex-direction: column;
  text-align: center;
  border: 1px solid #1e293b;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #0b1c2d;
  width: 260px;
  background: #f8fafc;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.split-button .row {
  padding: 14px;
}

.split-button .top {
  font-weight: bold;
  background-color: #e2e8f0;
}

.split-button .bottom {
  border-top: 1px solid #cbd5e1;
  background-color: #f1f5f9;
  font-size: 0.9em;
}

.split-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

/* =========================
   STRONA Z TABELĄ
========================= */
.table-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.table-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.table-panel a {
  display: inline-block;
  margin-bottom: 20px;
}

.table-panel h1 {
  margin-top: 0;
}

/* =========================
   TABELA (GLOBAL – ZOSTAJE)
========================= */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

th {
  background: #eee;
}

/* TOP 3 */
.top1 { background-color: #fff3cd; font-weight: bold; }
.top2 { background-color: #e2e3e5; }
.top3 { background-color: #f8d7da; }

/* =========================
   MOBILE CARDS – DOMYŚLNIE
========================= */
.mobile-cards {
  display: none;
}

/* =========================
   MOBILE VIEW
========================= */
@media (max-width: 768px) {

  .hero-title {
    font-size: 32px;
    margin-bottom: 30px;
  }

  .panel {
    padding: 40px 20px;
    min-height: auto;
  }

  .table-panel table {
    display: none !important;
  }

  .mobile-cards {
    display: grid !important;
    gap: 12px;
  }

  .card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    font-size: 14px;
    cursor: pointer;
  }

  .card.top1 { background: #fff3cd; font-weight: bold; }
  .card.top2 { background: #e2e3e5; }
  .card.top3 { background: #f8d7da; }

  .card .name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
  }

  .card .club {
    color: #555;
    margin-bottom: 8px;
  }

  .card .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
  }

  .card .details {
    display: none;
    margin-top: 10px;
  }

  .card.open .details {
    display: block;
  }
}

.card .place {
  display: inline-block;
  background: #0b1c2d;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: bold;
  margin-bottom: 8px;
}

/* =========================
   LIVE BUTTON
========================= */
.live-button {
  position: fixed;
  top: 20px;
  right: 20px;

  background: #0b1c2d;
  color: #ffffff;

  padding: 12px 18px 12px 16px;
  border-radius: 999px;
  font-weight: bold;
  text-decoration: none;

  display: flex;
  align-items: center;
  gap: 10px;

  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  z-index: 999;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.live-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

.live-button::before {
  content: "";
  width: 10px;
  height: 10px;
  background: #dc2626;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(220,38,38, 0.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(220,38,38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38, 0); }
}

/* =========================
   HEADER
========================= */
.site-header {
  padding: 20px 0;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.header-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  margin-left: 20px;
}

.header-links a:hover {
  text-decoration: underline;
}

/* =========================
   KONTAKT
========================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  margin-top: 50px;
  width: 100%;
}

.contact-block h3 {
  border-bottom: 1px solid #f59e0b;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.contact-block p {
  margin: 6px 0;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.contact-block a {
  color: #f8fafc;
  text-decoration: none;
}

.contact-block a:hover {
  text-decoration: underline;
}

.contact-person {
  cursor: pointer;
  user-select: none;
}

.contact-person:hover {
  opacity: 0.8;
}

.icon {
  margin-right: 6px;
}

/* =========================================================
   ====== NOWE STYLE – TYLKO NADPISANIA (TABLE PAGE) ======
========================================================= */

/* Panel tabeli – granat zamiast białego */
.table-page .table-panel {
  background: linear-gradient(135deg, #0b1c2d 0%, #102a43 100%);
  color: #ffffff;
}

/* Input filtra */
#filterInput {
  width: 100%;
  padding: 12px 14px;
  margin: 20px 0 30px 0;
  border-radius: 8px;
  border: none;
  font-size: 15px;
}

/* Tabele wyników – tylko na stronie tabeli */
.table-page table {
  background: transparent;
}

.table-page th {
  background: #102a43;
  color: #ffffff;
  border-bottom: 1px solid #2a3f55;
}

.table-page td {
  color: #ffffff;
  border-bottom: 1px solid #2a3f55;
}

/* Nagłówki konkurencji */
.table-page h2 {
  margin-top: 50px;
  color: #f1f5f9;
}
/* =========================
   TABLE PAGE 
========================= */

/* panel tabeli */
.table-page .table-panel {
  background: linear-gradient(135deg, #0b1c2d 0%, #102a43 100%);
  color: #ffffff;
}

/* filtr – tylko korekta szerokości */
.table-page #filterInput {
  max-width: 420px;
}

/* tabela – tylko kolory, bez ruszania layoutu */
.table-page th {
  background: #102a43;
  color: #ffffff;
}

.table-page td {
  color: #ffffff;
  border-bottom-color: #2a3f55;
}

/* hover */
.table-page tbody tr:hover {
  background: rgba(255,255,255,0.05);
}

/* TOP 3 */
.table-page tbody tr:nth-child(1) {
  background: linear-gradient(90deg, rgba(255,215,0,0.25), transparent);
  font-weight: bold;
}
.table-page tbody tr:nth-child(2) {
  background: linear-gradient(90deg, rgba(192,192,192,0.25), transparent);
}
.table-page tbody tr:nth-child(3) {
  background: linear-gradient(90deg, rgba(205,127,50,0.25), transparent);
}
/* =========================================================
   ====== INDEX PAGE – KATEGORIE (KOSMETYKA) ======
========================================================= */

/* Sekcje kategorii */
.page .panel .section {
  width: 100%;
  text-align: left;
  margin-bottom: 60px;
  padding-left: 24px;
  border-left: 3px solid rgba(255,255,255,0.15);
}

/* Nagłówki sekcji */
.page .panel .section h2 {
  margin-bottom: 24px;
  color: #f8fafc;
  letter-spacing: 0.5px;
}

/* Karty – wyrównanie do lewej */
.page .panel .cards {
  justify-content: flex-start;
}

/* Kafle kategorii */
.page .panel .split-button {
  background: linear-gradient(135deg, #071a2a 0%, #0b2a45 100%);
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* Górna linia (PL) */
.page .panel .split-button .top {
  background: transparent;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* Dolna linia (EN) */
.page .panel .split-button .bottom {
  background: transparent;
  color: #9fb4c8;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Hover – delikatne podświetlenie */
.page .panel .split-button:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.25),
    0 12px 28px rgba(0,0,0,0.45);
  background: linear-gradient(135deg, #0b2a45 0%, #103a5e 100%);
}

/* Hover – tekst */
.page .panel .split-button:hover .top {
  color: #ffffff;
}

.page .panel .split-button:hover .bottom {
  color: #dbeafe;
}

/* =========================================================
   STARTLIST PAGE
========================================================= */

.startlist-page table {
  background: #ffffff;
  border-radius: 8px;
}

.startlist-page th {
  background: #102a43;
  color: #ffffff;
  border-bottom: 1px solid #2a3f55;
}

.startlist-page td {
  border-bottom: 1px solid #e5e7eb;
}

/* hover */
.startlist-page tbody tr:hover {
  background: #f8fafc;
}

/* tytuł kategorii */
.startlist-page h2 {
  margin-top: 30px;
  margin-bottom: 14px;
}

/* tabs */
.tabs button {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.tabs button:hover {
  background: #f1f5f9;
}

/* ===== DRUK / PDF ===== */
@media print {

  body {
    background: white;
  }

  .site-header,
  .tabs,
  .startlist-actions {
    display: none !important;
  }

  .panel {
    background: white;
    box-shadow: none;
    padding: 0;
  }

  table {
    font-size: 11px;
  }

  tr {
    page-break-inside: avoid;
  }
}
/* =========================================================
   STICKY HEADER – WSZYSTKIE TABELE
========================================================= */

/* jasne tabele */
table thead th {
  background: #eee;
}

/* ciemne tabele wyników */
.table-page thead th {
  background: #102a43;
}

/* tabela wyników (ciemna) */
.table-page table tr:first-child th {
  background: #102a43;
}

#loginBox{
  max-width:400px;
  margin:80px auto;
  padding:30px;
  background:white;
  border-radius:10px;
  text-align:center;
}

#loginBox input{
  width:100%;
  padding:10px;
  margin:10px 0;
}

#loginBox button{
  padding:10px 20px;
  cursor:pointer;
}

.weighted{
  background:#e7f6e7;
}

/* =========================
   STARTLIST FIX
========================= */

.startlist-page thead th{
  background:#102a43;
  color:#ffffff;
  font-weight:600;
  border-bottom:2px solid #2a3f55;
}

.startlist-page tbody tr:nth-child(even){
  background:#f3f4f6;
}

.startlist-page tbody tr:nth-child(odd){
  background:#ffffff;
}

.startlist-page .weighted{
  background:#e7f6e7;
}

.back-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  opacity: 0.9;
  transition: 0.2s;
}

.back-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* =========================
   MOBILE HEADER FIX
========================= */
@media (max-width: 768px) {

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-title {
    font-size: 18px;
    line-height: 1.2;
  }

  .header-links {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .header-links a {
    margin-left: 0;
    font-size: 14px;
    white-space: nowrap;
  }

}

/* =========================
   FIX: WYNIKI MOBILE (TABLE PAGE)
========================= */
@media (max-width: 768px) {

  .table-page .table-panel table {
    display: table !important;
  }

  .table-page .table-panel {
    overflow-x: auto;
    overflow-y: visible; 
  }

  .table-page table {
    min-width: 600px;
  }

}
/* =========================
   STICKY HEADER – FIX
========================= */

.table-page table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}
/* ===== STICKY HEADER FINAL FIX (OSTATECZNY) ===== */

.table-page table {
  border-collapse: separate; 
}

.table-page table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #102a43;
}
.judge-floating {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #c00;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 999;
  transition: 0.2s;
}

.judge-floating:hover {
  background: #a00;
}
