:root{
  --bg:#0b0c0f;
  --card:#141622;
  --line:#23263a;
  --text:#f2f3f5;
  --muted:#a9adba;
  --accent:#7dd3fc;
}

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

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{
  color:inherit;
  text-decoration:none;
}

/* LAYOUT */
.wrap{
  max-width:960px;
  margin:0 auto;
  padding:16px;
}

/* HEADER */
.top{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(11,12,15,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}

.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}

.logo{
  width:36px;
  height:36px;
  display:block;
  object-fit:contain;
}

.brand-text{
  font-size:16px;
}

/* NAV */
.nav{
  display:flex;
  gap:14px;
}

.nav a{
  color:var(--muted);
  font-size:14px;
}

.nav a:hover{
  color:var(--text);
}

/* CARD */
.card{
  position:relative;           /* 🔑 FIX */
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  margin:12px 0;
  overflow:hidden;             /* 🔑 FIX */
}

/* META */
.meta{
  color:var(--muted);
  font-size:13px;
}

/* SCORE BLOCK (shared) */
.score-block{
  text-align:center;
  background:transparent;      /* 🔑 FIX */
}

.teams{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:800;
  font-size:18px;
  letter-spacing:.6px;
}

.team{
  padding:4px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:transparent;
}

.team.beli{
  color:#f2f3f5;
  background:rgba(255,255,255,.04);
}

.team.plavi{
  color:#bed8ff;                    
  background:rgba(180,225,255,0.12);
}


.vs{
  color:var(--muted);
}

/* SCORE */
.score{
  font-weight:900;
  letter-spacing:1px;
}

.score.center{
  font-size:34px;
  margin:6px 0 2px;
}

/* COMPACT (main page) */
.score-block.compact{
  margin-bottom:6px;
}

.score.center.compact{
  font-size:30px;
}

/* IMAGE */
.thumb{
  display:block;
  width:100%;
  max-height:220px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid var(--line);
  margin-top:10px;
}

/* FOOTER */
.foot{
  border-top:1px solid var(--line);
  color:var(--muted);
  margin-top:32px;
}

/* MOBILE */
@media (max-width:420px){
  .brand-text{
    font-size:14px;
    max-width:160px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}


.card{
  position:relative;
  overflow:hidden;
}

/* content BELOW */
.card > :not(.card-link){
  position:relative;
  z-index:1;
}

/* invisible link ON TOP */
.card-link{
  position:absolute;
  inset:0;
  z-index:10;
  display:block;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Player hero layout */
.player-hero{
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* Player main photo — moderate size on all devices */
.player-cover{
  width:100%;
  max-width:300px;          /* НЕ раздувается на больших экранах */
   height:auto;
  max-height:42vh;          /* НЕ занимает весь экран на мобиле */
  object-fit:cover;
  border-radius:8px;
  border:1px solid var(--line);
  display:block;
  margin:0 auto;            /* центрируем */
}

/* Desktop: photo on the left, compact */
@media (min-width:720px){
  .player-hero{
    flex-direction:row;
    align-items:flex-start;
  }

  .player-cover{
    max-width:220px;        /* компактнее на десктопе */
    max-height:none;        /* высота уже ограничена шириной */
    margin:0;               /* слева, не по центру */
  }
}


.player-cover.ph{
  background:linear-gradient(135deg, rgba(180,225,255,.18), rgba(255,255,255,.06));
  border:1px solid var(--line);
}

.player-info{min-width:0}
.player-name{
  font-weight:900;
  font-size:18px;
  margin-bottom:8px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.chip{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  font-size:12px;
}

/* FORCE avatar size in players list */
img.avatar{
  width:48px !important;
  height:48px !important;
  min-width:48px !important;
  min-height:48px !important;
  max-width:48px !important;
  max-height:48px !important;
  object-fit:cover !important;
  border-radius:10px !important;
  display:block !important;
  flex:0 0 48px !important;
}


/* ===== Player gallery (responsive) ===== */

.gallery{
  display:grid;
  grid-template-columns: repeat(2, 1fr); /* mobile: 2 per row */
  gap:10px;
}

.gallery .g-item{
  display:block;
  width:100%;
}

.gallery img{
  width:100%;
  aspect-ratio:1 / 1;       /* аккуратные квадраты */
  object-fit:cover;
  border-radius:12px;
  border:1px solid var(--line);
  display:block;
}

/* tablet */
@media (min-width:600px){
  .gallery{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* desktop */
@media (min-width:900px){
  .gallery{
    grid-template-columns: repeat(4, 1fr);
  }
}

table{
  border-collapse: collapse;
  width: 100%;
}

th, td{
  padding: 10px 5px;
}

.avatar.round{
  width:50px;
  height:50px;
  min-width:50px;
  min-height:50px;
  max-width:50px;
  max-height:50px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid var(--line);
  flex:0 0 50px;
}

.score-accent{
  font-size: 1.15em;              /* чуть крупнее основного текста */
  font-weight: 900;
  color: #e06a6a;                 /* мягкий красноватый */
  letter-spacing: 0.5px;
  margin: 0 6px;
}

.btn{
  background: transparent;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  margin-right:6px;
}
.btn:hover{ background:#f1f1f1; }
.btn.beli{ 
    color:#f1f1f1;
}
.btn.plavi {
  color:#70a2f1;
}






