:root {
  --btv-card: rgba(255, 255, 255, 0.92);
  --btv-line: rgba(255, 255, 255, 0.18);
  --btv-ink: rgba(31, 26, 36, 0.95);
  --btv-muted: rgba(31, 26, 36, 0.72);
  --btv-accent: #6b2d4a;
  --btv-accent-soft: rgba(107, 45, 74, 0.14);
  --btv-ok: #1f7a4a;
  --btv-ok-bg: rgba(46, 160, 96, 0.16);
  --btv-bad-bg: rgba(200, 72, 72, 0.12);
  --btv-gold: #d4a853;
  --btv-win: rgba(212, 168, 83, 0.22);
}

.page--btv {
  width: 100%;
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btv-stage {
  width: 100%;
  max-width: min(100%, 920px);
  margin: 0 auto;
  text-align: center;
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.btv-stage--winners {
  max-width: 980px;
}

.section--btv {
  width: 100%;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.section--btv-winners {
  width: 100%;
  padding-top: 0.5rem;
  padding-bottom: 2.25rem;
  display: flex;
  justify-content: center;
}

.btv-head {
  margin-bottom: 1rem;
}

.btv-head .section__title {
  margin: 0 auto 0.35rem;
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
  line-height: 1.3;
}

.btv-subtitle {
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.88rem, 1.7vw, 1.02rem);
  line-height: 1.45;
  max-width: 42ch;
}

.btv-week {
  margin: 0.65rem auto 0;
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(212, 168, 83, 0.16);
  border: 1px solid rgba(212, 168, 83, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 700;
}

.btv-genre {
  margin: 0.55rem auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.btv-empty {
  margin: 2rem auto;
  opacity: 0.8;
}

.btv-empty[hidden],
.btv-play[hidden],
.btv-actions[hidden],
.btv-week[hidden],
.btv-genre[hidden],
.btv-feedback[hidden],
.btv-recaptcha[hidden] {
  display: none !important;
}

.btv-prompt {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.btv-prompt--ok {
  color: #b8f0d0;
}

.btv-prompt--warn {
  color: #f0e0b8;
}

.btv-duel {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.btv-vs {
  align-self: center;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  font-size: 0.95rem;
}

.btv-card {
  flex: 1 1 240px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 0.85rem;
  border: 1px solid var(--btv-line);
  border-radius: 18px;
  background: var(--btv-card);
  color: var(--btv-ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.btv-card:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.btv-card:disabled {
  cursor: default;
  opacity: 0.96;
}

.btv-card--picked {
  border-color: var(--btv-accent);
}

.btv-card--winner {
  box-shadow: 0 0 0 2px var(--btv-gold), 0 14px 36px rgba(0, 0, 0, 0.2);
}

.btv-card__cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.65rem;
  background: rgba(10, 14, 20, 0.88);
}

.btv-card__title {
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.btv-card__author {
  color: var(--btv-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.btv-card__genre {
  color: var(--btv-accent);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  line-height: 1.35;
}

.btv-card__cta {
  display: inline-block;
  margin-top: auto;
  font-weight: 800;
  color: var(--btv-accent);
}

.btv-card__bar-wrap {
  margin-top: 0.65rem;
  width: 100%;
}

.btv-card__bar {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(31, 26, 36, 0.1);
  overflow: hidden;
  position: relative;
}

.btv-card__bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--btv-accent), #8b3d5c);
  transition: width 0.55s ease;
}

.btv-card__bar--animate::after {
  width: var(--btv-bar-pct, 0%);
}

.btv-card--winner .btv-card__bar::after {
  background: linear-gradient(90deg, var(--btv-gold), #e8c878);
}

.btv-card__votes {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--btv-muted);
  font-weight: 700;
}

.btv-duel--locked .btv-card {
  pointer-events: none;
}

.btv-recaptcha {
  display: flex;
  justify-content: center;
  margin: 0.5rem auto 0.75rem;
  min-height: 78px;
}

.btv-feedback {
  margin: 0 auto 0.85rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.btv-feedback--ok {
  background: var(--btv-ok-bg);
  color: #d8f5e4;
}

.btv-feedback--warn {
  background: rgba(212, 168, 83, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.btv-feedback--bad {
  background: var(--btv-bad-bg);
  color: #ffd8d8;
}

.btv-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.btv-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: var(--btv-accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease;
}

.btv-pill:hover {
  transform: translateY(-1px);
}

.btv-pill--secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--btv-line);
  color: rgba(255, 255, 255, 0.95);
}

.btv-winners__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
}

.btv-winners__sub {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.45;
}

.btv-winners {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  text-align: left;
}

.btv-winner-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 16px;
  background: var(--btv-card);
  border: 1px solid var(--btv-line);
  color: var(--btv-ink);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btv-winner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.btv-winner-card__cover {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(10, 14, 20, 0.88);
}

.btv-winner-card__week {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--btv-accent);
  margin-bottom: 0.2rem;
}

.btv-winner-card__title {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.btv-winner-card__author {
  color: var(--btv-muted);
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}

.btv-winner-card__meta {
  font-size: 0.8rem;
  color: var(--btv-muted);
}

.btv-winner-card__badge {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--btv-ok);
}

.btv-winners-empty {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .btv-duel {
    flex-direction: column;
    align-items: center;
  }

  .btv-card {
    width: 100%;
    max-width: 360px;
  }

  .btv-vs {
    margin: 0.15rem 0;
  }
}

@media (min-width: 769px) {
  .btv-winners {
    grid-template-columns: repeat(2, 1fr);
  }
}
