:root {
  --ztv-bg: #0f0b1e;
  --ztv-bg-2: #17112d;
  --ztv-panel: rgba(34, 23, 70, .92);
  --ztv-panel-2: rgba(44, 29, 88, .92);
  --ztv-purple: #6757d6;
  --ztv-purple-2: #8c52ff;
  --ztv-pink: #f33059;
  --ztv-mint: #7fffd4;
  --ztv-text: #ffffff;
  --ztv-muted: rgba(255, 255, 255, .72);
  --ztv-border: rgba(255, 255, 255, .13);
  --ztv-shadow: 0 22px 60px rgba(0, 0, 0, .38);
  --ztv-radius: 22px;
  --ztv-radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.ztv-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ztv-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(140, 82, 255, .28), transparent 34%),
    radial-gradient(circle at 95% 15%, rgba(243, 48, 89, .22), transparent 30%),
    linear-gradient(135deg, #0f0b1e, #17112d 46%, #221746);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.ztv-body a {
  color: inherit;
}

.ztv-dashboard,
.ztv-watch-layout {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
}

.ztv-dashboard {
  padding: 28px 0 60px;
}

.ztv-dashboard-head,
.ztv-watch-top,
.ztv-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ztv-dashboard-head {
  margin-bottom: 22px;
  padding: 22px;
  border-radius: var(--ztv-radius);
  background: linear-gradient(135deg, rgba(44, 29, 88, .96), rgba(34, 23, 70, .92));
  border: 1px solid var(--ztv-border);
  box-shadow: var(--ztv-shadow);
}

.ztv-dashboard-head h1,
.ztv-section-title h2,
.ztv-watch-info h1 {
  margin: 0;
  line-height: 1.1;
}

.ztv-dashboard-head h1 {
  font-size: clamp(28px, 4vw, 46px);
}

.ztv-dashboard-head p,
.ztv-section-title p,
.ztv-about-box p,
.ztv-empty p {
  color: var(--ztv-muted);
}

.ztv-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--ztv-muted);
  text-decoration: none;
  font-weight: 800;
}

.ztv-back:hover {
  color: #fff;
}

.ztv-primary-btn,
.ztv-ghost-btn,
.ztv-report-btn,
.ztv-chat-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}

.ztv-primary-btn {
  background: linear-gradient(135deg, var(--ztv-pink), var(--ztv-purple-2));
  box-shadow: 0 12px 26px rgba(243, 48, 89, .28);
}

.ztv-ghost-btn,
.ztv-report-btn {
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--ztv-border);
}

.ztv-primary-btn:hover,
.ztv-ghost-btn:hover,
.ztv-report-btn:hover,
.ztv-chat-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.ztv-primary-btn:disabled,
.ztv-ghost-btn:disabled,
.ztv-report-btn:disabled,
.ztv-chat-form button:disabled,
.ztv-gift-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

.ztv-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ztv-notice {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: var(--ztv-radius-sm);
  color: #fff;
  background: linear-gradient(135deg, rgba(127, 255, 212, .16), rgba(103, 87, 214, .3));
  border: 1px solid rgba(127, 255, 212, .32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
  font-weight: 800;
}

.ztv-empty,
.ztv-about-box,
.ztv-dashboard-form,
.ztv-chat-card,
.ztv-gift-card {
  border-radius: var(--ztv-radius);
  background: var(--ztv-panel);
  border: 1px solid var(--ztv-border);
  box-shadow: var(--ztv-shadow);
}

.ztv-empty,
.ztv-about-box,
.ztv-dashboard-form {
  padding: 22px;
}

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

.ztv-full {
  grid-column: 1 / -1;
}

.ztv-dashboard-form label,
.ztv-modal-card label,
.ztv-mod-form label {
  display: grid;
  gap: 7px;
  color: var(--ztv-muted);
  font-size: 13px;
  font-weight: 800;
}

.ztv-dashboard-form input,
.ztv-dashboard-form select,
.ztv-dashboard-form textarea,
.ztv-modal-card input,
.ztv-modal-card select,
.ztv-modal-card textarea,
.ztv-mod-form input,
.ztv-mod-form select,
.ztv-mod-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 11px 13px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.ztv-dashboard-form input:focus,
.ztv-dashboard-form select:focus,
.ztv-dashboard-form textarea:focus,
.ztv-modal-card input:focus,
.ztv-modal-card select:focus,
.ztv-modal-card textarea:focus,
.ztv-mod-form input:focus,
.ztv-mod-form select:focus,
.ztv-mod-form textarea:focus {
  border-color: rgba(127, 255, 212, .55);
  box-shadow: 0 0 0 4px rgba(127, 255, 212, .12);
}

.ztv-dashboard-form em {
  color: rgba(255, 255, 255, .55);
  font-style: normal;
  font-size: 12px;
}

.ztv-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
}

.ztv-check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--ztv-pink);
}

.ztv-install-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ztv-install-logo {
  width: 86px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35));
}

.ztv-table-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ztv-table-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
}

.ztv-ok {
  color: var(--ztv-mint);
  font-weight: 900;
}

.ztv-missing {
  color: var(--ztv-pink);
  font-weight: 900;
}

.ztv-watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
  padding: 18px 0 60px;
}

.ztv-watch-main {
  min-width: 0;
}

.ztv-watch-top {
  margin-bottom: 14px;
}

.ztv-watch-player,
.ztv-watch-info,
.ztv-watch-chat {
  min-width: 0;
}

.ztv-player {
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid var(--ztv-border);
  box-shadow: var(--ztv-shadow);
}

.ztv-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.ztv-fake-player {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(62vh, 640px);
  padding: 34px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(243, 48, 89, .22), transparent 24%),
    radial-gradient(circle at 15% 20%, rgba(127, 255, 212, .14), transparent 24%),
    linear-gradient(135deg, #120d21, #2c1d58);
}

.ztv-fake-player h1 {
  margin: 14px 0 6px;
  font-size: clamp(32px, 5vw, 72px);
}

.ztv-fake-player p {
  max-width: 700px;
  margin: 0 auto 8px;
  color: var(--ztv-muted);
}

.ztv-fake-player span {
  color: rgba(255, 255, 255, .56);
}

.ztv-live-watermark {
  position: absolute;
  top: 18px;
  left: 18px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(243, 48, 89, .95);
  font-weight: 1000;
  letter-spacing: .06em;
}

.ztv-pulse-orb {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ztv-pink), var(--ztv-purple-2));
  box-shadow: 0 0 0 0 rgba(243, 48, 89, .45);
  animation: ztvPulse 1.6s infinite;
}

@keyframes ztvPulse {
  0% {
    transform: scale(.95);
    box-shadow: 0 0 0 0 rgba(243, 48, 89, .45);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 28px rgba(243, 48, 89, 0);
  }

  100% {
    transform: scale(.95);
    box-shadow: 0 0 0 0 rgba(243, 48, 89, 0);
  }
}

.ztv-watch-info {
  margin-top: 16px;
}

.ztv-creator-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.ztv-avatar {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, var(--ztv-purple), var(--ztv-pink));
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, .22);
  box-shadow: 0 0 0 4px rgba(243, 48, 89, .12);
}

.ztv-avatar-xl {
  width: 76px;
  height: 76px;
}

.ztv-creator-line a {
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.ztv-creator-line small {
  display: block;
  margin-top: 5px;
  color: var(--ztv-muted);
}

.ztv-live-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: var(--ztv-pink);
  box-shadow: 0 0 20px rgba(243, 48, 89, .42);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .05em;
}

.ztv-follow-btn {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--ztv-purple), var(--ztv-purple-2));
  font-weight: 900;
  cursor: pointer;
}

.ztv-follow-btn.is-following {
  background: rgba(255, 255, 255, .12);
  border: 1px solid var(--ztv-border);
}

.ztv-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ztv-tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  font-size: 12px;
  font-weight: 800;
}

.ztv-section {
  margin-top: 26px;
}

.ztv-grid {
  display: grid;
  gap: 16px;
}

.ztv-channel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ztv-card {
  overflow: hidden;
  border-radius: var(--ztv-radius);
  background: var(--ztv-panel);
  border: 1px solid var(--ztv-border);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

.ztv-thumb {
  position: relative;
  display: block;
  min-height: 150px;
  color: #fff;
  text-decoration: none;
  background-size: cover;
  background-position: center;
  background-color: #17112d;
}

.ztv-thumb-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(243, 48, 89, .26), transparent 34%),
    linear-gradient(135deg, #221746, #6757d6);
}

.ztv-thumb .ztv-live-pill {
  position: absolute;
  top: 10px;
  left: 10px;
}

.ztv-card-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 12px;
}

.ztv-card-copy {
  min-width: 0;
}

.ztv-card-title {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ztv-card-copy small {
  display: block;
  margin-top: 4px;
  color: var(--ztv-muted);
}

.ztv-watch-chat {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
}

.ztv-chat-card,
.ztv-gift-card {
  padding: 14px;
}

.ztv-chat-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: min(690px, calc(100vh - 32px));
}

.ztv-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ztv-border);
}

.ztv-chat-head strong {
  font-weight: 1000;
}

.ztv-chat-head span {
  color: var(--ztv-muted);
  font-size: 12px;
  font-weight: 800;
}

.ztv-chat-list {
  overflow-y: auto;
  padding: 12px 2px;
  scrollbar-width: thin;
}

.ztv-chat-list p {
  margin: 0 0 10px;
  line-height: 1.35;
  color: rgba(255, 255, 255, .86);
  word-break: break-word;
}

.ztv-chat-list strong {
  color: var(--ztv-mint);
}

.ztv-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--ztv-border);
}

.ztv-chat-form input {
  min-width: 0;
  border: 1px solid var(--ztv-border);
  border-radius: 999px;
  padding: 12px 14px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.ztv-chat-form input:focus {
  border-color: rgba(127, 255, 212, .55);
}

.ztv-chat-form button {
  background: linear-gradient(135deg, var(--ztv-pink), var(--ztv-purple-2));
}

.ztv-badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.ztv-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, rgba(103, 87, 214, .95), rgba(243, 48, 89, .9));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .26);
}

.ztv-badge-founder {
  background: linear-gradient(135deg, #ffb347, #f33059);
}

.ztv-badge-live {
  background: linear-gradient(135deg, #f33059, #8c52ff);
}

.ztv-badge-night {
  background: linear-gradient(135deg, #221746, #6757d6);
}

.ztv-badge-gift {
  background: linear-gradient(135deg, #7fffd4, #6757d6);
}

.ztv-badge-mod {
  background: linear-gradient(135deg, #242940, #7fffd4);
}

.ztv-badge-signal {
  background: linear-gradient(135deg, #8c52ff, #f33059);
}

.ztv-gift-card {
  margin-top: 14px;
}

.ztv-gift-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ztv-gift-btn {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px 10px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 10px;
  text-align: left;
  align-items: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, rgba(103, 87, 214, .75), rgba(44, 29, 88, .98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  transition: transform .18s ease, filter .18s ease;
}

.ztv-gift-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.ztv-gift-icon {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  font-size: 22px;
}

.ztv-gift-btn strong,
.ztv-gift-btn small {
  display: block;
}

.ztv-gift-btn small {
  color: var(--ztv-muted);
}

.ztv-gift-chat-line {
  color: var(--ztv-mint) !important;
}

.ztv-gift-burst {
  position: fixed;
  z-index: 100000;
  left: 50%;
  top: 50%;
  font-size: 80px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.4);
  animation: ztvGiftBurst 1.25s ease forwards;
}

@keyframes ztvGiftBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.4) rotate(-12deg);
  }

  28% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12) rotate(8deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -88%) scale(.85) rotate(0deg);
  }
}

.ztv-report-btn:hover {
  background: rgba(243, 48, 89, .28);
}

.ztv-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(8, 7, 18, .72);
  backdrop-filter: blur(8px);
}

.ztv-modal.is-open {
  display: grid;
}

.ztv-modal-card {
  position: relative;
  width: min(520px, 100%);
  border-radius: 24px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, #2c1d58, #221746);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.ztv-modal-card h2 {
  margin: 0 0 8px;
}

.ztv-modal-card p {
  color: var(--ztv-muted);
}

.ztv-modal-card textarea {
  min-height: 130px;
  resize: vertical;
}

.ztv-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.ztv-report-list {
  display: grid;
  gap: 16px;
}

.ztv-report-item {
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
}

.ztv-report-item > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ztv-report-item a {
  color: var(--ztv-mint);
}

.ztv-report-item small {
  color: var(--ztv-muted);
}

.ztv-mod-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ztv-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100001;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 15px;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .36);
}

.ztv-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ztv-toast.is-success {
  background: linear-gradient(135deg, var(--ztv-purple), var(--ztv-purple-2));
  border: 1px solid rgba(127, 255, 212, .26);
}

.ztv-toast.is-error {
  background: linear-gradient(135deg, #991f3a, var(--ztv-pink));
  border: 1px solid rgba(255, 255, 255, .16);
}

@media (max-width: 1150px) {
  .ztv-watch-layout {
    grid-template-columns: 1fr;
  }

  .ztv-watch-chat {
    position: static;
    height: auto;
  }

  .ztv-chat-card {
    height: 520px;
  }

  .ztv-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ztv-dashboard,
  .ztv-watch-layout {
    width: min(100% - 20px, 1500px);
  }

  .ztv-dashboard-head,
  .ztv-watch-top,
  .ztv-section-title,
  .ztv-install-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .ztv-form-grid {
    grid-template-columns: 1fr;
  }

  .ztv-channel-grid {
    grid-template-columns: 1fr;
  }

  .ztv-creator-line {
    grid-template-columns: 1fr;
  }

  .ztv-chat-form {
    grid-template-columns: 1fr;
  }

  .ztv-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ztv-action-row > * {
    width: 100%;
  }

  .ztv-install-logo {
    width: 72px;
  }
}