@font-face {
  font-family: "Lemon Milk";
  src: url("/assets/lemon-milk-regular.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Century Gothic";
  src: url("/assets/century-gothic.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #0d0d13;
  --surface: #181821;
  --raised: #22232e;
  --line: #353746;
  --text: #f7f7fb;
  --muted: #aeb1c4;
  --cyan: #08c8f4;
  --pink: #ff176a;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 80% -10%, rgba(255, 23, 106, .15), transparent 36rem),
    radial-gradient(circle at 5% 110%, rgba(8, 200, 244, .12), transparent 34rem),
    var(--page);
  color: var(--text);
  font-family: "Century Gothic", sans-serif;
}

.shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: auto;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
}

.brandbar {
  min-height: 86px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 22px;
  background: linear-gradient(100deg, #201a28 0%, #3d1128 50%, #76072f 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand img { width: 58px; height: 58px; object-fit: contain; }
.brand span { display: grid; gap: 3px; }

.brand strong {
  font-family: "Lemon Milk", sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  letter-spacing: .02em;
}

.brand small { font-size: .7rem; font-weight: 700; letter-spacing: .06em; }

.secure {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(12, 12, 19, .68);
  color: var(--cyan);
  font-size: .78rem;
  font-weight: 700;
}

.secure i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.viewer {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(14px, 2vw, 28px);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 22px;
  background: rgba(24, 24, 33, .92);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .36);
}

.state { text-align: center; max-width: 580px; }
.state h1 { margin: 22px 0 10px; font: 1.35rem "Lemon Milk", sans-serif; }
.state p { color: var(--muted); line-height: 1.6; }
.hidden { display: none !important; }

.spinner {
  display: inline-block;
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 255, 255, .12);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .85s linear infinite;
}

.error-icon {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 23, 106, .16);
  color: var(--pink);
  font: 1.6rem "Lemon Milk", sans-serif;
}

.player {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  display: grid;
  gap: 18px;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #050507;
}

.video-host { width: 100%; height: 100%; min-height: 0; }

.details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.copy { min-width: 0; }
.copy h1 { margin: 0 0 7px; overflow-wrap: anywhere; font: 1.05rem "Lemon Milk", sans-serif; }
.copy p { margin: 0; color: var(--muted); font-size: .86rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

.button, footer button {
  min-height: 43px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 13px;
  font: 700 .88rem "Century Gothic", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.primary { background: var(--cyan); color: #06131a; }
.secondary { border-color: var(--line); background: var(--raised); color: var(--text); }
.button:hover { filter: brightness(1.08); }

footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: .78rem;
}

footer button { min-height: 34px; padding: 0 12px; background: transparent; color: var(--cyan); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .shell { padding: 10px; gap: 10px; }
  .brandbar { min-height: 70px; border-radius: 17px; }
  .brand img { width: 44px; height: 44px; }
  .brand small { display: none; }
  .secure span { display: none; }
  .secure { padding: 12px; }
  .viewer { padding: 10px; border-radius: 17px; }
  .details { align-items: stretch; flex-direction: column; }
  .actions { justify-content: stretch; }
  .button { flex: 1; }
  .video-frame { border-radius: 13px; }
}
