* {
  box-sizing: border-box
}

:root {
  --bg: #050716;
  --bg2: #0b1024;
  --card: rgba(17, 25, 52, .86);
  --card2: rgba(255, 255, 255, .055);
  --border: rgba(255, 255, 255, .09);
  --text: #fff;
  --muted: #9aa6bd;
  --red: #ff2d55;
  --pink: #ff3d7f;
  --purple: #7c3aed;
  --green: #10b981;
  --blue: #38bdf8;
  --shadow: 0 28px 90px rgba(0, 0, 0, .45)
}

*::selection {
  background: rgba(255, 45, 85, .35)
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 0, rgba(124, 58, 237, .27), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(255, 45, 85, .18), transparent 34%),
    linear-gradient(180deg, #050716, #070a18 45%, #040613);
  color: var(--text);
  min-height: 100vh
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 42px 42px
}

a {
  color: inherit;
  text-decoration: none
}

p {
  color: var(--muted);
  line-height: 1.65
}

img {
  max-width: 100%
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 36px;
  background: rgba(5, 7, 18, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border)
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.03em
}

.brand:before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--red), var(--purple));
  box-shadow: 0 0 28px rgba(255, 45, 85, .35)
}

.topbar nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center
}

.topbar a,
.topbar button {
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 800;
  transition: .2s ease
}

.topbar a:hover,
.topbar button:hover {
  background: rgba(255, 255, 255, .1);
  transform: translateY(-1px)
}

.start-stream-link {
  background: linear-gradient(135deg, var(--red), #ff1748) !important;
  border-color: rgba(255, 255, 255, .16) !important;
  box-shadow: 0 12px 30px rgba(255, 45, 85, .25)
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 34px
}

.card,
.hero-card,
.feature,
.stream-card,
.player-card,
.chat-panel,
.catalog-hero,
.catalog-filters,
.studio-hero,
.catalog-sidebar,
.account-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 30px;
  box-shadow: var(--shadow)
}

h1 {
  font-size: clamp(44px, 6vw, 82px);
  line-height: .9;
  margin: 12px 0 18px;
  letter-spacing: -.055em
}

h2 {
  font-size: 34px;
  margin: 0 0 18px;
  letter-spacing: -.03em
}

h3 {
  font-size: 22px;
  margin: 0 0 12px
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--red), #ff1748);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(255, 45, 85, .25);
  transition: .2s ease
}

button:hover,
.btn:hover {
  transform: translateY(-2px)
}

.secondary,
.btn.secondary {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: none
}

.small {
  padding: 10px 14px;
  font-size: 13px
}

.danger {
  background: linear-gradient(135deg, #be123c, #ef4444) !important
}

input,
textarea,
select {
  width: 100%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .09);
  color: #fff;
  padding: 15px 18px;
  border-radius: 16px;
  outline: 0;
  margin: 8px 0 18px
}

textarea {
  min-height: 125px;
  resize: vertical
}

label {
  display: block;
  color: #d6deef;
  font-weight: 900;
  margin: 12px 0 5px
}

.error {
  color: #ff7d96
}

.success {
  color: #67ffc6
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 45, 85, .13);
  border: 1px solid rgba(255, 45, 85, .35);
  color: #ff9aae;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .04em
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px
}

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

.feature {
  transition: .2s ease
}

.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 45, 85, .28)
}

/* landing */
.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 30px;
  align-items: center;
  min-height: 520px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 45, 85, .22), transparent 34%),
    radial-gradient(circle at 18% 85%, rgba(124, 58, 237, .22), transparent 36%),
    rgba(17, 25, 52, .88)
}

.landing-hero p {
  font-size: 18px;
  max-width: 650px
}

.hero-preview {
  display: flex;
  justify-content: center
}

.fake-player {
  width: 100%;
  max-width: 560px;
  border-radius: 32px;
  background: #10182f;
  border: 1px solid var(--border);
  padding: 26px
}

.fake-player strong {
  display: block;
  font-size: 32px;
  margin: 12px 0
}

.fake-screen {
  height: 280px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 45, 85, .55), rgba(124, 58, 237, .55)), #111
}

.quick-grid,
.dashboard-cards,
.studio-help {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px
}

/* dashboard */
.dashboard-hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .18), rgba(255, 45, 85, .08)), var(--card);
  border: 1px solid var(--border)
}

.profile-mini {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--border)
}

.profile-mini-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900
}

.profile-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.profile-mini span {
  display: block;
  color: var(--muted);
  margin-top: 4px
}

.zone-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .2);
  color: #d9ccff;
  font-size: 12px;
  font-weight: 900
}

.viewer-zone {
  background: linear-gradient(135deg, rgba(56, 189, 248, .12), rgba(17, 25, 52, .86))
}

.streamer-zone {
  background: linear-gradient(135deg, rgba(255, 45, 85, .16), rgba(17, 25, 52, .86))
}

/* catalog */
.new-catalog-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px
}

.start-stream-big {
  white-space: nowrap
}

.catalog-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px
}

.catalog-sidebar {
  position: sticky;
  top: 95px;
  height: fit-content
}

.catalog-sidebar h3 {
  font-size: 28px
}

.catalog-main {
  min-width: 0
}

.big-search {
  height: 58px;
  margin: 0 0 22px;
  font-size: 16px
}

.streams-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px
}

.stream-card-new {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column
}

.stream-thumb {
  height: 170px;
  background: linear-gradient(135deg, rgba(255, 45, 85, .78), rgba(124, 58, 237, .78)), #111827;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  font-weight: 900
}

.stream-thumb span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .3)
}

.stream-card-body {
  padding: 20px;
  flex: 1
}

.watch-btn {
  margin: 0 20px 20px
}

.category-chips,
.streamer-category-chips,
.stream-category-list,
.selected-filter-box,
#selectedCategoriesList {
  display: flex;
  flex-wrap: wrap;
  gap: 9px
}

.category-filter-chip,
.streamer-category-chip,
.category-chip,
.selected-category-pill {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #e7eaf3;
  font-weight: 900;
  font-size: 12px;
  box-shadow: none
}

.category-filter-chip.active,
.streamer-category-chip.active,
.selected-category-pill {
  background: linear-gradient(135deg, var(--red), var(--purple));
  box-shadow: 0 10px 25px rgba(255, 45, 85, .22)
}

.selected-filter-box {
  margin: 16px 0;
  padding: 12px;
  background: rgba(124, 58, 237, .12);
  border: 1px solid rgba(124, 58, 237, .24);
  border-radius: 18px
}

.live-filter-button.active {
  background: rgba(16, 185, 129, .18);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, .3)
}

/* watch */
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr)360px;
  gap: 24px;
  align-items: start
}

.watch-page .player-card {
  padding: 32px
}

.stream-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px
}

.viewer-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;

    width:auto;
    min-width:70px;
    height:44px;

    padding:0 14px;

    flex:none !important;

    border-radius:999px;
    background:rgba(16,185,129,.16);
    color:#a7f3d0;
    font-weight:900;
}

.chat-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
}

.chat-head > *{
    flex:none;
}

.chat-head > div:first-child{
    flex:1;
}

.video-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, .08)
}

video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000
}

.offline-box {
  padding: 70px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border)
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffd1d7;
  font-weight: 900
}

.live-dot:before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px var(--red)
}

.offline-dot {
  color: #9aa6bd
}

.offline-dot:before {
  background: #7d8798;
  box-shadow: none
}

.chat-panel {
  min-height: 620px;
  display: flex;
  flex-direction: column
}

.chat-head {
  display: flex;
  justify-content: space-between
}

.chat-head h2 {
  margin-bottom: 8px
}

.chat-status {
  height: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, .16);
  color: #7dffc8;
  font-weight: 900;
  font-size: 12px
}

.chat-messages {
  flex: 1;
  overflow: auto;
  max-height: 480px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border)
}

.chat-message {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
  margin-bottom: 10px
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--purple));
  flex: 0 0 auto
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.chat-meta {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px
}

.chat-meta strong {
  color: #fff
}

.chat-text {
  margin-top: 5px
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 10px;
  margin-top: 12px
}

.chat-form input {
  margin: 0
}

.chat-form button {
  padding: 0
}

/* streamer */
.studio-hero-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(255, 45, 85, .16), rgba(124, 58, 237, .12)), var(--card)
}

.studio-card {
  margin-top: 24px
}

.studio-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px
}

.studio-tabs button {
  background: rgba(255, 255, 255, .07);
  box-shadow: none
}

.studio-tab {
  display: none
}

.studio-tab.active {
  display: block
}

.stream-live-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .24);
  color: #a7f3d0
}

.stream-live-switch input {
  width: 18px;
  margin: 0
}

.code-box {
  padding: 15px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--border);
  word-break: break-all
}

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

.analytics-card {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--border)
}

.analytics-card strong {
  display: block;
  font-size: 32px
}

.moderation-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px
}

.moderation-message,
.analytics-row,
.notification-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--border);
  margin-bottom: 10px
}

.moderation-actions {
  display: flex;
  gap: 8px;
  align-items: center
}

.avatar-preview {
  width: 180px;
  height: 180px;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  font-weight: 900;
  margin-bottom: 20px
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

@media(max-width:1100px) {

  .landing-hero,
  .dashboard-hero,
  .watch-layout,
  .catalog-layout {
    grid-template-columns: 1fr
  }

  .catalog-sidebar {
    position: static
  }

  .streams-grid,
  .grid,
  .quick-grid,
  .dashboard-cards,
  .studio-help {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .chat-panel {
    min-height: 460px
  }
}

@media(max-width:720px) {
  .topbar {
    padding: 14px;
    align-items: flex-start;
    flex-direction: column
  }

  .container {
    padding: 18px
  }

  h1 {
    font-size: 42px
  }

  .streams-grid,
  .grid,
  .quick-grid,
  .dashboard-cards,
  .studio-help,
  .analytics-grid {
    grid-template-columns: 1fr
  }

  .card,
  .hero-card,
  .feature,
  .stream-card,
  .player-card,
  .chat-panel,
  .catalog-hero,
  .catalog-filters,
  .studio-hero,
  .catalog-sidebar {
    padding: 22px;
    border-radius: 24px
  }

  .new-catalog-hero,
  .studio-hero-new {
    flex-direction: column;
    align-items: flex-start
  }

  .start-stream-big {
    width: 100%
  }
}

/* Separate chat tab */
.chat-only-page {
  max-width: 900px
}

.chat-panel-full {
  min-height: calc(100vh - 150px)
}

.chat-panel-full .chat-messages {
  max-height: none;
  min-height: 55vh
}

.chat-head .btn.small {
  white-space: nowrap
}

@media(max-width:720px) {
  .chat-head {
    gap: 12px;
    flex-wrap: wrap
  }

  .chat-head .btn.small {
    width: 100%;
    text-align: center
  }

  .chat-panel-full {
    min-height: 70vh
  }
}

.chat-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
}

.chat-head-left{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}

.chat-head-left p{
    margin-bottom:14px;
}

.chat-tab-btn{
    width:auto !important;
    padding:8px 14px !important;
    font-size:12px !important;
    border-radius:12px !important;
}

.chat-status{
    flex:none;
    white-space:nowrap;
}