/* Sport widget + sport page (я-нова.рус) */

.sport-widget {
  margin-top: 10px;
}

/* Compact widget for all devices */
.sport-widget .sport-head{ margin-bottom: 6px; }
.sport-widget .sport-head h2{ font-size: 15px; }
.sport-widget .sport-head a{ font-size: 12px; }
.widget-stack{ gap: 8px; }
.match-card{ padding: 10px 12px; }
.match-card.mini{ padding: 8px 10px; }
.match-card.mini .score{ font-size: 18px; }
.match-card .meta{ margin-bottom: 6px; font-size: 11px; }
.match-card .score{ font-size: 22px; padding: 3px 8px; }
.match-card .status{ margin-top: 6px; font-size: 12px; }

@media (max-width: 520px){
  .sport-updated{ display:none; }
  .match-card{ padding: 9px 10px; }
  .match-card .score{ font-size: 20px; }
}

.sport-widget .sport-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sport-widget .sport-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.06em;
}

.sport-widget .sport-head a {
  font-size: 13px;
  opacity: 0.9;
}

.widget-stack{ display:grid; gap: 10px; }

.match-card {
  background: rgba(10, 15, 25, 0.55);
  border: 1px solid rgba(66, 220, 220, 0.22);
  box-shadow: 0 0 0 1px rgba(125, 255, 255, 0.06) inset,
              0 10px 30px rgba(0,0,0,0.35);
  border-radius: 14px;
  padding: 12px 14px;
}

.match-card.mini{ padding: 10px 12px; }
.match-card.mini .score{ font-size: 22px; }

.match-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.match-card .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.match-card .row.two-col{
  grid-template-columns: minmax(0, 1fr) auto;
}

.match-card .teams{ min-width:0; }

.match-card .team{
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.match-card .team.away{ opacity: 0.85; font-weight: 600; }

@media (max-width: 520px){
  .match-card .row{
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }
  .match-card .team, .match-card .team.right{ text-align: center; }
  .match-card .score{ font-size: 24px; }
}

.match-card .team {
  font-weight: 700;
  line-height: 1.2;
}

.match-card .team.right { text-align: right; }

.match-card .score {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-weight: 900;
  font-size: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(66, 220, 220, 0.25);
  background: rgba(0, 255, 255, 0.05);
}

.score-wrap{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
}

.status-chip{
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(130,150,255,.35);
  background:rgba(130,150,255,.12);
  color:#d9e4ff;
}
.status-chip.next{
  border-color: rgba(74,226,162,0.45);
  background: rgba(74,226,162,0.16);
  color: #cffff0;
}
.status-chip.ft{
  border-color: rgba(255,196,75,0.45);
  background: rgba(255,196,75,0.16);
  color: #ffe8b4;
}

.pulse-score{
  animation: pulseGlow 2.2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0 rgba(0,243,255,0.0); }
  50% { box-shadow: 0 0 18px rgba(0,243,255,0.22); }
}

.match-card .status {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.9;
}

.sport-updated {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.7;
}

.sport-filter{
  margin-top: 10px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sport-tab{
  appearance: none;
  border: 1px solid rgba(66, 220, 220, 0.22);
  background: rgba(0, 255, 255, 0.04);
  color: rgba(255,255,255,0.92);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.sport-tab.active{
  border-color: rgba(0,243,255,0.45);
  background: rgba(0,243,255,0.10);
  color: #fff;
}

/* Sport page */

/* Make the sport page wider and cleaner: no 3-column squeeze */
.sport-layout{
  grid-template-columns: 1fr !important;
  max-width: 1100px !important;
}
.sport-layout .left, .sport-layout .right{ display:none !important; }

.sport-page h1 {
  margin: 0 0 12px 0;
}

.sport-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

@media (max-width: 980px) {
  .sport-grid {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(66, 220, 220, 0.18);
}

.sport-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 0;
}

.sport-table th, .sport-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}

/* Tablet/small desktop: hide the least important columns to avoid page-wide scroll */
@media (max-width: 980px){
  /* Hide goals column first */
  .sport-table th:nth-child(7), .sport-table td:nth-child(7){ display:none; }
}

/* iPhone: show only key columns */
@media (max-width: 520px){
  .sport-table th, .sport-table td{ padding: 8px 10px; font-size: 12px; }
  .sport-table th{ letter-spacing: 0.04em; }

  /* Keep: №, Команда, И, О. Hide: В/Н/П and goals */
  .sport-table th:nth-child(4), .sport-table td:nth-child(4),
  .sport-table th:nth-child(5), .sport-table td:nth-child(5),
  .sport-table th:nth-child(6), .sport-table td:nth-child(6),
  .sport-table th:nth-child(7), .sport-table td:nth-child(7){
    display:none;
  }

  /* Match cards already use two-col (teams block + score). Make it a bit tighter. */
  .sport-item .mid.two-col{ gap: 12px; }
}

.sport-table th {
  text-align: left;
  opacity: 0.85;
  font-weight: 700;
}

.sport-table tr:hover td {
  background: rgba(0, 255, 255, 0.03);
}

.sport-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sport-table td:nth-child(2){ white-space: nowrap; }
@media (max-width: 520px){
  .sport-table td:nth-child(2){ white-space: normal; }
}

.sport-list {
  display: grid;
  gap: 10px;
}

.sport-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(66, 220, 220, 0.18);
  background: rgba(10, 15, 25, 0.45);
}

.sport-item .top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.sport-item .mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

/* New layout for match cards: teams block + score */
.sport-item .mid.two-col{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.sport-item .teams{
  min-width: 0;
}

.sport-item .team{
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sport-item .team.away{
  opacity: 0.85;
  font-weight: 600;
}

.sport-item .mid .score {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-weight: 900;
  font-size: 18px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(66, 220, 220, 0.25);
  background: rgba(0, 255, 255, 0.04);
}

.sport-item .mid .team.right { text-align: right; }

/* WOW tuning */
.sport-page,
.sport-page + .panel,
.sport-page + .panel + .panel {
  position: relative;
  overflow: hidden;
}

.sport-page::before,
.sport-page + .panel::before,
.sport-page + .panel + .panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: 16px;
  background: radial-gradient(1200px 280px at 10% -30%, rgba(0,243,255,0.12), transparent 45%),
              radial-gradient(900px 240px at 90% -40%, rgba(192,77,255,0.10), transparent 48%);
}

.sport-filter {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.sport-tab {
  transition: all .2s ease;
}
.sport-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(0,243,255,0.42);
  box-shadow: 0 6px 20px rgba(0,243,255,0.15);
}

.comp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,243,255,0.09);
  border: 1px solid rgba(0,243,255,0.2);
  color: #d4fdff;
  letter-spacing: .02em;
}

.sport-item {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sport-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0,243,255,0.35);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,243,255,0.16) inset;
}

.sport-item.is-upcoming-soon {
  border-color: rgba(74,226,162,0.45);
  background: linear-gradient(180deg, rgba(74,226,162,0.08), rgba(10,15,25,0.45));
  box-shadow: 0 0 0 1px rgba(74,226,162,0.2) inset, 0 10px 30px rgba(0,0,0,0.35);
}

.sport-item.is-latest {
  border-color: rgba(255,196,75,0.45);
  background: linear-gradient(180deg, rgba(255,196,75,0.08), rgba(10,15,25,0.45));
}

.sport-table tr.arsenal-row td {
  background: rgba(239,1,7,0.10);
  border-bottom-color: rgba(239,1,7,0.22);
  font-weight: 700;
}

.sport-table tr.top4-row td:nth-child(1),
.sport-table tr.top4-row td:nth-child(8) {
  color: #91f8ff;
  font-weight: 700;
}

.sport-table tr.arsenal-row td:nth-child(1),
.sport-table tr.arsenal-row td:nth-child(8) {
  color: #ffdada;
}
