:root {
  --bg: #080a0f;
  --bg-soft: #0d1018;
  --panel: #111520;
  --panel-2: #161b28;
  --border: #232a3a;
  --border-soft: #1a2030;
  --text: #e8ebf4;
  --muted: #8b94ab;
  --muted-2: #626b82;
  --accent: #7c5cff;
  --accent-2: #4f8dff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --danger: #ff5d6c;
  --success: #3ddc97;
  --radius: 16px;
  --shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.8);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(124, 92, 255, 0.35); }

/* Background aura */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 12% -10%, rgba(124, 92, 255, 0.16), transparent 70%),
    radial-gradient(700px 500px at 95% 0%, rgba(79, 141, 255, 0.10), transparent 70%);
  z-index: 0;
}

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, rgba(22, 27, 40, 0.9), rgba(13, 16, 24, 0.96));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 36px 32px 30px;
  box-shadow: var(--shadow);
  animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px -6px rgba(124, 92, 255, 0.6);
  flex: none;
}

.brand-mark svg { width: 21px; height: 21px; }

.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 17px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: -2px;
}

.login-card h1 {
  font-size: 23px;
  letter-spacing: -0.03em;
  margin: 28px 0 6px;
}

.login-card > p {
  color: var(--muted);
  margin: 0 0 26px;
  font-size: 14px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.input-wrap { position: relative; }

.input-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  pointer-events: none;
}

.input {
  width: 100%;
  background: #0a0d14;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.input-wrap .input { padding-left: 39px; }

/* Multi-player tag input */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: #0a0d14;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 7px 9px;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.tag-input:focus-within {
  border-color: rgba(124, 92, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
  background: #0b0f18;
}

.tag-input .tags { display: contents; }

.tag-input input {
  flex: 1;
  min-width: 140px;
  background: transparent;
  border: 0;
  outline: none;
  padding: 4px 2px;
  font-size: 14px;
}

.tag-input input::placeholder { color: #4f5870; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: #c9beff;
  border-radius: 7px;
  padding: 3px 4px 3px 8px;
  font-size: 12.5px;
  font-weight: 600;
  animation: rise 0.18s ease both;
}

.tag button {
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 4px;
  padding: 2px;
  color: #a793ff;
}

.tag button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tag button svg { width: 12px; height: 12px; }

.hint {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 6px;
}

.input::placeholder { color: #4f5870; }

.input:focus {
  border-color: rgba(124, 92, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14);
  background: #0b0f18;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.1s, background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
  user-select: none;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(124, 92, 255, 0.8);
  width: 100%;
  padding: 12px 16px;
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-ghost {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: #323a4f; background: #1a2030; }

.btn-danger {
  background: rgba(255, 93, 108, 0.1);
  border-color: rgba(255, 93, 108, 0.3);
  color: #ff8b96;
}

.btn-danger:hover { background: rgba(255, 93, 108, 0.18); }

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
}

.btn-icon:hover { background: var(--panel-2); color: var(--text); }

.form-error {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(255, 93, 108, 0.08);
  border: 1px solid rgba(255, 93, 108, 0.25);
  color: #ff9aa3;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.form-error.show { display: flex; animation: shake 0.35s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.login-foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.8);
}

/* ------------------------------------------------------------------ */
/* App shell                                                           */
/* ------------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(8, 10, 15, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.topbar .brand-mark svg { width: 17px; height: 17px; }
.topbar .brand-name { font-size: 15px; }
.topbar .brand-sub { font-size: 11px; }

.search {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin-left: 8px;
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-2);
}

.search input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 9px 12px 9px 36px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search input:focus {
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12.5px;
  color: var(--muted);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 40px) 80px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.page-head h1 {
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.035em;
  margin: 0;
}

.page-head .sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 5px;
}

.page-head .spacer { flex: 1; }

.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 11px;
  background: linear-gradient(180deg, rgba(22, 27, 40, 0.7), rgba(13, 16, 24, 0.7));
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 11px 16px;
  min-width: 138px;
}

.stat-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: #a793ff;
  flex: none;
}
.stat-icon svg { width: 16px; height: 16px; }
.stat-icon.blue { background: rgba(79, 141, 255, 0.13); color: #8ab5ff; }
.stat-icon.green { background: rgba(61, 220, 151, 0.1); color: #66e7b0; }

.stat-value { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; line-height: 1.2; }
.stat-label { font-size: 11.5px; color: var(--muted-2); font-weight: 500; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  animation: cardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card:hover {
  transform: translateY(-3px);
  border-color: #2d3550;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.9);
}

.card-media {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(100% 100% at 10% 90%, rgba(79, 141, 255, 0.14), transparent 60%),
    #0a0d15;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}

.card-media .play {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: transform 0.18s, background 0.18s;
}

.card:hover .play { transform: scale(1.08); background: rgba(124, 92, 255, 0.5); }
.card-media .play svg { width: 20px; height: 20px; margin-left: 2px; }

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cfd5e6;
  backdrop-filter: blur(4px);
}

.card-body { padding: 13px 15px 15px; }

.card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  image-rendering: pixelated;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; display: block; }

.avatar-stack { display: flex; align-items: center; flex: none; }
.avatar-stack .avatar { width: 30px; height: 30px; border: 2px solid #141926; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .avatar.more { background: var(--panel-2); font-size: 10px; color: var(--muted); }

.card-player {
  font-weight: 650;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.card-date { flex: none; margin-left: auto; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }

.card-title {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--muted-2);
}

.card-foot .tag {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(124, 92, 255, 0.1);
  color: #a793ff;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-foot .size { margin-left: auto; }

/* Empty */
.empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(17, 21, 32, 0.35);
}

.empty-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted-2);
  margin-bottom: 16px;
}
.empty-icon svg { width: 26px; height: 26px; }
.empty h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -0.01em; }
.empty p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; max-width: 340px; }

/* ------------------------------------------------------------------ */
/* Modal                                                               */
/* ------------------------------------------------------------------ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.overlay.open { display: flex; }

.modal {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, #151a26, #0f131d);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: rise 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  margin: auto;
}

.modal.wide { max-width: 900px; }

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 0;
}

.modal-head h2 {
  font-size: 18px;
  letter-spacing: -0.025em;
  margin: 0;
}

.modal-head .btn-icon { margin-left: auto; }

.modal-body { padding: 20px 22px; }

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 22px 22px;
}

/* Upload dropzone */
.drop {
  position: relative;
  border: 1.5px dashed #2b3348;
  border-radius: 13px;
  padding: 26px 18px;
  text-align: center;
  background: rgba(10, 13, 20, 0.6);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
  margin-bottom: 18px;
}

.drop:hover, .drop.drag {
  border-color: rgba(124, 92, 255, 0.6);
  background: rgba(124, 92, 255, 0.06);
}

.drop svg.drop-icon {
  width: 28px;
  height: 28px;
  color: var(--muted-2);
  margin-bottom: 9px;
}

.drop-title { font-size: 13.5px; font-weight: 600; }
.drop-sub { font-size: 12px; color: var(--muted-2); margin-top: 3px; }

.drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

.file-picked {
  display: none;
  position: relative;
  z-index: 2;
  text-align: left;
  background: rgba(124, 92, 255, 0.07);
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 10px;
  padding: 9px;
  margin-top: 12px;
}

.file-picked.show { display: block; }

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 164px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 6px 8px;
}

.file-item > svg { width: 16px; height: 16px; color: #a793ff; flex: none; }
.file-meta { min-width: 0; flex: 1; }
.file-name {
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-size { font-size: 11px; color: var(--muted-2); }

.file-remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
}
.file-remove:hover { background: rgba(255, 93, 108, 0.12); color: #ff8b96; }
.file-remove svg { width: 13px; height: 13px; }

.file-total {
  font-size: 11px;
  color: var(--muted-2);
  text-align: right;
  padding: 7px 2px 0;
}

.clip-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.clip-tabs[hidden] { display: none; }

.clip-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.clip-tab:hover { border-color: #323a4f; color: var(--text); }
.clip-tab.active {
  background: var(--accent-soft);
  border-color: rgba(124, 92, 255, 0.4);
  color: #c9beff;
}
.clip-tab svg { width: 12px; height: 12px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

textarea.input { resize: vertical; min-height: 74px; }

.progress {
  display: none;
  margin-top: 16px;
}

.progress.show { display: block; }

.progress-bar {
  height: 6px;
  border-radius: 99px;
  background: #1b2130;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 7px;
}

/* Report detail */
.detail-video {
  width: 100%;
  max-height: 62vh;
  background: #000;
  border-radius: 12px;
  display: block;
  border: 1px solid var(--border-soft);
}

.detail-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
}

.detail-info .avatar-stack .avatar { width: 44px; height: 44px; border-radius: 11px; font-size: 16px; border-width: 2px; }
.detail-main { min-width: 0; flex: 1; }
.detail-player { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.detail-title { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  padding: 5px 9px;
}

.chip svg { width: 13px; height: 13px; color: var(--muted-2); }

.detail-notes {
  margin-top: 16px;
  font-size: 13.5px;
  color: #c3cada;
  white-space: pre-wrap;
  background: rgba(10, 13, 20, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  max-height: 180px;
  overflow-y: auto;
}

.detail-actions {
  display: flex;
  gap: 9px;
  margin-left: auto;
  flex: none;
}

@media (max-width: 600px) {
  .detail-info { flex-wrap: wrap; }
  .detail-actions { width: 100%; margin-left: 0; }
  .detail-actions .btn { flex: 1; }
}

/* Toast */
.toasts {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #161c2a;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 15px;
  font-size: 13px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  animation: toastIn 0.25s ease both;
  max-width: 340px;
}

.toast.out { animation: toastOut 0.2s ease forwards; }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.ok svg { color: var(--success); }
.toast.err svg { color: var(--danger); }

@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* Skeleton */
.skeleton {
  height: 260px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, #101420 30%, #171d2b 50%, #101420 70%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .user-chip span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ------------------------------------------------------------------ */
/* Public share page                                                   */
/* ------------------------------------------------------------------ */

.share-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(8, 10, 15, 0.82);
  backdrop-filter: blur(14px);
}

.share-top .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.share-top .brand-name { font-size: 15px; }
.share-top .brand-sub { font-size: 11px; }

.share-tag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #a793ff;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.share-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.share-card {
  background: linear-gradient(180deg, rgba(22, 27, 40, 0.9), rgba(13, 16, 24, 0.96));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(14px, 2.5vw, 24px);
  box-shadow: var(--shadow);
  animation: rise 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.share-card[hidden] { display: none; }
.share-card .detail-video { max-height: 68vh; }

.share-error {
  text-align: center;
  padding: 64px 24px;
}

.share-error .empty-icon { margin: 0 auto 18px; }
.share-error h1 { font-size: 20px; letter-spacing: -0.02em; margin: 0 0 8px; }
.share-error p { margin: 0 auto; max-width: 420px; color: var(--muted); font-size: 13.5px; }

.share-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--muted-2);
}

.share-foot svg { flex: none; }

/* Share modal */
.share-intro { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }

.mini-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}

.copy-row { display: flex; gap: 8px; margin-bottom: 12px; }
.copy-row .input {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #b9c1d6;
}

.share-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.share-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #d9b98a;
  background: rgba(255, 183, 77, 0.07);
  border: 1px solid rgba(255, 183, 77, 0.18);
}

.share-warning svg { flex: none; margin-top: 1px; }

.tag.shared {
  color: #66e7b0;
  background: rgba(61, 220, 151, 0.1);
}

@media (max-width: 600px) {
  .share-top .brand-sub { display: none; }
  .share-wrap { padding: 20px 12px 40px; }
  .share-card { border-radius: 16px; }
}

