/* Stili pagine dirette — usa layout marketing + marketing.css */
.live-main {
  overflow-x: clip;
}

.live-main .wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* Player contenuto: stesso aspetto su diretta e replay (non full-screen). */
.live-main .live-player-wrap {
  position: relative;
  width: min(100%, 900px, calc(50vh * 16 / 9));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  contain: layout style paint;
  isolation: isolate;
}

.live-main .live-player-wrap video,
.live-main .live-player-wrap .live-player-embed {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  border-radius: 0;
  display: block;
  border: 0;
}

.live-main .live-player-wrap--embed {
  background: #000;
}

/* Sovraimpressioni chiare sul video (copertina scura). */
.live-main .live-player-overlays {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.live-main .live-ovl-badge {
  position: absolute;
  top: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.live-main .live-ovl-badge--right {
  right: 12px;
  left: auto;
}

.live-main .live-status-msg {
  margin: 12px 0 0;
  color: #f5f5f5;
  font-size: 0.95rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.live-main .live-status-msg[hidden] {
  display: none !important;
}

.live-main .live-play-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: rgba(229, 57, 53, 0.92);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.live-main .live-play-hint[hidden] {
  display: none;
}

.live-main .live-cover-veil {
  z-index: 4;
}

.live-main .live-cover-veil__hint {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Messaggio pausa sopra il video: la copertina brand è nello stream HLS (MediaMTX). */
.live-main .live-cover-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 14%;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.live-main .live-cover-veil[hidden] {
  display: none !important;
}

.live-main .live-cover-veil.is-active {
  opacity: 1;
}

.live-main .live-cover-veil__hint {
  margin: 0;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.live-main .badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.live-main .badge-live { background: #e53935; color: #fff; }
.live-main .badge-on-air { background: #2e7d32; color: #fff; }
.live-main .badge-wait { background: rgba(0, 0, 0, 0.65); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.live-main .badge-connecting { background: #f57c00; color: #fff; }
.live-main .badge-ended { background: #374151; color: #ddd; }

.live-main .stream-ended {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  margin: 0;
  background: linear-gradient(160deg, #14141c 0%, #0a0a0e 100%);
  border: none;
  border-radius: 0;
}

.live-main .stream-ended-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.85;
}

.live-main .stream-ended h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  color: #fff;
}

.live-main .stream-ended p {
  margin: 0 0 8px;
  color: #aaa;
  font-size: 0.95rem;
}

.live-main .stream-ended-meta { color: #888; font-size: 0.85rem; }
.live-main .stream-ended-hint { margin-top: 12px !important; }
.live-main .stream-ended-btn { margin-top: 20px; display: inline-block; }

.live-main .scoreboard { margin: 12px 0 16px; }

.live-main .sets-line {
  font-size: 0.95rem;
  color: #f5c542;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}

.live-main .partials-line {
  font-size: 0.88rem;
  color: #9ecbff;
  margin: 0 0 4px;
}

.live-main .partials-line[hidden] { display: none; }

.live-main .score { font-size: 1.5rem; font-weight: 700; margin: 0; }

.live-main h1 { font-size: 1.35rem; margin: 0 0 8px; }

.live-main h2.page-subtitle {
  font-size: 1.1rem;
  margin: 0 0 16px;
  font-weight: 600;
  color: #ccc;
}

.live-main .search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.live-main .search-form input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #14141c;
  color: #fff;
  font-size: 1rem;
}

.live-main .search-form input[type="search"]:focus {
  outline: none;
  border-color: #e53935;
}

.live-main .live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.live-main .live-card {
  background: #14141c;
  border: 1px solid #2a2a36;
  border-radius: 14px;
  padding: 18px;
  transition: border-color 0.15s, transform 0.15s;
}

.live-main .live-card:hover {
  border-color: #e53935;
  transform: translateY(-2px);
}

.live-main .live-card h3,
.live-main .live-card .live-card__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.live-main .live-card__club {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e53935;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.live-main .live-card__matchup {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.live-main .live-page-heading {
  margin: 0 0 12px;
}

.live-main .live-page-heading__club {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e53935;
}

.live-main .live-page-heading__matchup {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2;
}

.live-main .live-card .meta {
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.live-main .live-card .card-score { margin: 0 0 10px; font-size: 0.9rem; }

.live-main .live-card .card-sets {
  display: block;
  color: #f5c542;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.live-main .live-card .card-partials {
  display: block;
  color: #9ecbff;
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.live-main .live-card .card-points {
  font-weight: 700;
  font-size: 1.1rem;
}

.live-main .live-card .badges { margin-bottom: 14px; }

.live-main .live-card .btn-watch {
  width: 100%;
  background: #e53935;
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  display: block;
  text-decoration: none;
}

.live-main .live-card .btn-watch:hover {
  background: #c62828;
  text-decoration: none;
  color: #fff;
}

.live-main .empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #14141c;
  border-radius: 14px;
  border: 1px dashed #2a2a36;
  color: #aaa;
}

.live-main .back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: #aaa;
  font-size: 0.9rem;
}

.live-main .results-hint {
  color: #888;
  font-size: 0.9rem;
  margin: -12px 0 20px;
}

.live-main .section-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}

.live-main .section-heading--spaced {
  margin-top: 32px;
}

.live-main .badge-scheduled {
  background: #1565c0;
  color: #fff;
}

.live-main .live-card--upcoming {
  border-color: #2a3a4a;
}

.live-main .live-card--upcoming:hover {
  border-color: #1565c0;
  transform: none;
}

.live-main .upcoming-when {
  font-size: 1rem;
  font-weight: 600;
  color: #9ecbff;
  margin: 0 0 12px;
}

.live-main .empty-state--soft {
  margin-top: 28px;
  padding: 28px 24px;
  text-align: left;
}

.live-main .empty-state--soft p {
  margin: 0 0 10px;
  color: #bbb;
}

.live-main .empty-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  margin-top: 8px;
  align-items: start;
}

@media (max-width: 860px) {
  .live-main .empty-hero {
    grid-template-columns: 1fr;
  }
}

.live-main .empty-hero-copy h2 {
  font-size: 1.35rem;
  margin: 0 0 12px;
  color: #fff;
}

.live-main .empty-hero-copy > p {
  color: #aaa;
  margin: 0 0 16px;
  line-height: 1.5;
}

.live-main .empty-hero-list {
  margin: 0 0 20px;
  padding-left: 1.2rem;
  color: #aaa;
  line-height: 1.6;
}

.live-main .empty-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.live-main .demo-live-card {
  background: #14141c;
  border: 1px dashed #333;
  border-radius: 14px;
  padding: 16px;
}

.live-main .demo-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin: 0 0 12px;
}

.live-main .live-card--demo {
  opacity: 0.92;
  pointer-events: none;
}

.live-main .btn-watch--demo {
  cursor: default;
  opacity: 0.85;
}

.live-main .replay-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
}

.live-main .replay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.live-main a.replay-card {
  display: block;
  text-decoration: none;
  color: #eee;
  background: #14141c;
  border: 1px solid #2a2a36;
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.live-main a.replay-card:hover {
  border-color: #e53935;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  color: #fff;
  text-decoration: none;
}

.live-main .replay-card__media {
  position: relative;
  background: #0a0a0e;
}

.live-main .replay-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
  display: block;
  vertical-align: middle;
}

.live-main .replay-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  background: linear-gradient(145deg, #1a1a24 0%, #0d0d12 100%);
}

.live-main .replay-card__placeholder-icon {
  font-size: 2rem;
  color: #444;
}

.live-main .replay-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(229, 57, 53, 0.92);
  color: #fff;
  font-size: 1.1rem;
  line-height: 52px;
  text-align: center;
  padding-left: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.live-main .replay-card__duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.live-main .replay-card__body {
  padding: 12px 14px 14px;
}

.live-main .replay-card__title {
  display: block;
  font-size: 1rem;
  margin: 0 0 6px;
  color: #fff;
  line-height: 1.3;
}

.live-main .replay-card__meta {
  margin: 0;
  font-size: 0.85rem;
  color: #999;
}

.live-main .replay-card__meta--sub {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #777;
}

.live-main .replay-show__meta-line {
  margin: 14px 0 0;
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.5;
}

.live-main .replay-show__meta-line a {
  color: #e53935;
}

.live-main .replay-show__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.live-main .replay-filter-form {
  margin: 12px 0 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.live-main .replay-filter-form .input {
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #14141c;
  color: #fff;
}
