﻿:root {
  --bg: #e9eef4;
  --surface: #ffffff;
  --line: #d7dee8;
  --atg-blue: #0051a5;
  --atg-blue-dark: #003b83;
  --atg-green: #00a651;
  --atg-green-dark: #008944;
  --atg-yellow: #ffdd00;
  --text: #162437;
  --text-soft: #5b6a7f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f3f6fb, var(--bg));
}

.topbar {
  background: linear-gradient(90deg, var(--atg-blue-dark), var(--atg-blue));
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 36, 86, 0.22);
}

.topbar-inner {
  width: min(1120px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-kicker {
  margin: 0;
  color: #ffffff;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.18rem;
  line-height: 1;
}

.brand-sub {
  margin: 4px 0 0;
  color: #d8e8ff;
  font-size: 0.9rem;
}

.status-pill {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #00b95b, var(--atg-green-dark));
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.page {
  width: min(1120px, 94vw);
  margin: 24px auto;
}

.player-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(14, 34, 63, 0.15);
}

.player-frame {
  background: #000;
}

video {
  display: block;
  width: 100%;
  max-height: 72vh;
  background: #000;
}

.controls {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto 140px auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #f9fbfe;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #c5d1e0;
  border-radius: 10px;
  background: #fff;
  color: #2c4362;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn.primary {
  background: linear-gradient(180deg, var(--atg-green), var(--atg-green-dark));
  border-color: #008944;
  color: #fff;
}

.icon-btn.is-active {
  border-color: #0051a5;
  box-shadow: inset 0 0 0 2px rgba(0, 81, 165, 0.15);
}

.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.pause-icon,
.volume-off {
  display: none;
}

.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.is-muted .volume-on {
  display: none;
}

.is-muted .volume-off {
  display: block;
}

.timeline-wrap {
  min-width: 0;
}

.timeline,
.volume {
  width: 100%;
  accent-color: #0075d8;
}

.time {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.noscript-msg {
  margin: 8px 12px 12px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.player-card:fullscreen,
.player-card:-webkit-full-screen {
  border-radius: 0;
  border: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  position: relative;
  background: #000;
}

.player-card:fullscreen video,
.player-card:-webkit-full-screen video {
  max-height: none;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.player-card:fullscreen .controls,
.player-card:-webkit-full-screen .controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  border-top-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(6, 17, 30, 0.35), rgba(6, 17, 30, 0.9));
  transition: opacity 180ms ease, transform 180ms ease;
}

.player-card.controls-hidden:fullscreen .controls,
.player-card.controls-hidden:-webkit-full-screen .controls {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

@media (max-width: 860px) {
  .controls {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "play timeline fs"
      "mute volume volume";
  }

  #play-toggle {
    grid-area: play;
  }

  .timeline-wrap {
    grid-area: timeline;
  }

  #fullscreen {
    grid-area: fs;
  }

  #mute-toggle {
    grid-area: mute;
  }

  #volume {
    grid-area: volume;
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  .page {
    width: 96vw;
  }

  .brand-kicker {
    font-size: 1.05rem;
  }

  .status-pill {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .controls {
    padding: 10px;
    gap: 8px;
  }
}
