:root{
  --bg:#0b0b0d;
  --panel:#111114;
  --panel2:#15151a;
  --text:#ffffff;
  --muted:#b3b3b3;
  --line: rgba(255,255,255,0.08);
  --line2: rgba(255,255,255,0.14);
  --red:#c4161c;
  --red-soft: rgba(196,22,28,.15);
  --shadow: 0 12px 30px rgba(0,0,0,.55);
  --radius: 14px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color:var(--text);
}

.container{
  max-width:1240px;
  margin:24px auto;
  padding:0 14px 24px;
}

/* ===== HEADER ===== */
.site-header{
  background:#fff;
  border-bottom:1px solid #e5e5e5;

  /* ✅ FULL WIDTH FIX */
  width: 100%;
  max-width: none;
  margin: 0;
}

.header-inner{
  max-width:1240px;
  margin:0 auto;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:nowrap; /* mobilon se törjön */
}

.header-left{
  display:flex;
  align-items:center;
  gap:12px;
  flex: 0 0 auto;
}

.logo-main{
  height:120px;
  width:auto;
  object-fit:contain;
}

.logo-cup{
  height:110px;
  width:auto;
  object-fit:contain;
}

.header-right{
  display:flex;
  align-items:center;
  flex: 0 0 auto;
}

.admin-link{
  color:#000;
  text-decoration:none;
  font-weight:800;
  letter-spacing:.3px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #e5e5e5;
  background:#fff;
  transition: .15s ease;
}

.admin-link:hover{
  border-color: var(--red);
  color: var(--red);
}

/* mobilon is egy sor maradjon: arányosan kisebb képek */
@media (max-width: 640px){
  .header-inner{ gap:10px; }
  .logo-main{ height:60px; }
  .logo-cup{ height:60px; }
  .admin-link{ padding:8px 10px; font-size:13px; }
}

/* ===== PIROS ACCENT SÁVOK ===== */
.accent-bar{
  height:6px;
  background: var(--red);

  /* ✅ FULL WIDTH FIX */
  width: 100%;
  max-width: none;
  margin: 0;
}
.footer-accent-bar{
  height:6px;
  background: var(--red);

  /* ✅ FULL WIDTH FIX */
  width: 100%;
  max-width: none;
  margin: 0;
}

/* ===== LAYOUT ===== */
.layout{
  display:grid;
  grid-template-columns:1fr 380px;
  gap:14px;
  align-items:start;
}
@media(max-width:980px){
  .layout{ grid-template-columns:1fr; }
}

/* ===== CARDS ===== */
.card{
  background:linear-gradient(180deg, var(--panel2), var(--panel));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.card-header{
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.card-title{
  font-size:14px;
  font-weight:700;
  letter-spacing:.3px;
  text-transform:uppercase;
}

.card-body{ padding:12px 14px; }

/* ===== Tabella header: 1 sor mobilon is ===== */
.tabella-header{ flex-wrap:nowrap; }
.tabella-header .card-title{ white-space:nowrap; }

.tabella-header-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:nowrap;
}

select{
  background:#000;
  color:#fff;
  border:1px solid var(--line2);
  border-radius:10px;
  padding:8px 10px;
}

td:last-child{
  background: rgba(196,22,28,.08);
  font-weight: 800;
}

@media (max-width: 640px){
  .tabella-header-right select{
    padding:6px 8px;
    font-size:12px;
    max-width:150px;
  }
}

.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--red-soft);
  border:1px solid rgba(196,22,28,.4);
}

.muted{ color:var(--muted); font-size:12px; }

/* ===== TABLE ===== */
.table-wrap{ overflow:auto; -webkit-overflow-scrolling: touch; }

table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}

thead th{
  position:sticky;
  top:0;
  background:#000;
  color:var(--muted);
  font-size:12px;
  padding:10px;
  border-bottom:1px solid var(--line);
  text-align:center;
  z-index: 5;
}

tbody td{
  padding:10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  text-align:center;
  font-size:13px;
}

tbody tr:hover{ background:rgba(196,22,28,.08); }

td.name{
  text-align:left;
  min-width:180px;
}

button.link{
  background:none;
  border:none;
  color:#fff;
  cursor:pointer;
  font:inherit;
}
button.link:hover{ color:var(--red); text-decoration:underline; }

.rank{
  display:inline-flex;
  width:26px;
  height:26px;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:#000;
  border:1px solid var(--line);
  font-weight:700;
  font-size:12px;
}
.rank.top1{ border-color:var(--red); background:var(--red-soft); }
.rank.top2{ border-color:#aaa; }
.rank.top3{ border-color:#777; }

/* ===== PLAYER CARD KV ===== */
.kv{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px 10px;
  margin-top:10px;
  font-size:13px;
}

/* ===== MATCHES ===== */
.roundbar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

.btn{
  background:#000;
  border:1px solid var(--line2);
  color:#fff;
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
}
.btn:hover{ border-color:var(--red); background:var(--red-soft); }
.btn:disabled{ opacity:.4; }

.match{
  background:#000;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  margin:10px 0;
}
.match-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
}
.score{ font-weight:800; letter-spacing:.5px; }
.teams{ font-size:13px; margin-top:6px; }
.teams span{ color:var(--muted); }

/* ===== FORM ===== */
.form-row{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.form-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 8px;
}
.form{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.form-badge{
  width: 30px;
  height: 30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.04);
  font-weight: 800;
}
.form-badge.win{
  border-color: rgba(196,22,28,.65);
  background: rgba(196,22,28,.22);
}
.form-badge.draw{
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}
.form-badge.loss{
  border-color: rgba(196,22,28,.35);
  background: rgba(0,0,0,.25);
  opacity: .9;
}
.form-empty{ color: var(--muted); font-size: 12px; }

/* ===== FOOTER (ÚJ elrendezés) ===== */
.site-footer{
  background:#fff;
  border-top:1px solid #e5e5e5;

  /* ✅ FULL WIDTH FIX */
  width: 100%;
  max-width: none;
  margin: 0;
}

.footer-inner{
  max-width:1240px;
  margin:0 auto;
  padding:12px 14px;
  height:170px;              /* FIX: a sáv mérete stabil */
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

/* BAL OLDAL */
.footer-left{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width: 0;
}

.footer-title{
  color:#000;
  font-weight:800;
  font-size:14px;
  letter-spacing:.2px;
}

.footer-partners{
  display:flex;
  align-items:center;
  gap:10px;
}

.partner-logo{
  height:130px;
  width:auto;
  object-fit:contain;
}

/* JOBB OLDAL */
.footer-right{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex: 0 0 auto;
}

/* Nagyobb, de a sávon belül marad */
.footer-players{
  height:100%;
  max-height:100%;  /* ✅ fix (max-height:flex hibás volt) */
  width:auto;
  object-fit:contain;
}

/* ===== MOBILE ===== */
@media (max-width: 640px){
  .table-wrap{ overflow-x:hidden; }

  table{
    width:100%;
    min-width:0;
    table-layout:fixed;
  }

  th:nth-child(1), td:nth-child(1){ width:44px; }
  th:nth-child(2), td:nth-child(2){ width:auto; }
  th:nth-child(3), td:nth-child(3){ width:56px; }
  th:nth-child(9), td:nth-child(9){ width:60px; }
  th:nth-child(10), td:nth-child(10){ width:56px; }

  th:nth-child(4), td:nth-child(4){ display:none; }
  th:nth-child(5), td:nth-child(5){ display:none; }
  th:nth-child(6), td:nth-child(6){ display:none; }
  th:nth-child(7), td:nth-child(7){ display:none; }
  th:nth-child(8), td:nth-child(8){ display:none; }

  td.name{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .rank{ width:22px; height:22px; border-radius:7px; font-size:11px; }

  .roundbar{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .roundbar #roundSelect{ grid-column:1 / -1; }
  .roundbar #prevRoundBtn,
  .roundbar #nextRoundBtn{ width:100%; }

  .match-top{ flex-direction:column; align-items:flex-start; }

  /* Footer mobil */
  .footer-inner{
    height:110px;            /* sáv marad */
    padding:10px 12px;
    gap:10px;
  }
  .footer-title{
    font-size:12px;
  }
  .partner-logo{
    height:50px;
  }
  .footer-players{
    height:100%;
  }
}

tr.updated{
  animation: flash 1.2s ease;
}

@keyframes flash{
  0%{ background: rgba(196,22,28,.35); }
  100%{ background: transparent; }
}

/* =========================
   NEWS / ÜZENŐFAL – KIEMELT (STRONG)
   ========================= */

.news-wall{
  background:
    linear-gradient(180deg, rgba(196,22,28,.18), rgba(0,0,0,.85) 40%);
  border: 1px solid rgba(196,22,28,.6);
  border-radius: 16px;
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;

  box-shadow:
    0 18px 45px rgba(0,0,0,.75),
    0 0 0 1px rgba(196,22,28,.25),
    0 0 40px rgba(196,22,28,.45);
}

/* erős bal oldali piros sáv */
.news-wall::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width: 7px;
  background: linear-gradient(
    180deg,
    rgba(255,80,80,1),
    rgba(196,22,28,.9)
  );
}

/* pulzáló felső fénycsík */
.news-wall::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height: 2px;
  background: rgba(255,255,255,.18);
  animation: newsGlow 3.5s ease-in-out infinite;
}

/* fejléc */
.news-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.news-title b{
  display:flex;
  align-items:center;
  gap:12px;
  letter-spacing:.35px;
  font-size: 14px;
  text-transform: uppercase;
}

/* “BREAKING” pont */
.news-title b::before{
  content:"";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ff4d4d;
  box-shadow:
    0 0 0 6px rgba(196,22,28,.35),
    0 0 22px rgba(255,80,80,.9);
  animation: pulseDot 2.2s ease-in-out infinite;
}

/* dátum / meta */
.news-meta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,80,80,.6);
  background: rgba(196,22,28,.22);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* szöveg – nagyobb, hangsúlyosabb */
.news-body{
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* üres állapot */
.news-empty{
  color: rgba(255,255,255,.7);
  font-size: 13px;
}

/* animációk */
@keyframes pulseDot{
  0%{ transform: scale(1); opacity: 1; }
  50%{ transform: scale(1.15); opacity: .85; }
  100%{ transform: scale(1); opacity: 1; }
}

@keyframes newsGlow{
  0%{ opacity:.25; }
  50%{ opacity:.7; }
  100%{ opacity:.25; }
}

/* mobil finomhangolás */
@media (max-width: 640px){
  .news-wall{
    padding: 14px 14px 12px;
  }
  .news-body{
    font-size: 15px;
  }
}


/* =========================
   FIX: LANDSCAPE PHONE OVERFLOW
   ========================= */

/* 1) Mindent tartsunk a viewporton belül */
html, body { overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }

/* 2) Ha keskeny a kijelző (pl. telefon landscape), ne legyen 2 oszlopos layout */
@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
}

/* 3) Táblázat: ne feszítsen oldalszélességet (landscape telefonon is) */
@media (max-width: 920px), (max-height: 520px){
  .table-wrap{
    overflow-x: auto;                /* a táblázat görgessen, ne az oldal */
    -webkit-overflow-scrolling: touch;
  }

  table{
    min-width: 0 !important;         /* ✅ ez szünteti meg a kilógást */
    width: 100%;
    table-layout: fixed;
  }

  /* Landscape mobilon is a kompakt oszlopok maradjanak: #, Név, M, GK, P */
  th:nth-child(4), td:nth-child(4),
  th:nth-child(5), td:nth-child(5),
  th:nth-child(6), td:nth-child(6),
  th:nth-child(7), td:nth-child(7),
  th:nth-child(8), td:nth-child(8){ display:none; }

  th:nth-child(1), td:nth-child(1){ width: 44px; }
  th:nth-child(3), td:nth-child(3){ width: 56px; }
  th:nth-child(9), td:nth-child(9){ width: 60px; }
  th:nth-child(10), td:nth-child(10){ width: 56px; }

  td.name{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 4) Kártyák/üzenőfal ne tudjon “szélesedni” hosszú szövegtől */
.card, .news-wall { max-width: 100%; }
.news-body{
  overflow-wrap: anywhere;
  word-break: break-word;
}


