:root {
  --etoc-blue: #0f607c;
  --etoc-blue-dark: #083f56;
  --etoc-blue-light: #acd2e4;
  --etoc-green: #78934f;
  --etoc-green-dark: #3f6024;
  --etoc-orange: #f5a01f;
  --ink: #103040;
  --muted: #617782;
  --surface: #ffffff;
  --surface-soft: #eef5f7;
  --danger: #e8383f;
  --shadow: 0 24px 60px rgba(5, 44, 59, .18);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(160deg, #f7fbfc 0%, #edf6f7 45%, #e8f0e2 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, a { font: inherit; }

a { color: inherit; }

.background-shape {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  opacity: .95;
  filter: saturate(.95);
}

.background-shape--one {
  width: 550px;
  height: 760px;
  right: -250px;
  top: 80px;
  border-radius: 180px 0 0 180px;
  background: var(--etoc-green);
  transform: rotate(8deg);
}

.background-shape--two {
  width: 360px;
  height: 640px;
  left: -220px;
  bottom: -160px;
  border-radius: 0 160px 160px 0;
  background: var(--etoc-blue-light);
  transform: rotate(-12deg);
}

.site-header {
  padding: 16px 20px 0;
}

.site-header__inner {
  width: min(1500px, 100%);
  min-height: 96px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 40px rgba(5, 44, 59, .12);
  backdrop-filter: blur(12px);
}

.brand img {
  display: block;
  width: min(520px, 52vw);
  max-height: 78px;
  object-fit: contain;
  object-position: left center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--etoc-blue-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
}

.live-badge__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4248;
  box-shadow: 0 0 0 0 rgba(255, 66, 72, .65);
  animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
  70% { box-shadow: 0 0 0 9px rgba(255, 66, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 66, 72, 0); }
}

.language-switch {
  padding: 10px 13px;
  border: 1px solid rgba(15,96,124,.18);
  border-radius: 999px;
  color: var(--etoc-blue-dark);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.language-switch__active {
  color: var(--etoc-orange);
}

.page {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 30px 20px 54px;
}

.event-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 32px 8px 26px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--etoc-orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.event-intro h1 {
  max-width: 900px;
  margin: 0;
  color: var(--etoc-blue-dark);
  font-size: clamp(30px, 5vw, 64px);
  line-height: .98;
  letter-spacing: -.045em;
}

.event-intro__meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 750;
  letter-spacing: .08em;
}

.event-intro__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.button--accent {
  color: #102e38;
  background: var(--etoc-orange);
}

.button--ghost {
  border: 1px solid rgba(15,96,124,.22);
  color: var(--etoc-blue-dark);
  background: rgba(255,255,255,.72);
}

.day-tabs {
  display: flex;
  gap: 9px;
  padding: 8px;
  overflow-x: auto;
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  scrollbar-width: thin;
}

.day-tab {
  min-width: 112px;
  padding: 13px 15px;
  border: 0;
  border-radius: 13px;
  color: var(--etoc-blue-dark);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
  white-space: nowrap;
}

.day-tab:hover {
  background: rgba(172,210,228,.45);
}

.day-tab.active {
  color: #fff;
  background: var(--etoc-blue);
  box-shadow: 0 10px 20px rgba(15,96,124,.24);
}

.day-heading {
  margin: 22px 0;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    linear-gradient(115deg, var(--etoc-green-dark), var(--etoc-green) 72%, #87a45c);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.day-heading::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 320px;
  right: -90px;
  top: -100px;
  border-radius: 90px;
  background: var(--etoc-orange);
  transform: rotate(25deg);
  opacity: .92;
}

.day-heading > * {
  position: relative;
  z-index: 1;
}

.day-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.035em;
}

.day-heading p:not(.eyebrow) {
  margin: 10px 0 0;
  color: rgba(255,255,255,.84);
}

.next-event {
  width: min(360px, 38%);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 5px;
  border-radius: 18px;
  background: rgba(4, 45, 58, .44);
  backdrop-filter: blur(8px);
}

.next-event__label {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  opacity: .72;
}

.next-event strong {
  color: var(--etoc-orange);
  font-size: 24px;
}

.next-event span:last-child {
  font-size: 13px;
  font-weight: 700;
}

.broadcast-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(330px, .75fr);
  gap: 22px;
  align-items: start;
}

.broadcast-main,
.programme-card {
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}

.broadcast-main {
  padding: 18px;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 75% 20%, rgba(172,210,228,.3), transparent 38%),
    linear-gradient(145deg, #052f3f, #0f607c 55%, #244f2c);
}

#player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  display: none;
}

.player-shell.has-stream #player {
  display: block;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.player-shell.has-stream .player-placeholder {
  display: none;
}

.player-placeholder img {
  width: min(620px, 78%);
  max-height: 42%;
  object-fit: contain;
  margin-bottom: 24px;
}

.player-placeholder p {
  margin: 0 0 6px;
  color: var(--etoc-orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

.player-placeholder strong {
  max-width: 560px;
  font-size: clamp(18px, 2.7vw, 32px);
}

.player-status {
  position: absolute;
  left: 15px;
  top: 15px;
  z-index: 3;
  padding: 9px 12px;
  display: none;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(7px);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
}

.player-shell.has-stream .player-status {
  display: inline-flex;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #44dc81;
}

.player-status.reconnecting .status-dot {
  background: var(--etoc-orange);
}

.watching-row {
  min-height: 52px;
  padding: 12px 5px 2px;
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.watching-row > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.watching-row strong {
  color: var(--etoc-blue-dark);
  font-size: 20px;
}

.watching-row small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.camera-section {
  padding: 6px 2px 0;
}

.section-heading {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-heading h3 {
  margin: 0;
  color: var(--etoc-blue-dark);
  font-size: 13px;
  letter-spacing: .12em;
}

.section-heading > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.camera-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 16px;
  color: #fff;
  background: var(--etoc-blue-dark);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, opacity .16s ease;
}

.camera-card:hover {
  transform: translateY(-2px);
}

.camera-card.active {
  border-color: var(--etoc-orange);
}

.camera-card.reconnecting {
  opacity: .62;
}

.camera-card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.camera-card__overlay {
  position: absolute;
  inset: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(2,26,35,.96), rgba(2,26,35,.03) 68%);
}

.camera-card__number {
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0,0,0,.65);
}

.camera-card__meta {
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.camera-card__code {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
  opacity: .58;
}

.camera-card__state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .07em;
}

.camera-card__state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #46e58a;
}

.camera-card.reconnecting .camera-card__state::before {
  background: var(--etoc-orange);
}

.no-cameras {
  display: none;
  padding: 22px;
  border: 1px dashed rgba(15,96,124,.25);
  border-radius: 16px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
  font-size: 13px;
}

.no-cameras.visible {
  display: block;
}

.programme-card {
  padding: 24px;
  position: sticky;
  top: 18px;
}

.programme-card__timezone {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--etoc-blue);
  background: var(--etoc-blue-light);
}

.programme-list {
  display: grid;
  gap: 7px;
}

.programme-item {
  position: relative;
  padding: 13px 12px 13px 64px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.programme-item.current {
  color: #fff;
  background: var(--etoc-blue);
}

.programme-item.next {
  box-shadow: inset 0 0 0 2px var(--etoc-orange);
}

.programme-item__time {
  position: absolute;
  left: 12px;
  top: 13px;
  color: var(--etoc-orange);
  font-size: 13px;
  font-weight: 900;
}

.programme-item.current .programme-item__time {
  color: #fff;
}

.programme-item__title {
  display: block;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.programme-item__place {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.programme-item.current .programme-item__place {
  color: rgba(255,255,255,.75);
}

.site-footer {
  width: min(1500px, calc(100% - 40px));
  margin: 0 auto 24px;
  padding: 20px 26px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-radius: 18px;
  color: rgba(255,255,255,.82);
  background: var(--etoc-blue-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .05em;
}

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

  .programme-card {
    position: static;
  }

  .camera-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 8px 8px 0;
  }

  .site-header__inner {
    min-height: 76px;
    padding: 10px 12px;
    border-radius: 17px;
  }

  .brand img {
    width: min(68vw, 410px);
    max-height: 58px;
  }

  .live-badge {
    padding: 8px 10px;
    font-size: 10px;
  }

  .language-switch {
    padding: 8px 9px;
    font-size: 10px;
  }

  .page {
    padding: 18px 8px 38px;
  }

  .event-intro {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 6px 18px;
  }

  .event-intro__actions {
    justify-content: flex-start;
  }

  .day-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 20px;
    border-radius: 22px;
  }

  .next-event {
    width: 100%;
  }

  .broadcast-main {
    padding: 8px;
    border-radius: 20px;
  }

  .player-shell {
    border-radius: 16px;
  }

  .camera-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .camera-card {
    border-radius: 12px;
  }

  .camera-card__overlay {
    padding: 9px;
  }

  .programme-card {
    padding: 18px 13px;
    border-radius: 20px;
  }

  .site-footer {
    width: calc(100% - 16px);
    flex-direction: column;
    gap: 5px;
    padding: 16px 18px;
  }
}

@media (max-width: 470px) {
  .live-badge span:not(.live-badge__dot) { display: none; }
  .event-intro h1 { font-size: 34px; }
  .button { min-height: 42px; padding: 0 14px; font-size: 10px; }
  .camera-card__number { font-size: 13px; }
}

/* ETOC-OFFLINE-CARDS */

.camera-card.offline {
  cursor: default;
  opacity: .78;
  border-color: rgba(15, 76, 100, .22);
}

.camera-card.offline:hover {
  transform: none;
}

.camera-card.offline .camera-card__thumb {
  filter:
    grayscale(.45)
    brightness(.58);
}

.camera-card.offline::after {
  content: attr(data-state-label);
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 24, 29, .86);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .09em;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
}

.camera-card.offline .camera-card__state {
  color: rgba(255, 255, 255, .82);
}

.camera-card.offline
.camera-card__state::before {
  background: #9aa5aa;
}

.camera-card.reconnecting
.camera-card__state::before {
  background: var(--etoc-orange);
}
