:root {
  color-scheme: dark;
  --bg: #151515;
  --panel: #1d1d1d;
  --panel-2: #242424;
  --panel-3: #2e2e2e;
  --text: #f7f7f7;
  --muted: #b7b7bd;
  --soft: #8f8f99;
  --line: rgba(255, 255, 255, 0.11);
  --pink: #e73568;
  --pink-2: #ff4f82;
  --cyan: #39baf7;
  --green: #7bff49;
  --purple: #a64dff;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

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

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-auto-rows: max-content;
  gap: 0.65rem;
  height: 100vh;
  padding: 0.7rem 0.55rem;
  background: #2c2929;
  border-right: 1px solid var(--line);
}

.logo {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 0.6rem;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pink), var(--pink-2));
  color: white;
  font-weight: 950;
}

.rail-item {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  min-height: 3.55rem;
  padding: 0.45rem 0.25rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
}

.rail-item svg,
.icon-button svg,
.mobile-menu svg,
.quick-card svg,
.updates-grid svg,
.sound-row svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}

.rail-item span {
  font-size: 0.72rem;
  font-weight: 750;
}

.rail-item.active,
.rail-item:hover {
  background: rgba(231, 53, 104, 0.95);
}

.rail-item:nth-child(3) svg { color: var(--green); }
.rail-item:nth-child(4) svg { color: var(--cyan); }
.rail-item:nth-child(5) svg { color: var(--purple); }
.rail-item:nth-child(6) svg { color: #4ef2c2; }
.rail-item:nth-child(7) svg { color: #8dff43; }
.rail-item:nth-child(8) svg { color: #ff578c; }
.rail-item:nth-child(9) svg { color: #7b8bff; }

.main-area {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: auto minmax(13rem, 15rem) 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 3.55rem;
  padding: 0.55rem 1rem;
  background: #302d2d;
  border-bottom: 1px solid var(--line);
}

.mobile-menu {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 8px;
  background: var(--panel-3);
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #1a1a1a;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

kbd {
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: #3b3b3b;
  color: white;
  font-size: 0.75rem;
}

.breadcrumbs,
.top-actions,
.login-button,
.icon-button,
.section-select,
.quick-card,
.card-head h2,
.agency-footer,
.live-pill,
.overlay-alert,
.sound-row,
.rules-table div,
.goal-card div:first-child {
  display: flex;
  align-items: center;
}

.breadcrumbs {
  gap: 0.45rem;
  color: var(--muted);
  min-width: 0;
}

.breadcrumbs strong {
  color: var(--text);
}

.breadcrumbs small,
.card-head h2 span {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #444;
  color: var(--muted);
  font-weight: 800;
}

.top-actions {
  gap: 0.55rem;
}

.icon-button {
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

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

.login-button {
  gap: 0.65rem;
  border: 0;
  background: transparent;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 35%, #fff, #c8c8c8 60%, #777);
}

.login-button span:last-child {
  display: grid;
  line-height: 1.1;
  text-align: left;
}

.login-button small {
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  min-height: calc(100vh - 3.55rem);
  background: #171717;
  border-radius: 1.1rem 0 0 0;
}

.section-menu {
  padding: 1rem;
  border-right: 1px solid var(--line);
}

.section-select {
  justify-content: space-between;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 8px;
  background: var(--pink);
  font-weight: 850;
}

#subnav {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1rem 0;
  font-weight: 760;
}

#subnav a {
  color: #fff;
}

#subnav a:hover {
  color: var(--cyan);
}

.upgrade-box {
  display: grid;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 2rem;
}

.upgrade-box button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.upgrade-box b {
  color: var(--pink-2);
  font-size: 0.75rem;
}

.upgrade-box span {
  color: var(--cyan);
}

.content {
  min-width: 0;
  padding: 1.35rem 1.9rem 3rem;
}

.page-panel {
  display: none;
  animation: pageIn 260ms ease both;
}

.page-panel.active {
  display: block;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 0.75fr);
  gap: 2rem;
  align-items: start;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--cyan);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.13;
}

h1 {
  max-width: 46rem;
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.12rem;
}

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

.hero-preview {
  overflow: hidden;
  border: 1px solid rgba(231, 53, 104, 0.4);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-preview img {
  aspect-ratio: 1.55 / 1;
  object-fit: cover;
}

.quick-grid,
.updates-grid,
.setup-board,
.builder-layout,
.chat-layout {
  display: grid;
  gap: 1rem;
}

.quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2rem 0;
}

.quick-card,
.updates-grid article,
.agency-card,
.setup-step,
.control-list,
.overlay-stage,
.chat-settings,
.chat-feed,
.goal-card,
.rules-table div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.quick-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  min-height: 9rem;
  padding: 1rem;
  text-align: left;
}

.quick-card:hover,
.quick-card:focus-visible {
  border-color: var(--pink);
  transform: translateY(-2px);
}

.quick-card svg,
.updates-grid svg {
  color: var(--pink-2);
}

.quick-card span {
  color: var(--muted);
}

.agency-card {
  overflow: hidden;
  border-color: rgba(231, 53, 104, 0.55);
}

.card-head {
  padding: 1.2rem 1.2rem 0;
}

.card-head h2 {
  gap: 0.6rem;
}

.card-head h2 span {
  background: white;
  color: var(--pink);
  font-size: 0.7rem;
}

.agency-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 1rem;
  padding: 1.2rem;
}

.empty-state,
.agency-side {
  padding: 2rem;
  border-radius: 8px;
  background: var(--panel-2);
}

.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
}

.mascot {
  display: grid;
  width: 6rem;
  height: 5rem;
  place-items: center;
  color: var(--pink);
  font-size: 4rem;
}

.primary-action,
.soft-button,
.light-button {
  min-height: 2.7rem;
  padding: 0 1.3rem;
  border: 0;
  border-radius: 8px;
  font-weight: 850;
}

.primary-action {
  background: var(--pink);
  color: white;
}

.soft-button {
  background: #333;
}

.light-button {
  background: white;
  color: #1a1a1a;
}

.agency-icons {
  display: grid;
  grid-template-columns: repeat(3, 2.4rem);
  gap: 0.55rem;
  margin-bottom: 1rem;
  opacity: 0.75;
}

.agency-icons span,
.agency-stars span {
  display: block;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
}

.agency-icons span {
  width: 2.4rem;
  height: 2.4rem;
}

.agency-footer {
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid rgba(231, 53, 104, 0.5);
}

.agency-stars {
  display: flex;
  gap: 0.5rem;
}

.agency-stars span {
  width: 3.5rem;
  height: 3.5rem;
}

.agency-footer p {
  flex: 1;
  color: #fff;
  font-weight: 700;
}

.updates-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1rem;
}

.updates-grid article {
  padding: 1rem;
}

.panel-title {
  margin-bottom: 1.3rem;
}

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

.setup-step {
  padding: 1rem;
}

.setup-step span {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.9rem;
  place-items: center;
  border-radius: 8px;
  background: var(--pink);
  font-weight: 900;
}

.setup-step input,
.chat-settings input,
.chat-settings select,
.modal-card input {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121212;
  color: var(--text);
  padding: 0 0.8rem;
}

.setup-step code {
  display: block;
  padding: 0.8rem;
  border-radius: 8px;
  background: #111;
  color: var(--green);
  overflow-wrap: anywhere;
}

.builder-layout,
.chat-layout {
  grid-template-columns: minmax(18rem, 0.55fr) minmax(0, 1fr);
}

.overlay-library {
  margin-bottom: 1.4rem;
}

.overlay-intro {
  margin-bottom: 1.2rem;
}

.overlay-intro p {
  max-width: 62rem;
  margin-top: 0;
}

.setup-warning {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(231, 53, 104, 0.65);
  border-radius: 8px;
  background: rgba(231, 53, 104, 0.22);
  color: #ffd8e3;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.library-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.library-filter {
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.library-filter.active,
.library-filter:hover {
  border-color: var(--pink);
  background: rgba(231, 53, 104, 0.16);
  color: #fff;
}

.library-search {
  display: grid;
  grid-template-columns: auto minmax(8rem, 13rem);
  align-items: center;
  gap: 0.5rem;
  min-height: 2.35rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.library-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.overlay-library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.overlay-template {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-height: 11.5rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: left;
  overflow: hidden;
}

.overlay-template::after {
  content: "";
  position: absolute;
  inset: auto -2rem -3rem auto;
  width: 7rem;
  height: 7rem;
  border-radius: 999px;
  background: rgba(231, 53, 104, 0.18);
  filter: blur(18px);
}

.overlay-template:hover,
.overlay-template.active {
  border-color: var(--pink);
  transform: translateY(-2px);
}

.overlay-template b,
.overlay-template small,
.overlay-template em {
  position: relative;
  z-index: 1;
}

.overlay-template small {
  color: var(--muted);
}

.overlay-template em {
  justify-self: start;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--green);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.template-preview {
  position: relative;
  z-index: 1;
  display: grid;
  height: 5rem;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.16), transparent 2.2rem),
    linear-gradient(135deg, rgba(231, 53, 104, 0.26), rgba(57, 186, 247, 0.18));
}

.template-preview svg {
  width: 2rem;
  height: 2rem;
}

.gift-preview svg,
.sub-preview svg,
.heart-preview svg { color: var(--pink-2); }
.follow-preview svg,
.caption-preview svg,
.events-preview svg { color: var(--cyan); }
.goal-preview svg,
.timer-preview svg,
.rank-preview svg { color: var(--green); }
.game-preview svg,
.wheel-preview svg { color: #9b7cff; }

.builder-heading {
  margin-top: 1.8rem;
}

.overlay-feature {
  margin: 1.3rem 0;
  padding: 1rem;
  border: 1px solid rgba(231, 53, 104, 0.45);
  border-radius: 8px;
  background: var(--panel);
}

.worldcup-feature {
  background:
    linear-gradient(135deg, rgba(49, 141, 83, 0.45), transparent 22rem),
    var(--panel);
}

.feature-banner,
.overlay-group-title {
  margin-bottom: 1rem;
}

.feature-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 8rem;
  padding: 1rem;
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 35%, rgba(255, 255, 255, 0.22), transparent 5rem),
    linear-gradient(135deg, rgba(49, 141, 83, 0.75), rgba(19, 65, 40, 0.75));
}

.feature-banner h2,
.overlay-group-title h2 {
  margin-bottom: 0.4rem;
}

.feature-banner p,
.overlay-group-title p {
  margin: 0;
}

.ball-graphic {
  flex: 0 0 auto;
  font-size: 5rem;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.38));
  animation: ballMove 2.8s ease-in-out infinite;
}

.widget-card {
  padding: 1rem;
  border: 1px solid rgba(231, 53, 104, 0.55);
  border-radius: 8px;
  background: var(--panel-2);
}

.widget-card + .widget-card {
  margin-top: 1rem;
}

.widget-card h3 span,
.mini-widget h3 span {
  color: var(--pink-2);
  font-size: 0.8rem;
}

.widget-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.4rem;
  margin: 0.9rem 0;
}

.widget-actions.two-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
}

.widget-actions code {
  min-height: 2.45rem;
  padding: 0.65rem 0.7rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: #1a1a1a;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.widget-actions button,
.mini-widget button,
.widget-row button {
  min-height: 2.45rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
}

.obs-gallery-feature {
  background:
    linear-gradient(135deg, rgba(45, 5, 57, 0.78), rgba(15, 15, 19, 0.94)),
    var(--panel);
}

.obs-widget-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.obs-widget {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 85% 0%, rgba(57, 186, 247, 0.12), transparent 9rem),
    #18181d;
}

.obs-widget.pro {
  border-color: rgba(254, 44, 85, 0.44);
  background:
    radial-gradient(circle at 85% 0%, rgba(254, 44, 85, 0.18), transparent 9rem),
    #22082c;
}

.obs-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.obs-widget-head h3 {
  margin: 0;
}

.obs-widget-head span {
  flex: 0 0 auto;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--pink-2);
  font-size: 0.72rem;
  font-weight: 900;
}

.obs-widget:not(.pro) .obs-widget-head span {
  color: var(--green);
}

.obs-widget p {
  margin: 0;
  color: var(--muted);
}

.obs-widget-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.obs-widget-controls button {
  min-height: 2.25rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.obs-widget .widget-actions {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  margin: 0;
}

.obs-widget .widget-actions button {
  white-space: nowrap;
}

.obs-preview {
  position: relative;
  display: grid;
  min-height: 8.5rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #09090d;
  background-size: 28px 28px;
  overflow: hidden;
}

.coinmatch-preview {
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 0.8rem;
}

.coinmatch-preview b,
.coinmatch-preview strong {
  padding: 0.7rem;
  border-radius: 8px;
  background: rgba(57, 186, 247, 0.16);
}

.coinmatch-preview span,
.coinmatch-preview i {
  align-self: start;
  color: var(--green);
  font-style: normal;
}

.coinjar-preview {
  place-items: center;
}

.jar {
  position: relative;
  width: 5rem;
  height: 6rem;
  border: 3px solid rgba(255, 255, 255, 0.58);
  border-radius: 1rem 1rem 1.6rem 1.6rem;
  overflow: hidden;
}

.jar span {
  position: absolute;
  inset: auto 0 0;
  height: 72%;
  background: linear-gradient(180deg, #ffd76a, #ff8f3d);
}

.action-wheel-preview,
.luckywheel-preview {
  place-items: center;
}

.action-wheel-preview div,
.luckywheel-preview div {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  background: conic-gradient(var(--pink), var(--cyan), var(--green), #9b7cff, var(--pink));
  animation: spin 8s linear infinite;
}

.action-wheel-preview span {
  position: absolute;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.action-wheel-preview span:nth-of-type(1) { top: 1rem; left: 1rem; }
.action-wheel-preview span:nth-of-type(2) { right: 1rem; top: 2.8rem; }
.action-wheel-preview span:nth-of-type(3) { bottom: 1rem; left: 32%; }

.cannon-preview {
  align-content: center;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.cannon-preview i {
  font-size: 2.6rem;
  font-style: normal;
  animation: floatUp 1.8s ease-in-out infinite;
}

.likefountain-preview {
  place-items: center;
}

.likefountain-preview span {
  position: absolute;
  color: var(--pink-2);
  font-size: 1.8rem;
  animation: floatUp 2.3s ease-in-out infinite;
}

.likefountain-preview span:nth-child(1) { left: 18%; bottom: 1rem; }
.likefountain-preview span:nth-child(2) { left: 45%; bottom: 2rem; animation-delay: 0.45s; }
.likefountain-preview span:nth-child(3) { right: 18%; bottom: 1.2rem; animation-delay: 0.9s; }

.snow-preview i,
.firework-preview i {
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
}

.snow-preview i:nth-child(1) { left: 18%; top: 20%; animation: snowFall 3.3s linear infinite; }
.snow-preview i:nth-child(2) { left: 48%; top: 5%; animation: snowFall 4s linear infinite; }
.snow-preview i:nth-child(3) { right: 18%; top: 28%; animation: snowFall 3.7s linear infinite; }

.social-preview,
.points-preview,
.info-preview,
.command-preview,
.actions-preview,
.carousel-preview,
.giftfeed-preview,
.chatbox-preview {
  align-content: center;
  gap: 0.55rem;
}

.social-preview span,
.points-preview strong,
.info-preview span,
.command-preview b,
.actions-preview b,
.carousel-preview span,
.giftfeed-preview span,
.chatbox-preview p {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.firework-preview {
  place-items: center;
}

.firework-preview i {
  background: var(--pink-2);
  box-shadow:
    0 0 0 0.55rem rgba(254, 44, 85, 0.2),
    0 0 2rem rgba(254, 44, 85, 0.75);
  animation: burst 1.6s ease-in-out infinite;
}

.firework-preview i:nth-child(1) { left: 22%; top: 35%; }
.firework-preview i:nth-child(2) { left: 52%; top: 18%; animation-delay: 0.35s; }
.firework-preview i:nth-child(3) { right: 18%; top: 48%; animation-delay: 0.7s; }

.emojify-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2rem;
  white-space: nowrap;
}

.emojify-preview span {
  animation: slideEmoji 3.8s linear infinite;
}

.luckywheel-preview b {
  position: absolute;
  place-self: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #050509;
}

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

@keyframes snowFall {
  to { transform: translateY(7.5rem); opacity: 0.25; }
}

@keyframes burst {
  50% { transform: scale(1.7); opacity: 0.55; }
}

@keyframes slideEmoji {
  from { transform: translateX(-4rem); }
  to { transform: translateX(18rem); }
}

@keyframes floatUp {
  50% {
    transform: translateY(-1rem);
  }
}

.widget-actions button:hover,
.mini-widget button:hover,
.widget-row button:hover {
  border-color: var(--pink);
}

.ticker-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 17rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  background: #202020;
}

.ticker-preview > * {
  display: inline-flex;
  align-items: center;
  min-height: 3.1rem;
}

.ticker-preview span {
  color: var(--muted);
}

.ticker-preview strong {
  font-size: 1.5rem;
}

.ticker-preview i {
  width: 3.4rem;
  height: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green) 30%, #777 30%);
}

.purple-widget {
  background: #310037;
}

.penalty-preview {
  position: relative;
  min-height: 22rem;
  overflow: hidden;
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% 78%, rgba(78, 242, 194, 0.22), transparent 8rem),
    #39003f;
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.goal-frame {
  position: absolute;
  left: 50%;
  top: 28%;
  width: 18rem;
  height: 8rem;
  transform: translateX(-50%);
  border: 0.45rem solid white;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.player-dot,
.keeper-dot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: #26bcc5;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.player-dot {
  left: 50%;
  top: 44%;
  transform: translateX(-50%);
}

.keeper-dot {
  left: 46%;
  bottom: 9%;
}

.widget-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.mini-widget {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.mini-progress {
  height: 0.7rem;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: #111;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.heart-counter {
  margin: 1rem 0;
  color: var(--pink-2);
  font-size: 1.5rem;
  font-weight: 900;
}

.widget-list {
  display: grid;
  gap: 0.7rem;
}

.widget-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.widget-row svg {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--cyan);
}

.widget-row p {
  margin: 0.25rem 0 0;
}

@keyframes ballMove {
  50% {
    transform: translateX(-0.7rem) rotate(-7deg);
  }
}

.control-list,
.chat-settings {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: 1rem;
}

.control-list label,
.switch-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3rem;
  padding: 0 0.85rem;
  border-radius: 8px;
  background: #151515;
}

input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--pink);
}

.overlay-stage {
  position: relative;
  overflow: hidden;
  padding: 1rem;
}

.live-screen {
  position: relative;
  min-height: 20rem;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 25% 45%, rgba(57, 186, 247, 0.45), transparent 11rem),
    radial-gradient(circle at 75% 30%, rgba(231, 53, 104, 0.45), transparent 12rem),
    #101522;
}

.live-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: var(--pink-2);
  font-weight: 900;
}

.creator-shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 8rem;
  height: 11rem;
  transform: translateX(-50%);
  border-radius: 5rem 5rem 0 0;
  background: #202742;
}

.floating-hearts span {
  position: absolute;
  right: 1.2rem;
  bottom: 2rem;
  color: var(--pink-2);
  animation: floatHeart 3s infinite ease-in;
}

.floating-hearts span:nth-child(2) {
  right: 2.4rem;
  color: var(--cyan);
  animation-delay: 0.7s;
}

.floating-hearts span:nth-child(3) {
  right: 3.3rem;
  color: var(--green);
  animation-delay: 1.3s;
}

.overlay-alert {
  gap: 0.8rem;
  margin: -2rem 1rem 0;
  padding: 0.9rem;
  position: relative;
  border: 1px solid rgba(231, 53, 104, 0.55);
  border-radius: 8px;
  background: rgba(27, 27, 27, 0.95);
  transition: transform 180ms ease, border-color 180ms ease;
}

.overlay-alert.pop {
  transform: translateY(-0.35rem) scale(1.02);
  border-color: var(--green);
}

.overlay-alert svg {
  color: var(--pink-2);
}

.overlay-alert strong,
.overlay-alert span {
  display: block;
}

.overlay-alert span {
  color: var(--muted);
}

.rules-table {
  display: grid;
  gap: 0.85rem;
}

.rules-table div {
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

.rules-table span {
  color: var(--muted);
}

.rules-table button {
  min-height: 2.4rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--panel-3);
}

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

.sound-row {
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: left;
}

.sound-row.active,
.sound-row:hover {
  border-color: var(--pink);
  background: rgba(231, 53, 104, 0.12);
}

.sound-row span {
  color: var(--muted);
}

.chat-settings label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
}

.chat-feed {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: 1rem;
}

.chat-feed p {
  margin: 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--panel-2);
}

.chat-feed b {
  color: #fff;
}

.goal-card {
  max-width: 42rem;
  padding: 1.2rem;
}

.goal-card div:first-child {
  justify-content: space-between;
  gap: 1rem;
}

.progress {
  height: 0.85rem;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 999px;
  background: #101010;
}

.progress span {
  display: block;
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  transition: width 280ms ease;
}

.drawer,
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 1rem;
}

.drawer.open,
.modal.open {
  display: grid;
}

.drawer-card,
.modal-card {
  position: relative;
  width: min(30rem, 100%);
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.close-drawer {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: var(--panel-3);
}

.support-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.support-list a {
  padding: 0.75rem;
  border-radius: 8px;
  background: #151515;
  color: var(--cyan);
}

.modal-card label {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  color: var(--muted);
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatHeart {
  from {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-9rem) scale(1.3);
  }
}

@media (max-width: 1180px) {
  .welcome,
  .agency-layout,
  .builder-layout,
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .quick-grid,
  .updates-grid,
  .setup-board,
  .overlay-library-grid,
  .widget-grid,
  .obs-widget-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: fixed;
    inset: 3.55rem auto 0 0;
    width: 4.5rem;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

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

  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .mobile-menu {
    display: block;
  }

  .breadcrumbs,
  .login-button span:last-child,
  .section-menu {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .content {
    padding: 1rem;
  }

  .search-box kbd {
    display: none;
  }

  .top-actions {
    gap: 0.25rem;
  }

  .quick-grid,
  .updates-grid,
  .setup-board,
  .sound-grid,
  .overlay-library-grid,
  .widget-grid,
  .obs-widget-catalog {
    grid-template-columns: 1fr;
  }

  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .agency-footer,
  .rules-table div,
  .sound-row,
  .feature-banner,
  .widget-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .widget-actions,
  .widget-actions.two-row,
  .obs-widget .widget-actions,
  .widget-row {
    grid-template-columns: 1fr;
  }
}
