:root {
  --bg: #080b12;
  --panel: rgba(19, 24, 35, .78);
  --panel-solid: #111722;
  --line: rgba(255, 255, 255, .09);
  --text: #f6f7fb;
  --muted: #939cac;
  --accent: #8cf6c4;
  --accent-2: #55dab0;
  --danger: #ff7676;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(65, 117, 98, .22), transparent 34rem),
    radial-gradient(circle at 96% 80%, rgba(50, 76, 128, .15), transparent 38rem),
    var(--bg);
  font: 15px/1.55 "DM Sans", sans-serif;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.ambient { position: fixed; border-radius: 50%; filter: blur(100px); pointer-events: none; opacity: .18; }
.ambient-one { width: 300px; height: 300px; background: var(--accent); top: -170px; left: 12%; }
.ambient-two { width: 380px; height: 380px; background: #31558a; right: -260px; bottom: -100px; }

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .25);
  backdrop-filter: blur(18px);
}

.center-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); border-radius: 28px; padding: 46px; text-align: center; }
.brand-mark {
  width: 54px; height: 54px; margin: 0 auto 24px; border-radius: 17px;
  display: grid; place-items: center; color: #07130e; background: var(--accent);
  box-shadow: 0 12px 40px rgba(140, 246, 196, .22); font-size: 18px;
}
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; margin: 0; font-size: 11px; display: inline-grid; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
h1, h2, h3 { font-family: "Manrope", sans-serif; line-height: 1.1; }
.login-card h1 { margin: 8px 0; font-size: 38px; }
.muted { color: var(--muted); }

label { display: grid; gap: 8px; color: #cbd1dc; font-weight: 600; font-size: 13px; text-align: left; }
.optional { display: inline; margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 500; }
input, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: none;
  padding: 13px 14px; color: var(--text); background: rgba(4, 7, 12, .58); resize: vertical;
}
input:focus, textarea:focus { border-color: rgba(140, 246, 196, .55); box-shadow: 0 0 0 3px rgba(140, 246, 196, .08); }
.login-form { display: grid; gap: 16px; margin-top: 30px; }

.primary, .secondary, .ghost, .icon-button {
  border: 0; border-radius: 11px; cursor: pointer; font-weight: 700; transition: .2s ease;
}
.primary { padding: 13px 18px; color: #07130e; background: var(--accent); }
.primary:hover { background: #a6fbd4; transform: translateY(-1px); }
.primary:disabled { opacity: .55; cursor: wait; transform: none; }
.wide { width: 100%; display: flex; justify-content: space-between; }
.secondary { padding: 10px 14px; color: var(--text); background: rgba(255,255,255,.08); }
.secondary:hover { background: rgba(255,255,255,.14); }
.secondary.copied { color: var(--accent); }
.ghost { color: var(--muted); background: transparent; padding: 8px 0; }
.ghost:hover { color: var(--text); }

.topbar {
  height: 78px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; background: rgba(8,11,18,.72); backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 11px; font: 800 18px "Manrope", sans-serif; }
.dashboard { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 100px; }
.hero { margin-bottom: 44px; }
.hero h1 { margin: 12px 0 18px; max-width: 700px; font-size: clamp(40px, 6vw, 72px); letter-spacing: -.055em; }
.hero h1 span { color: #8c96a8; }
.hero > p:last-child { max-width: 560px; color: var(--muted); font-size: 17px; }
.upload-panel { padding: 30px; border-radius: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.section-heading h2 { margin: 0; font-size: 24px; }
.privacy-pill { padding: 7px 11px; border: 1px solid rgba(140,246,196,.16); border-radius: 30px; color: var(--accent); background: rgba(140,246,196,.07); font-size: 11px; font-weight: 700; }
.upload-form { display: grid; gap: 20px; margin-top: 24px; }
.dropzone {
  min-height: 190px; place-items: center; align-content: center; gap: 7px; cursor: pointer; text-align: center;
  border: 1px dashed rgba(140,246,196,.34); border-radius: 18px; background: rgba(140,246,196,.025);
  transition: .2s ease;
}
.dropzone:hover { border-color: var(--accent); background: rgba(140,246,196,.05); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone small { color: var(--muted); font-weight: 400; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: rgba(140,246,196,.1); font-size: 22px; }
.form-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; }
.upload-form > .primary { justify-self: start; min-width: 230px; }
.progress-message { color: var(--muted); }
.spinner { width: 13px; height: 13px; margin-right: 7px; display: inline-block; border: 2px solid #415044; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.library { margin-top: 58px; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-left: 5px; border-radius: 20px; color: var(--muted); background: rgba(255,255,255,.07); font: 600 12px "DM Sans"; vertical-align: 3px; }
.video-list { display: grid; gap: 12px; margin-top: 22px; }
.video-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 13px; border-radius: 17px; }
.video-row.just-uploaded { border-color: rgba(140,246,196,.4); }
.video-thumb { position: relative; height: 86px; overflow: hidden; border-radius: 11px; background: #05070a; }
.video-thumb video { width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.video-thumb span { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #06120d; background: var(--accent); font-size: 11px; }
.video-info { min-width: 0; }
.video-info h3 { margin: 0 0 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.video-info p { margin: 0 0 7px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-info small { color: #666f7d; }
.video-actions { display: flex; align-items: center; gap: 7px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,.055); font-size: 18px; }
.icon-button:hover { color: var(--text); background: rgba(255,255,255,.11); }
.icon-button.danger:hover { color: var(--danger); }
.empty { margin-top: 22px; padding: 55px; border-radius: 20px; text-align: center; color: var(--muted); }
.empty > span { font-size: 35px; color: #46505d; }
.empty h3 { margin: 13px 0 5px; color: var(--text); }
.empty p { margin: 0; }
.alert { margin: 16px 0; padding: 12px 15px; border-radius: 11px; background: rgba(255,255,255,.07); }
.alert.error { color: #ffadad; border: 1px solid rgba(255,118,118,.2); }
.alert.success { color: var(--accent); border: 1px solid rgba(140,246,196,.18); }
.alert.warning { color: #ffe1a1; border: 1px solid rgba(255,205,100,.18); background: rgba(255,205,100,.06); }

.watch-shell { width: min(1060px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 80px; }
.public-brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 30px; font: 800 17px "Manrope"; }
.watch-card { overflow: hidden; border: 1px solid var(--line); border-radius: 25px; background: var(--panel-solid); box-shadow: 0 35px 100px rgba(0,0,0,.34); }
.player-wrap { display: grid; place-items: center; aspect-ratio: 16 / 9; background: #020305; }
.player-wrap video { width: 100%; height: 100%; }
.watch-copy { padding: 32px 36px; }
.watch-copy h1 { margin: 8px 0 14px; font-size: clamp(28px, 5vw, 44px); letter-spacing: -.035em; }
.watch-meta { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 720px) {
  .dashboard { width: min(100% - 28px, 1120px); padding-top: 46px; }
  .form-grid { grid-template-columns: 1fr; }
  .upload-panel { padding: 20px; }
  .privacy-pill { display: none; }
  .video-row { grid-template-columns: 105px 1fr; gap: 13px; }
  .video-thumb { height: 72px; }
  .video-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .video-actions .secondary { flex: 1; }
  .login-card { padding: 34px 24px; }
  .watch-copy { padding: 24px 22px; }
}
