:root {
  --accent: #ff3b2f;
  --bg: #000;
  --ui: rgba(255,255,255,0.06);
  --ui-strong: rgba(255,255,255,0.12);
  --text-soft: #dcdcdc;
}

/* base layout */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  font-family: Inter, Roboto, Arial, sans-serif;
  color: #fff;
}

.wrap {
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.card {
  width: 100%;
  max-width: 1080px;
  border-radius: 10px;
  overflow: visible;
  background: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  position: relative;
}

/* aspect container */
.aspect {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.aspect > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* poster & video */
.poster {
  background-size: cover;
  background-position: center;
  filter: brightness(0.6);
  transition: opacity 0.35s ease;
  z-index: 1;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  touch-action: manipulation;
  z-index: 0;
}

/* --- Center Play Button --- */
.big-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;     /* clickable */
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.big-play.hidden {
  opacity: 0;
  pointer-events: none;     /* disable only when hidden */
}

.big-play button {
  pointer-events: auto;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

.big-play button:hover {
  background: rgba(255,255,255,0.15);
  transform: scale(1.05);
}

.big-play .icon {
  width: 48px;
  height: 48px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* --- Controls Section --- */
.controls-outer {
  display: block;
  background: transparent;
  z-index: 50;
}

.controls {
  box-sizing: border-box;
  padding: 12px 14px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
}

.fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #c00);
  transition: width 0.08s linear;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  background: var(--ui);
  border: 0;
  color: #c00;
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--ui-strong);
}

.icon {
  width: 20px;
  height: 20px;
  stroke: #c00;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.time {
  color: var(--text-soft);
  font-size: 13px;
  min-width: 96px;
  text-align: left;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
}

.volume {
  width: 120px;
  accent-color: #c00;
  cursor: pointer;
}

/* --- Desktop: Controls below video --- */
@media (min-width: 641px) {
  .controls-outer {
    position: relative;
  }
  .aspect {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .controls {
    position: relative;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0));
    padding: 12px 14px;
    border-radius: 0 0 10px 10px;
  }
}

/* --- Mobile: Controls overlay inside video bottom --- */
@media (max-width: 640px) {
  .card {
    border-radius: 8px;
  }

  .controls-outer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .controls {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    border-radius: 8px;
  }

  .volume {
    width: 70px;
  }

  .time {
    font-size: 12px;
    min-width: 60px;
  }

  .fill {
    transition: none;
  }
}

/* screen reader hidden */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
