:root {
  --bg: #0c0c11;
  --surface: #13131b;
  --surface-2: #191923;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f7f7fb;
  --muted: #9292a1;
  --soft: #c8c8d4;
  --accent: #ff2f86;
  --accent-2: #2ee8b6;
  --warn: #ffc857;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100svh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #101018 0%, var(--bg) 48%, #09090d 100%);
}

.topbar {
  height: 64px;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  background: rgba(12, 12, 17, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  z-index: 10;
}

.sidebar-backdrop {
  display: none;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), #7a4cff);
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(255, 47, 134, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.nav-link,
.bottom-nav button,
.bottom-nav a {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  text-decoration: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

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

#topAccountActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.lang-button {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.lang-button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.lang-select {
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  outline: none;
}

.pill-button,
.wide-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  text-decoration: none;
}

.pill-button:hover,
.wide-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.pill-button.primary {
  border-color: transparent;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(255, 47, 134, 0.22);
}

.pill-button.warn {
  border-color: transparent;
  background: linear-gradient(135deg, #ff8a3d, #ff5a36);
  box-shadow: 0 14px 28px rgba(255, 120, 72, 0.22);
}

.pill-button.ghost {
  color: var(--soft);
}

.workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.sidebar,
.inspector {
  min-height: 0;
  overflow-y: auto;
  background: rgba(11, 11, 16, 0.74);
}

.sidebar {
  border-right: 1px solid var(--line);
}

.inspector {
  border-left: 1px solid var(--line);
  padding: 22px;
  display: none;
}

.sidebar-head {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-section {
  padding: 22px 18px 0;
}

.side-section h2,
.inspector h2 {
  margin: 0 0 12px;
  color: #747484;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.category-list {
  display: grid;
  gap: 8px;
}

.sidebar-skeleton,
.account-skeleton {
  display: grid;
  gap: 8px;
}

.sidebar-skeleton-line,
.chip-skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  background-size: 220% 100%;
  animation: skeletonSweep 1100ms ease-in-out infinite;
}

.sidebar-skeleton-line {
  height: 42px;
  border-radius: 12px;
}

.sidebar-skeleton-line.active {
  box-shadow: inset 3px 0 0 rgba(255, 47, 134, 0.8);
}

.sidebar-skeleton-line.short {
  width: 78%;
}

.chip-skeleton {
  display: inline-block;
  width: 70px;
  height: 34px;
  border-radius: 999px;
}

.filter-button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  padding: 11px 12px;
  text-align: left;
  font-weight: 850;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.filter-button:hover,
.filter-button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.filter-button.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.filter-button small {
  color: #6d6d7b;
  font-weight: 800;
}

.content-panel {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 26px;
}

.surface-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
  align-items: end;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(46, 232, 182, 0.08), 0 0 18px rgba(46, 232, 182, 0.9);
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 0.95;
  letter-spacing: 0;
}

.surface-head h1 {
  font-size: clamp(14px, 1.5vw, 20px);
  line-height: 1.18;
  font-weight: 800;
}

.search-box {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.search-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-box input,
.toolbar-row select {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.search-box input {
  height: 46px;
  border-radius: 999px;
  padding: 0 18px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 26px 0 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.metric-strip div {
  padding: 18px;
  background: rgba(19, 19, 27, 0.86);
}

.metric-strip strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.metric-strip span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0 16px;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-select-group {
  display: grid;
  gap: 6px;
}

.toolbar-select-group span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-scroll {
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mobile-scroll::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 850;
}

.chip.active {
  color: var(--text);
  background: var(--accent);
  border-color: transparent;
}

.chip.loading,
.filter-button.loading {
  position: relative;
}

.chip.loading::after,
.filter-button.loading::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 8px;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.78;
  animation: pulseDot 760ms ease-in-out infinite;
}

.toolbar-row select {
  width: 150px;
  height: 38px;
  border-radius: 999px;
  padding: 0 12px;
}

#regionSelect {
  width: 188px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  padding-bottom: 18px;
}

.loading-state {
  grid-column: 1 / -1;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
}

.loading-state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(46, 232, 182, 0.08), 0 0 18px rgba(46, 232, 182, 0.75);
  animation: pulseDot 760ms ease-in-out infinite;
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 38px;
}

.pager-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.pager-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.seo-section {
  margin: 8px 0 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.seo-section h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
}

.seo-section p {
  margin: 0;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
}

.seo-room-links,
.seo-chip-row,
.seo-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.seo-room-link,
.seo-inline-link,
.seo-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}

.seo-room-link,
.seo-inline-link {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.seo-chip {
  color: var(--accent-2);
  border: 1px solid rgba(46, 232, 182, 0.2);
  background: rgba(46, 232, 182, 0.08);
}

.seo-inline-links span {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-right: 4px;
}

.seo-fact-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--soft);
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.link-card {
  position: relative;
  min-height: 292px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    var(--surface);
  box-shadow: var(--shadow);
  animation: cardIn 420ms ease both;
}

.room-card {
  min-height: 0;
  aspect-ratio: 3 / 3.45;
  border-color: rgba(255, 255, 255, 0.1);
  background: #08080d;
}

.skeleton-card {
  min-height: 292px;
  animation: cardIn 220ms ease both;
  background: #0b0b10;
}

.skeleton-block,
.skeleton-line,
.skeleton-pills span,
.skeleton-badge {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  background-size: 220% 100%;
  animation: skeletonSweep 1100ms ease-in-out infinite;
}

.skeleton-visual {
  height: 100%;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    #12121a;
}

.skeleton-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: grid;
  gap: 8px;
}

.skeleton-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 12px;
  border-radius: 999px;
}

.skeleton-line {
  height: 13px;
  border-radius: 999px;
}

.skeleton-line.title {
  width: 62%;
  height: 18px;
}

.skeleton-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.skeleton-line.meta {
  width: 88px;
  height: 12px;
}

.skeleton-line.meta.short {
  width: 42px;
}

.skeleton-pills {
  display: flex;
  gap: 8px;
}

.skeleton-pills span {
  width: 52px;
  height: 22px;
  border-radius: 999px;
}

.link-visual {
  display: block;
  height: 154px;
  position: relative;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(255, 47, 134, 0.9), rgba(122, 76, 255, 0.55)),
    radial-gradient(circle at 70% 20%, rgba(46, 232, 182, 0.55), transparent 34%);
}

.room-card .link-visual {
  height: 100%;
  border-radius: inherit;
}

.link-visual.has-image {
  background: #171720;
}

.link-visual.has-image::before,
.link-visual.has-image::after {
  display: none;
}

.link-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center top;
  background: #0a0a0f;
  transform: scale(1);
  transition: transform 240ms ease, filter 240ms ease;
}

.room-card:hover .link-visual img {
  transform: scale(1.01);
  filter: saturate(1.08);
}

.room-card .link-visual::before,
.room-card .link-visual::after {
  display: none;
}

.link-visual::before,
.link-visual::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.link-visual::before {
  width: 116px;
  height: 116px;
  right: -22px;
  top: -26px;
}

.link-visual::after {
  width: 86px;
  height: 86px;
  left: 24px;
  bottom: -28px;
}

.visual-label {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.viewer-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 11px;
  font-weight: 900;
}

.live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  padding: 3px 5px;
  color: #fff;
  background: rgba(37, 31, 45, 0.74);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.live-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f02bdb;
  box-shadow: 0 0 0 3px rgba(240, 43, 219, 0.13);
}

.live-badge strong {
  border-radius: 4px;
  padding: 2px 4px;
  background: #ef2df0;
  font-size: 6px;
  line-height: 1;
  font-weight: 950;
}

.room-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 56%, rgba(0, 0, 0, 0.42) 74%, rgba(0, 0, 0, 0.86) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0));
}

.room-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  z-index: 2;
  display: grid;
  gap: 6px;
}

.room-title-overlay {
  color: #fff;
  font-size: clamp(19px, 1.8vw, 26px);
  line-height: 1;
  font-weight: 950;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.48);
}

.room-stats,
.room-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.viewer-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2ff2f2;
  font-size: 15px;
  font-weight: 900;
}

.viewer-icon {
  position: relative;
  width: 17px;
  height: 18px;
  display: inline-block;
}

.viewer-icon::before,
.viewer-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid currentColor;
}

.viewer-icon::before {
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.viewer-icon::after {
  bottom: 0;
  width: 14px;
  height: 8px;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

.quality-chip {
  color: #ff55ee;
  font-size: 17px;
  font-weight: 950;
}

.room-pills span {
  max-width: 100%;
  border-radius: 6px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.play-chip {
  display: none;
}

.room-card:hover .play-chip,
.room-card:focus-within .play-chip {
  display: none;
}

.link-body {
  padding: 14px;
}

.link-card h3,
.room-title {
  margin: 0;
  min-height: 0;
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 950;
}

.room-subject {
  height: 42px;
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.room-tags {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  overflow: hidden;
}

.room-tags span {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 850;
}

.link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.link-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #dedef0;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 850;
}

.mono {
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
}

.link-url,
.muted {
  color: var(--muted);
}

.link-url {
  width: 100%;
  display: block;
  min-height: 34px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

.card-actions a,
.card-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  text-decoration: none;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.card-actions a {
  background: var(--accent);
  border-color: transparent;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-tags-strip {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
}

.hot-tags-strip h2 {
  margin: 0;
  color: #747484;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.tag-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 850;
}

.tag-button.active,
.tag-button:hover {
  color: var(--text);
  border-color: transparent;
  background: var(--accent);
}

.tag-button small {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.small-text {
  font-size: 12px;
}

.inspector section {
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.inspector p {
  margin: 0;
  color: var(--soft);
  line-height: 1.6;
  font-size: 13px;
}

.wide-button {
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
}

.endpoint-list {
  display: grid;
  gap: 8px;
}

.endpoint-list code {
  display: block;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  overflow-wrap: anywhere;
}

.status-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.status-list div {
  display: grid;
  gap: 3px;
}

.status-list dt {
  color: #686877;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-list dd {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-links {
  display: grid;
  gap: 8px;
}

.account-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.account-links a:last-child {
  border-color: transparent;
  background: var(--accent);
}

.account-user {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.account-user span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.account-user strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.account-center-link {
  color: var(--soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.account-user button {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  font-weight: 900;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.history-list h3 {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.history-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.history-item img,
.history-fallback {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(255, 47, 134, 0.8), rgba(46, 232, 182, 0.3)),
    var(--surface-2);
}

.history-item span {
  min-width: 0;
}

.history-item strong,
.history-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item strong {
  font-size: 12px;
}

.history-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.profile-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #101018 0%, var(--bg) 48%, #09090d 100%);
}

.profile-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 32px;
}

.profile-main {
  padding-top: 22px;
}

.profile-grid {
  display: grid;
  gap: 18px;
}

.profile-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(19, 19, 27, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-panel-head {
  padding: 22px 22px 0;
}

.profile-panel-head h1,
.profile-panel-head h2 {
  margin: 0;
  font-size: 28px;
}

.profile-panel-body {
  padding: 20px 22px 22px;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-summary strong {
  display: block;
  font-size: 20px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), #7a4cff);
  font-size: 24px;
  font-weight: 900;
}

.profile-history-list {
  display: grid;
  gap: 12px;
}

.profile-history-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  gap: 4px;
}

.icon-button span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.icon-close {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 26px;
  line-height: 1;
}

.mobile-only {
  display: none;
}

.bottom-nav {
  height: calc(70px + env(safe-area-inset-bottom));
  flex: 0 0 calc(70px + env(safe-area-inset-bottom));
  display: none;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(8, 8, 12, 0.96);
  backdrop-filter: blur(18px);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav button,
.bottom-nav a {
  min-height: 58px;
  font-size: 11px;
}

.bottom-nav a,
.bottom-nav button {
  display: grid;
  place-items: center;
}

.bottom-nav button.active,
.bottom-nav a.active {
  color: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: min(520px, calc(100vw - 28px));
  transform: translate(-50%, 130%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--text);
  background: rgba(19, 19, 27, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.dashboard-page {
  min-height: 100%;
  overflow: auto;
  background:
    radial-gradient(circle at top left, rgba(255, 47, 134, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(46, 232, 182, 0.14), transparent 28%),
    linear-gradient(180deg, #0f1017 0%, #0a0b10 100%);
}

.dashboard-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.dashboard-hero p {
  margin: 10px 0 0;
  max-width: 680px;
  color: var(--soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.dashboard-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-stack {
  display: grid;
  gap: 18px;
}

.dashboard-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.dashboard-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font-weight: 800;
}

.dashboard-tab.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(19, 19, 27, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}

.dashboard-panel-head h2,
.dashboard-panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.dashboard-panel-body {
  padding: 20px 22px 22px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.metric-card strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  margin-top: 10px;
}

.metric-card span,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.list-table {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
}

.list-row code {
  color: var(--soft);
  word-break: break-all;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.user-pagination {
  justify-content: flex-end;
  margin-top: 16px;
}

.token-form {
  display: grid;
  gap: 12px;
}

.dashboard-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}

.dashboard-input:focus {
  border-color: rgba(255, 47, 134, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 47, 134, 0.12);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(46, 232, 182, 0.12);
}

.status-dot.idle {
  background: var(--warn);
  box-shadow: 0 0 0 6px rgba(255, 200, 87, 0.12);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.trend-chart {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.trend-axis,
.trend-grid {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.trend-label {
  fill: var(--muted);
  font-size: 12px;
}

.trend-line-primary {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-line-secondary {
  fill: none;
  stroke: var(--warn);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-point-primary {
  fill: var(--accent);
}

.trend-point-secondary {
  fill: var(--warn);
}

body.auth-page {
  min-height: 100%;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(18, 18, 26, 0.98), rgba(8, 8, 12, 1)),
    var(--bg);
}

.auth-topbar {
  position: sticky;
  top: 0;
}

.auth-shell {
  min-height: calc(100svh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 520px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(28px, 5vw, 72px);
}

.auth-copy {
  max-width: 620px;
}

.auth-copy h1 {
  font-size: clamp(52px, 8vw, 104px);
}

.auth-lead {
  max-width: 510px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.65;
}

.auth-compact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-compact-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.auth-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(17, 17, 24, 0.96);
  box-shadow: var(--shadow);
}

.auth-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-panel-head strong {
  color: var(--accent-2);
  text-transform: none;
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 34px);
}

.auth-form h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
}

.auth-form p {
  margin: 0 0 6px;
  color: var(--soft);
  line-height: 1.58;
  font-size: 14px;
}

.auth-form code {
  color: var(--accent-2);
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.auth-field input:focus {
  border-color: rgba(255, 47, 134, 0.68);
  box-shadow: 0 0 0 4px rgba(255, 47, 134, 0.12);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  align-items: end;
  gap: 10px;
}

.auth-code-button {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.auth-code-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.auth-primary-button,
.auth-secondary-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 950;
  cursor: pointer;
}

.auth-primary-button {
  border: 0;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 18px 34px rgba(255, 47, 134, 0.22);
}

.auth-primary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.auth-secondary-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.auth-secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.register-options {
  display: grid;
  gap: 8px;
  margin-bottom: 2px;
}

.register-option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.register-option span {
  color: var(--text);
  font-weight: 950;
}

.register-option small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.register-option.active {
  border-color: transparent;
  background: rgba(255, 47, 134, 0.18);
  box-shadow: inset 3px 0 0 var(--accent);
}

.watch-page {
  min-height: 100%;
  overflow: auto;
  background: #08080d;
}

.watch-shell {
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #111118 0%, #08080d 54%, #050507 100%);
}

.watch-topbar {
  flex: 0 0 64px;
}

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

.watch-back {
  margin-left: 0;
}

.watch-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.player-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  justify-items: center;
  align-items: center;
  padding: 0;
  background: #000;
}

.player-ratio {
  position: relative;
  width: min(100vw, calc((100dvh - 64px) * 16 / 9));
  height: min(calc(100dvh - 64px), calc(100vw * 9 / 16));
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.player-video,
.player-frame,
.player-poster,
.player-loading {
  position: absolute;
  inset: 0;
}

.player-video,
.player-frame {
  inset: auto;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-video,
.player-frame {
  display: none;
  border: 0;
  opacity: 0;
  transition: opacity 180ms ease;
}

.player-stage.preloading .player-video,
.player-stage.using-native .player-video,
.player-stage.preloading .player-frame,
.player-stage.using-embed .player-frame {
  display: block;
}

.player-stage.preloading .player-video,
.player-stage.preloading .player-frame {
  pointer-events: none;
}

.player-stage.using-native .player-video,
.player-stage.using-embed .player-frame {
  opacity: 1;
}

.player-video {
  object-fit: contain;
}

.player-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(14px) saturate(1.1);
  transform: scale(1.05);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.player-loading {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--soft);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 47, 134, 0.16), transparent 32%),
    rgba(0, 0, 0, 0.34);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.player-stage.preloading .player-loading,
.player-stage.preloaded .player-loading,
.player-stage.paused .player-loading {
  padding-top: 122px;
}

.player-stage.loaded .player-poster,
.player-stage.loaded .player-loading {
  opacity: 0;
  visibility: hidden;
}

.player-stage.preloaded .loading-spinner {
  border-color: rgba(46, 232, 182, 0.28);
  border-top-color: var(--accent-2);
  animation-duration: 1100ms;
}

.player-stage.paused .player-poster {
  opacity: 0.58;
  visibility: visible;
}

.player-stage.paused .player-loading {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spinLoader 760ms linear infinite;
}

.player-stage.paused .loading-spinner {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 47, 134, 0.94);
  animation: none;
  clip-path: polygon(36% 24%, 36% 76%, 76% 50%);
}

.player-start-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  min-width: 112px;
  height: 52px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 47, 134, 0.92);
  box-shadow: 0 18px 42px rgba(255, 47, 134, 0.28);
  font-size: 15px;
  font-weight: 950;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

.player-start-button:hover {
  transform: translate(-50%, calc(-50% - 1px));
  background: #ff3f91;
}

.player-start-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.player-start-button[hidden],
.player-stage.using-native .player-start-button,
.player-stage.using-embed .player-start-button {
  display: none;
}

.player-start-icon {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
}

.player-controls {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.player-status,
.player-control-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(14, 14, 20, 0.68);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.player-status {
  min-width: 0;
  padding: 9px 12px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

.player-status span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-control-buttons {
  padding: 5px;
  pointer-events: auto;
}

.player-audio-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.player-quality-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 0 2px;
}

.player-quality-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.player-quality-select {
  height: 32px;
  min-width: 86px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 900;
}

.player-quality-control[hidden],
.player-stage.using-embed .player-quality-control {
  display: none;
}

.player-audio-controls[hidden],
.player-stage.using-embed .player-audio-controls {
  display: none;
}

.auth-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 6, 10, 0.78);
  backdrop-filter: blur(10px);
}

.auth-gate-modal {
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(19, 19, 27, 0.96);
  box-shadow: var(--shadow);
}

.auth-gate-modal h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.auth-gate-modal p:not(.eyebrow) {
  margin: 0;
  color: var(--soft);
  line-height: 1.7;
}

.auth-gate-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.player-volume {
  width: 92px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
}

.player-volume input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.player-control-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.player-control-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
}

.player-control-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.player-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}

.fullscreen-icon span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: currentColor;
}

.fullscreen-icon span:first-child {
  top: 2px;
  left: 2px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.fullscreen-icon span:last-child {
  right: 2px;
  bottom: 2px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.mute-body,
.mute-wave,
.mute-slash {
  position: absolute;
}

.mute-body {
  left: 2px;
  top: 5px;
  width: 7px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 25%, 45% 25%, 82% 0, 82% 100%, 45% 75%, 0 75%);
}

.mute-wave {
  border-right: 2px solid currentColor;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 50%;
}

.wave-one {
  right: 4px;
  top: 4px;
  width: 5px;
  height: 10px;
}

.wave-two {
  right: 1px;
  top: 2px;
  width: 8px;
  height: 14px;
}

.mute-slash {
  display: none;
  left: 8px;
  top: 1px;
  width: 2px;
  height: 16px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 999px;
}

.player-control-button.is-muted .mute-wave {
  display: none;
}

.player-control-button.is-muted .mute-slash {
  display: block;
}

.player-control-button.is-fullscreen .fullscreen-icon span:first-child {
  top: 8px;
  left: 8px;
}

.player-control-button.is-fullscreen .fullscreen-icon span:last-child {
  right: 8px;
  bottom: 8px;
}

.player-stage.error .player-controls {
  display: none;
}

.watch-panel {
  display: none;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 24px;
  border-left: 1px solid var(--line);
  background: rgba(13, 13, 18, 0.88);
}

.watch-panel h1 {
  margin-top: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.room-handle {
  margin: 10px 0 0;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.watch-subject {
  margin: 18px 0 0;
  color: var(--soft);
  line-height: 1.55;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.watch-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.watch-stats div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.watch-stats strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.watch-stats span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.detail-list div {
  display: grid;
  gap: 4px;
}

.detail-list dt {
  color: #747484;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.watch-tags {
  margin-top: 24px;
}

.tag-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--accent-2);
  background: rgba(46, 232, 182, 0.07);
  font-size: 12px;
  font-weight: 850;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 38px;
  color: var(--muted);
  text-align: center;
}

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

@keyframes pulseDot {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.86);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes skeletonSweep {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

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

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .inspector {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    background: var(--bg);
  }

  body.menu-open {
    overflow: hidden;
  }

  .mobile-only {
    display: inline-grid;
  }

  .desktop-nav,
  .top-actions .ghost {
    display: none;
  }

  .desktop-action {
    display: none !important;
  }

  .topbar {
    padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    gap: 10px;
  }

  .brand-copy small {
    display: none;
  }

  .top-actions {
    gap: 6px;
  }

  .pill-button {
    padding: 9px 11px;
    font-size: 12px;
  }

  .auth-shell {
    min-height: calc(100svh - 64px);
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
    padding: 26px max(14px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .auth-copy h1 {
    font-size: 52px;
  }

  .auth-lead {
    margin-top: 14px;
    font-size: 15px;
  }

  .auth-panel-head {
    padding: 14px;
  }

  .auth-form {
    padding: 20px 16px;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .workspace {
    display: block;
    overflow-y: auto;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(78vw, 310px);
    z-index: 31;
    transform: translateX(-105%);
    transition: transform 220ms ease;
    box-shadow: 30px 0 70px rgba(0, 0, 0, 0.48);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0 0 0 min(78vw, 310px);
    z-index: 30;
    display: block;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  .content-panel {
    min-height: calc(100svh - 134px - env(safe-area-inset-bottom));
    padding: 18px max(12px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .surface-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  h1 {
    font-size: 34px;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .metric-strip div:last-child {
    grid-column: 1 / -1;
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .link-card {
    min-height: 254px;
    border-radius: 8px;
  }

  .room-card {
    min-height: 0;
    aspect-ratio: 3 / 3.3;
  }

  .skeleton-card {
    min-height: 254px;
  }

  .link-visual {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .room-card .link-visual {
    height: 100%;
    aspect-ratio: auto;
  }

  .live-badge {
    top: 10px;
    right: 10px;
    gap: 4px;
    padding: 3px 5px;
    border-radius: 10px;
  }

  .live-badge span {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 0 3px rgba(240, 43, 219, 0.13);
  }

  .live-badge strong {
    padding: 2px 4px;
    font-size: 6px;
  }

  .room-overlay {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }

  .room-title-overlay {
    font-size: 18px;
  }

  .viewer-count,
  .quality-chip {
    font-size: 13px;
  }

  .room-pills {
    gap: 6px;
  }

  .room-pills span {
    padding: 6px 8px;
    font-size: 11px;
  }

  .play-chip {
    right: 10px;
    bottom: 29%;
    min-width: 34px;
    height: 28px;
    font-size: 11px;
  }

  .link-body {
    padding: 11px;
  }

  .link-card h3,
  .room-title {
    font-size: 14px;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  .room-subject {
    height: 38px;
  }

  .link-url {
    display: none;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .card-actions button {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  .watch-topbar .brand-copy small {
    display: inline;
  }

  .watch-actions {
    gap: 6px;
  }

  .watch-layout {
    display: grid;
  }

  .player-stage {
    padding: 0;
  }

  .player-ratio {
    width: 100vw;
    height: calc(100dvh - 64px);
    max-height: none;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .player-frame {
    top: 0;
    width: 100%;
    height: 100%;
  }

  .player-controls {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    gap: 8px;
  }

  .player-status {
    max-width: min(48vw, 190px);
    padding: 8px 10px;
    font-size: 11px;
  }

  .player-control-buttons {
    gap: 6px;
    padding: 4px;
  }

  .player-control-button {
    width: 38px;
    height: 38px;
  }

  .watch-panel {
    display: none;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px max(14px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .watch-panel h1 {
    font-size: 32px;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .link-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric-strip strong {
    font-size: 22px;
  }

  .dashboard-shell {
    padding-inline: 14px;
  }

  .dashboard-panel-head,
  .dashboard-panel-body {
    padding-inline: 16px;
  }
}

@media (max-width: 360px) {
  .brand-copy strong {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolbar-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .toolbar-row select {
    width: 100%;
    height: 42px;
  }

  .link-grid {
    gap: 8px;
  }

  .link-body {
    padding: 10px;
  }

  .dashboard-actions,
  .dashboard-hero {
    display: grid;
  }

  .link-meta span,
  .room-tags span {
    font-size: 10px;
  }
}

@media (max-width: 920px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
