* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Impact, "Arial Narrow", sans-serif;
  background: #151514;
  color: #EDEAE4;
}
.container {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
}
.card {
  width: 100%;
  max-width: 980px;
  background: #1E1E1D;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  padding: 32px;
}
.top-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}
.nav-logo {
  height: 150px;
  width: auto;
  margin-right: 8px;
  flex-shrink: 0;
}
.top-nav a {
  color: #D4A080;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 9999px;
  background: #2A1A0E;
}
.top-nav a.active {
  color: white;
  background: #F04A08;
}
h1 { margin: 0 0 8px; }
h2 { margin: 0 0 12px; }
h3 { margin: 0 0 12px; }
#watchPage > h1,
#watchLookup > h2 { letter-spacing: 0.12em; }
.muted { color: #8A8882; margin-top: 0; }
.upload-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
input[type="file"], input[readonly] {
  flex: 1;
  min-width: 260px;
  padding: 12px;
  border: 1px solid #313130;
  border-radius: 10px;
  background: #272725;
  color: #EDEAE4;
}
input[readonly]::placeholder { color: #8A8882; }
button, .button-link {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  background: #F04A08;
  color: white;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover:not(:disabled), .button-link:hover { background: #D94007; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.status {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #252420;
  border: 1px solid #313130;
}
.status.error { background: #2E1010; color: #FF7070; border-color: #4A1A1A; }
.result { margin-top: 28px; }
.hidden { display: none !important; }
dl { display: grid; gap: 8px; }
dl div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; }
dt { color: #8A8882; }
dd { margin: 0; word-break: break-all; }
.link-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
label { display: block; margin-top: 20px; font-weight: 600; }
.qr-block {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #313130;
  border-radius: 16px;
  display: inline-block;
  background: #1A1A19;
}
.qr-block img, .qr-small {
  width: 220px;
  height: 220px;
  border: 1px solid #313130;
  border-radius: 12px;
  background: white;
}
.downloads-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.download-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 20px;
  border: 1px solid #2E2E2C;
  border-radius: 16px;
  background: #232321;
}
.download-info { min-width: 0; }
.qr-small { width: 140px; height: 140px; }
.empty {
  padding: 24px;
  border: 1px dashed #313130;
  border-radius: 16px;
  color: #8A8882;
}
@media (max-width: 760px) {
  .container { padding: 16px; }
  .card { padding: 20px; }
  dl div { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 1fr; }
  .qr-small { width: 180px; height: 180px; }
}
.video-player {
  width: 100%;
  max-height: 560px;
  margin: 16px 0 24px;
  border-radius: 16px;
  background: #05070d;
  border: 1px solid #313130;
}
.progress-block {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #2E2E2C;
  border-radius: 14px;
  background: #232321;
}
.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
progress {
  width: 100%;
  height: 18px;
  accent-color: #F04A08;
}
.small-muted { margin: 8px 0 0; font-size: 14px; }
.qr-placeholder {
  width: 140px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  border: 1px dashed #313130;
  border-radius: 12px;
  color: #8A8882;
  font-size: 14px;
}
.qr-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.upload-code-banner {
  margin: 22px 0;
  padding: 30px 24px;
  border-radius: 26px;
  background: radial-gradient(circle at top left, #fff176, #ff9800 42%, #f44336 100%);
  color: #1f1300;
  text-align: center;
  box-shadow: 0 20px 50px rgba(244, 67, 54, 0.35);
  border: 4px solid rgba(255, 255, 255, 0.85);
}
.upload-code-banner__label {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.upload-code-banner__value {
  margin: 8px 0 10px;
  font-size: clamp(72px, 18vw, 150px);
  line-height: 0.95;
  font-weight: 1000;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 0 rgba(255,255,255,0.45);
}
.upload-code-banner__hint { font-size: 18px; font-weight: 800; }

.access-code-hero {
  margin: 24px 0;
  padding: 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, #8B2500, #F04A08 55%, #FF6B20);
  color: white;
  text-align: center;
  box-shadow: 0 18px 40px rgba(240, 74, 8, 0.4);
}
.access-code-hero span {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}
.access-code-hero strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(56px, 12vw, 112px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.access-code-hero p { margin: 0; font-size: 16px; opacity: 0.92; }

.watch-lookup {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #2E2E2C;
  border-radius: 18px;
  background: #232321;
}
.code-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}
.code-form input {
  width: 220px;
  max-width: 100%;
  padding: 16px;
  border: 1px solid #313130;
  border-radius: 12px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: #272725;
  color: #EDEAE4;
}
@media (max-width: 760px) {
  .code-form input { width: 100%; }
  .code-form button { width: 100%; }
}

.watch-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
  margin: 8px 0 24px;
  border: 1px solid #2E2E2C;
  border-radius: 18px;
  background: #1E1E1C;
  color: #999;
  font-size: 15px;
}
.watch-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #2E2E2C;
  border-top-color: #F04A08;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.access-code-hero--watch {
  margin: 0 0 28px;
  padding: 34px 28px;
  background: linear-gradient(135deg, #8B2500, #F04A08 55%, #FF7030);
  box-shadow: 0 22px 56px rgba(240, 74, 8, 0.45);
}
.access-code-hero--watch strong {
  font-size: clamp(72px, 16vw, 150px);
  letter-spacing: 0.12em;
}
.hero-download-button {
  display: inline-block;
  margin-top: 20px;
  padding: 16px 48px;
  background: #fff;
  color: #F04A08;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}
.hero-download-button:hover { opacity: 0.88; }

.secondary-button {
  margin-top: 14px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.45);
  color: #fff;
}
.technical-details {
  margin: 22px 0;
  border: 1px solid #2E2E2C;
  border-radius: 16px;
  background: #232321;
  overflow: hidden;
}
.technical-details summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 800;
  color: #EDEAE4;
  background: #2A2A28;
}
.technical-details dl { padding: 16px 18px 18px; margin: 0; }
@media (max-width: 760px) {
  .access-code-hero--watch strong { font-size: 64px; }
}

.not-found-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 32px;
  gap: 16px;
}
.not-found-code {
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #8B2500, #F04A08 55%, #FF6B20);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.not-found-title {
  font-size: 28px;
  margin: 0;
}
.not-found-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.button-link.secondary {
  background: #2E2E2C;
  color: #EDEAE4;
}
.button-link.secondary:hover {
  background: #3A3A38;
}
