/* Matchday in home: prossime partite con conto alla rovescia */
.matchday, .matchday.dark-section { background: linear-gradient(180deg, #120207 0%, #0d0d14 100%); border-top: 1px solid rgba(197, 0, 15, .25); border-bottom: 1px solid rgba(197, 0, 15, .25); }
.matchday-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.md-card { position: relative; background: linear-gradient(160deg, #1d1820, #141019); border: 1px solid rgba(197, 0, 15, .3); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.md-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--red), var(--yellow)); }
.md-card[data-state="live"] { border-color: #ef4444; box-shadow: 0 0 0 1px rgba(239, 68, 68, .4), 0 12px 40px rgba(239, 68, 68, .2); }
.md-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.md-cat { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #cbd5e1; }
.md-badge { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(245, 192, 0, .15); color: var(--yellow); white-space: nowrap; }
.md-card[data-state="live"] .md-badge { background: #ef4444; color: #fff; }
.md-card[data-state="waiting"] .md-badge { background: rgba(148, 163, 184, .2); color: #cbd5e1; }
.md-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; text-decoration: none; }
.md-team { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.md-logo { width: 64px; height: 64px; border-radius: 50%; background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.md-logo img { width: 100%; height: 100%; object-fit: contain; }
.md-name { font-weight: 900; font-size: 15px; color: #f1f5f9; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.md-name.is-ours { color: var(--yellow); }
.md-center { text-align: center; }
.md-vs { font-weight: 900; font-size: 22px; color: #64748b; letter-spacing: .05em; }
.md-card[data-state="live"] .md-vs { color: #ef4444; }
.md-score { font-weight: 900; font-size: 34px; color: #fff; font-variant-numeric: tabular-nums; }
.md-clock { text-align: center; color: #e2e8f0; font-weight: 700; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.md-count { font-variant-numeric: tabular-nums; font-size: 34px; line-height: 1; color: #fff; }
.md-count b { font-weight: 900; }
.md-count small { font-size: 15px; color: var(--yellow); font-weight: 800; margin: 0 4px 0 1px; }
.md-count-label { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #94a3b8; font-weight: 700; }
.md-live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; margin-right: 6px; animation: md-pulse 1.2s ease-in-out infinite; vertical-align: middle; }
@keyframes md-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .md-live-dot { animation: none; } }
.md-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 13px; color: #94a3b8; text-align: center; }
.md-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.md-actions a { text-align: center; padding: 9px 6px; border-radius: 12px; font-size: 13px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); text-decoration: none; }
.md-actions a:hover { background: rgba(197, 0, 15, .35); }
.md-actions a:focus-visible, .md-teams:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
@media (max-width: 400px) { .md-logo { width: 54px; height: 54px; } .md-count { font-size: 28px; } }
.md-live { display: inline-flex; align-items: center; font-size: 18px; font-weight: 900; color: #fff; }

/* Diretta: marcatori e animazione del gol */
.md-goals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 13px; color: #e2e8f0; }
.md-goals:empty { display: none; }
.md-goal { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-goal--home { grid-column: 1; text-align: right; }
.md-goal--away { grid-column: 2; text-align: left; }
.md-goal b { color: var(--yellow); font-weight: 800; }
.md-goal-flash { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle, rgba(197, 0, 15, .92), rgba(10, 0, 0, .95)); color: #fff; animation: md-goal-in .35s ease-out; }
.md-goal-flash[hidden] { display: none; }
.md-goal-flash strong { font-size: 64px; font-weight: 900; letter-spacing: .04em; color: var(--yellow); text-shadow: 0 6px 30px rgba(0, 0, 0, .6); animation: md-goal-pop .6s ease-out; }
.md-goal-flash span { font-size: 20px; font-weight: 800; }
@keyframes md-goal-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes md-goal-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .md-goal-flash, .md-goal-flash strong { animation: none; } }
.md-card[data-state="finished"] .md-badge { background: rgba(34, 197, 94, .18); color: #4ade80; }
.match-live { max-width: 560px; margin: 0 auto 24px; }

/* Elenco partite: campionato per esteso e pallino rosso nel menu durante la diretta */
.match-cat { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; font-size: 13px; min-width: 0; }
.match-cat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.match-cat-name { font-weight: 800; color: #fff; }
.match-cat-day { color: #94a3b8; }
.nav-live { position: relative; }
.nav-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-left: 6px; vertical-align: middle; animation: md-pulse 1.2s ease-in-out infinite; }
.nav-item .nav-live-dot { position: absolute; top: 6px; right: calc(50% - 18px); margin: 0; }
@media (prefers-reduced-motion: reduce) { .nav-live-dot { animation: none; } }

/* Barra "In diretta" sotto il menu: una riga, scorre di lato se le partite non ci stanno */
.live-bar { background: linear-gradient(90deg, #7a0510, #2a0308); border-bottom: 1px solid rgba(239, 68, 68, .45); }
.live-bar-inner { display: flex; align-items: center; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-block: 8px; }
.live-bar-inner::-webkit-scrollbar { display: none; }
.live-bar-label { display: inline-flex; align-items: center; flex-shrink: 0; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.live-bar-item { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .14); font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; white-space: nowrap; }
.live-bar-item:hover { background: rgba(0, 0, 0, .55); }
.live-bar-item:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.live-bar-item .is-ours { color: var(--yellow); }
.live-bar-cat { font-size: 11px; font-weight: 800; color: #cbd5e1; }
.live-bar-score { font-size: 15px; font-weight: 900; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); font-variant-numeric: tabular-nums; }
.live-bar-minute { font-size: 12px; color: #fca5a5; font-variant-numeric: tabular-nums; }
.live-bar-go { font-size: 12px; font-weight: 900; color: var(--yellow); }
@media (max-width: 480px) { .live-bar-label { font-size: 0; } .live-bar-label .md-live-dot { margin-right: 0; } .live-bar-go, .live-bar-cat { display: none; } }
