/* TV Covers upload page: dark Liquid Glass look, like the TV launcher. */
:root {
  --text: #fff;
  --muted: rgba(255,255,255,.6);
  --line: rgba(255,255,255,.14);
  --accent: #0a84ff;
  --danger: #ff453a;
  --ok: #30d158;
  --warn: #ffd60a;
  --r: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: #05060a;
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 60% at 80% 10%, #1f3fa8 0%, transparent 70%),
    radial-gradient(45% 55% at 10% 90%, #6b1d6e 0%, transparent 70%),
    #05060a;
}
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* Glass: blur of the page behind, light fill, bright top-left rim. */
.glass {
  position: relative;
  background: rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  backdrop-filter: blur(30px) saturate(160%);
  border-radius: var(--r);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 0 0 1px rgba(255,255,255,.09),
    0 12px 30px rgba(0,0,0,.25);
}
.card { padding: 20px; }

.btn {
  border: 0; border-radius: 999px; padding: 10px 18px;
  font: inherit; font-weight: 600; color: var(--text); cursor: pointer;
  background: rgba(255,255,255,.12);
}
.btn.primary { background: var(--text); color: #000; }
.btn.primary:disabled { opacity: .5; cursor: default; }
.btn.ghost:hover { background: rgba(255,255,255,.2); }

input[type=text], input[type=email], input[type=password], .title {
  width: 100%; margin-top: 6px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(0,0,0,.25); color: var(--text); font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 13px; }

/* Sign in */
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 360px; }
.login h1 { margin-bottom: 4px; }
.login p { margin-bottom: 18px; }
.login .btn { width: 100%; margin-top: 6px; }
.error { color: var(--danger); margin-bottom: 10px; }

/* Header */
.top {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 28px; position: sticky; top: 0; z-index: 5;
}
.top h1 { flex: none; }
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; margin-right: auto; overflow-x: auto; }
.tab {
  border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer;
  background: transparent; color: var(--text); font: inherit; font-weight: 500; white-space: nowrap;
}
.tab em { font-style: normal; margin-left: 6px; color: var(--muted); font-size: 13px; }
.tab.on { background: var(--text); color: #000; }
.tab.on em { color: rgba(0,0,0,.55); }

/* Layout */
.layout { display: grid; grid-template-columns: 420px 1fr; gap: 24px; padding: 0 28px 40px; }
.side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 92px; align-self: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } .side { position: static; } }

/* TV preview: a small copy of the Home screen at 1920x1080 proportions. */
.tv {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: #111; box-shadow: 0 0 0 6px #000, 0 10px 30px rgba(0,0,0,.5);
  margin-bottom: 12px;
}
.tv-art { position: absolute; inset: 0; background: center / cover no-repeat; }
.tv-logo {
  position: absolute; left: 4%; top: 6.8%;
  max-width: 27%; max-height: 14.6%;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.4));
}
.tv-dock {
  /* Dock: x 46..1874, y 783..1016 of 1920x1080 */
  position: absolute; left: 2.4%; right: 2.4%; top: 72.5%; height: 21.6%;
  border-radius: 10px; display: flex; align-items: center; gap: 2.7%; padding: 0 2.6%;
  background: rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(8px) brightness(.85); backdrop-filter: blur(8px) brightness(.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.tv-dock span { flex: none; width: 13.6%; aspect-ratio: 5 / 3; border-radius: 4px; background: rgba(255,255,255,.28); }
.tv-dock span:first-child { width: 16.6%; background: rgba(255,255,255,.55); }

/* Upload */
.drop {
  display: block; padding: 14px; border: 1px dashed rgba(255,255,255,.25); border-radius: 16px;
  color: var(--muted); cursor: pointer;
}
.drop b { color: var(--text); font-weight: 600; }
.drop input { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.msg { margin-bottom: 12px; font-size: 13px; }
.msg.ok { color: var(--ok); } .msg.error { color: var(--danger); } .msg.warn { color: var(--warn); }
#addForm .btn { width: 100%; }

/* Grid of covers */
.list-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.list-head h2 { margin: 0; font-size: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cover { padding: 10px; border-radius: 20px; }
.cover.sel { box-shadow: inset 0 0 0 2px var(--text), 0 12px 30px rgba(0,0,0,.3); }
.cover.off .thumb { opacity: .45; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; cursor: pointer;
  background: #111 center / cover no-repeat;
}
.thumb-logo { position: absolute; left: 4%; top: 7%; max-width: 40%; max-height: 22%; }
.badge {
  position: absolute; right: 8px; top: 8px; padding: 3px 9px; border-radius: 999px;
  background: rgba(0,0,0,.6); font-size: 12px; font-weight: 600;
}
.cover .row { padding: 10px 2px 2px; }
.cover .title { margin: 0 0 8px; padding: 7px 10px; font-size: 14px; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; }
.icon {
  border: 0; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.12); color: var(--text); cursor: pointer;
}
.icon:disabled { opacity: .3; cursor: default; }
.icon.danger { color: var(--danger); margin-left: auto; }
.icon.file { margin: 0; color: var(--text); }
