﻿:root {
  color-scheme: dark;
  --bg: #111214;
  --panel: #1c1d20;
  --panel2: #25262a;
  --accent: #2ea6ff;
  --text: #f7f7f7;
  --muted: #9fa3aa;
  --ok: #46d369;
  --warn: #ffb020;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: 110px;
}

.close {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 10;
  border: 0;
  background: rgba(0,0,0,.55);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 19px;
  font-size: 25px;
}

.hero {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #000;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.heroShade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    transparent 35%,
    rgba(0,0,0,.9)
  );
}

.heroText {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
}

.heroText h1 {
  margin: 5px 0;
  font-size: 21px;
  line-height: 1.2;
}

.source,
.meta {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 16px 16px 0;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.format {
  position: relative;
  min-height: 82px;
  border: 1px solid #33363b;
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  padding: 12px;
}

.format.selected {
  border: 2px solid var(--accent);
  background: #182836;
}

.format .quality {
  display: block;
  font-size: 25px;
  font-weight: 700;
}

.format .size {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 13px;
}

.badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 8px;
  background: #28313a;
  font-size: 11px;
}

.badge.cache {
  color: var(--ok);
}

.badge.premium {
  color: #ffd166;
}

.badge.split {
  color: var(--warn);
}

.secondary .big {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.delivery {
  margin: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--panel2);
  color: var(--muted);
  font-size: 13px;
  display: none;
}

.download {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 528px);
  height: 58px;
  border: 0;
  border-radius: 17px;
  background: var(--accent);
  color: white;
  font-size: 18px;
  font-weight: 700;
  z-index: 1000;
  cursor: pointer;
}

.download:disabled {
  opacity: .35;
  cursor: not-allowed;
}

main {
  padding-bottom: 100px;
}

.fallback {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  margin: 18px;
}
