/* ============================================================
   Senpai Stream — design system
   Edit :root to restyle the whole site (colors, radius, fonts).
   ============================================================ */

:root {
  --bg: #0b0d12;
  --bg-elev: #12151c;
  --bg-elev-2: #181c26;
  --text: #f4f6fb;
  --muted: #9aa3b5;
  --faint: #6b7385;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent-a: #a855f7;
  --accent-b: #22d3ee;
  --accent-grad: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  --danger: #f87171;
  --ok: #34d399;
  --glass: rgba(18, 21, 28, 0.62);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 72px;
  --container: 1180px;
  --wide: 1320px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Syne", "Manrope", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
  overscroll-behavior-x: none;
}

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

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

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

button {
  cursor: pointer;
  border: 0;
  background: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
  color: var(--muted);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--accent-a);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}

.skip:focus {
  top: 12px;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
  max-width: 100%;
}

.wide {
  width: min(100% - 32px, var(--wide));
  margin-inline: auto;
  max-width: 100%;
}

/* Accent underline used only on headings / CTAs */
.accent-line {
  display: inline-block;
  background-image: var(--accent-grad);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 72px 3px;
  padding-bottom: 8px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-b);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 10px 22px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, filter 0.2s;
}

.btn-sm {
  flex-direction: row;
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

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

.btn-primary {
  background: var(--accent-grad);
  color: #081018;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: var(--accent-b);
}

.btn-meta {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(18px);
  background: rgba(11, 13, 18, 0.72);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  min-width: 0;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav {
  display: none;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav-toggle {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 20px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav a {
  padding: 14px 12px;
  border-radius: 10px;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.mobile-nav a:hover,
.mobile-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.04);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 36px 0 56px;
}

.hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 6vw, 4.1rem);
  max-width: 14ch;
}

.hero-lead {
  font-size: 1.05rem;
  max-width: 48ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 18px;
}

@media (max-width: 480px) {
  .hero-cta .btn {
    width: 100%;
  }
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-size: 13px;
  color: var(--muted);
}

.trust b {
  color: var(--text);
}

.stars {
  color: #fbbf24;
  letter-spacing: 1px;
}

.updated {
  margin-top: 16px;
  font-size: 13px;
  color: var(--faint);
}

.crumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 16px;
}

.crumbs a:hover {
  color: var(--accent-b);
}

.hero-visual {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: blob 14s ease-in-out infinite;
}

.blob-a {
  width: 240px;
  height: 240px;
  background: var(--accent-a);
  top: 10%;
  left: 8%;
}

.blob-b {
  width: 220px;
  height: 220px;
  background: var(--accent-b);
  right: 6%;
  bottom: 8%;
  animation-delay: -5s;
}

@keyframes blob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(18px, -16px) scale(1.08);
  }
}

.icon-frame {
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 42px;
  padding: 3px;
  background: var(--accent-grad);
  box-shadow: 0 0 0 12px rgba(168, 85, 247, 0.12), 0 30px 80px rgba(34, 211, 238, 0.18);
  animation: floaty 5s ease-in-out infinite;
}

.icon-frame img {
  width: 100%;
  height: 100%;
  border-radius: 39px;
  background: #10131a;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.grain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* Layout with TOC */
.layout {
  display: grid;
  gap: 28px;
  min-width: 0;
  max-width: 100%;
}

.toc-wrap {
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 14px;
}

.toc-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.toc nav {
  display: none;
  margin-top: 10px;
}

.toc.is-open nav,
.toc nav:target {
  display: block;
}

.toc a {
  display: block;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
}

.toc a:hover,
.toc a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.toc .toc-h3 {
  padding-left: 16px;
  font-size: 12px;
}

/* Glass cards */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.glass:hover {
  border-color: rgba(168, 85, 247, 0.35);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-card {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  color: #081018;
  flex: none;
}

.info-card small {
  display: block;
  color: var(--faint);
  font-size: 12px;
}

.info-card strong {
  font-size: 15px;
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 28px;
}

.carousel-track {
  display: flex;
  gap: 16px;
  width: max-content;
  max-width: none;
  min-width: 0;
  transition: transform 0.45s var(--ease);
}

.shot {
  flex: 0 0 auto;
  width: min(260px, 72vw);
  background: #07080c;
  border-radius: 28px;
  border: 1px solid var(--line);
  padding: 10px;
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.carousel-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

.arrow:hover {
  background: var(--accent-grad);
  color: #081018;
  border-color: transparent;
}

.dots {
  display: flex;
  gap: 8px;
}

.dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
}

.dots button.is-on {
  background: var(--accent-b);
  width: 22px;
  border-radius: 99px;
}

/* Why */
.why-grid {
  display: grid;
  gap: 14px;
}

.why-card {
  padding: 20px;
}

.why-card h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.num {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Features */
.feat-grid {
  display: grid;
  gap: 14px;
}

.feat {
  padding: 20px;
}

.feat h3 {
  font-size: 1.05rem;
  margin: 10px 0 6px;
}

/* Comparison battle */
.battle {
  display: grid;
  gap: 12px;
}

.battle-card {
  overflow: hidden;
}

.battle-heads {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  padding: 16px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.16), rgba(34, 211, 238, 0.08));
  font-family: var(--display);
  font-weight: 800;
}

.battle-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.yes {
  color: var(--ok);
  font-weight: 700;
}

.no {
  color: var(--danger);
  font-weight: 700;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 8px;
  overscroll-behavior-x: contain;
}

.tab {
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tab.is-on,
.tab:hover {
  color: #081018;
  background: var(--accent-grad);
  border-color: transparent;
}

.panel {
  display: none;
  margin-top: 16px;
  padding: 20px;
}

.panel.is-on {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}

.step-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  color: #081018;
  font-weight: 800;
}

.step p {
  margin: 0;
}

/* Categories */
.cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cat {
  padding: 22px 16px;
  text-align: center;
  min-height: 110px;
  display: grid;
  place-content: center;
  gap: 6px;
}

.cat strong {
  font-family: var(--display);
}

.cat span {
  color: var(--muted);
  font-size: 13px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item button {
  width: 100%;
  text-align: left;
  padding: 16px 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.faq-item button::after {
  content: "+";
  color: var(--accent-b);
  font-size: 1.2rem;
}

.faq-item.is-open button::after {
  content: "−";
}

.faq-item .ans {
  display: none;
  padding: 0 8px 16px;
  color: var(--muted);
}

.faq-item.is-open .ans {
  display: block;
}

/* Pros cons */
.split {
  display: grid;
  gap: 14px;
}

.pro,
.con {
  padding: 20px;
}

.pro h3 {
  color: var(--ok);
}

.con h3 {
  color: var(--danger);
}

.check-list li,
.x-list li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--muted);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 800;
}

.x-list li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: var(--danger);
  font-weight: 800;
}

/* Alternatives */
.alt-grid {
  display: grid;
  gap: 14px;
}

.alt {
  padding: 20px;
  display: block;
}

.alt h3 {
  font-size: 1.1rem;
}

/* Final CTA */
.cta-band {
  margin: 20px 0 80px;
  padding: 36px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.foot-grid {
  display: grid;
  gap: 24px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.disclaimer {
  font-size: 12px;
  color: var(--faint);
  max-width: 80ch;
}

/* Floating download */
.float-dl {
  position: fixed;
  z-index: 40;
  right: 16px;
  bottom: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.3s var(--ease);
}

.float-dl.is-show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* Inner pages */
.page-hero {
  padding: 40px 0 20px;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  max-width: 18ch;
}

.prose {
  max-width: 760px;
  overflow-wrap: break-word;
}

.prose h2 {
  margin-top: 1.6em;
  font-size: 1.4rem;
}

.prose a {
  color: var(--accent-b);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .battle-heads,
  .battle-row {
    font-size: 11px;
    padding: 12px 8px;
  }
}

.form input,
.form textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.note {
  padding: 14px 16px;
  border-left: 3px solid var(--accent-b);
}

/* 404 */
.notfound {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
}

/* Desktop */
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .info-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .why-grid,
  .feat-grid,
  .alt-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split,
  .foot-grid {
    grid-template-columns: 1.2fr 1fr;
  }

  .cats {
    grid-template-columns: repeat(4, 1fr);
  }

  .shot {
    width: min(280px, 32%);
  }

  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex;
  }

  .float-dl {
    top: 86px;
    bottom: auto;
    right: 24px;
  }
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: 250px 1fr;
    align-items: start;
  }

  .toc-wrap {
    position: sticky;
    top: 92px;
  }

  .toc-toggle {
    pointer-events: none;
  }

  .toc nav {
    display: block;
  }

  .feat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1440px) {
  .hero {
    padding: 64px 0 80px;
  }

  .icon-frame {
    width: 200px;
    height: 200px;
  }

  .section {
    padding: 88px 0;
  }
}

.header-cta {
  display: none;
}

@media (min-width: 1024px) {
  .header-cta {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Mobile-first polish */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

main {
  overflow-x: hidden;
  max-width: 100%;
}

.info-card strong {
  overflow-wrap: anywhere;
}

.form input,
.form textarea,
.form select {
  font-size: 16px;
}

.tabs {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  min-height: 44px;
}

@media (max-width: 767px) {
  :root {
    --header-h: 60px;
  }

  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .container,
  .wide {
    width: min(100% - 24px, var(--container));
  }

  .section {
    padding: 44px 0;
  }

  .hero {
    padding: 20px 0 36px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
    max-width: none;
  }

  .hero-visual {
    min-height: 180px;
  }

  .icon-frame {
    width: 112px;
    height: 112px;
    border-radius: 28px;
  }

  .blob-a,
  .blob-b {
    width: 160px;
    height: 160px;
    filter: blur(28px);
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn,
  .cta-band .btn {
    width: 100%;
  }

  .trust {
    gap: 10px 14px;
  }

  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .info-card {
    padding: 12px;
  }

  .shot {
    width: min(240px, 70vw);
  }

  .battle-heads {
    display: none;
  }

  .battle-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: 14px;
    padding: 14px 16px;
  }

  .battle-row span:first-child {
    font-weight: 800;
    color: var(--text);
  }

  .battle-row span:nth-child(2)::before {
    content: "Senpai Stream · ";
    color: var(--faint);
    font-weight: 600;
  }

  .battle-row span:nth-child(3)::before {
    content: "Other apps · ";
    color: var(--faint);
    font-weight: 600;
  }

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

  .float-dl {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
    border-radius: 16px;
  }

  .cta-band {
    margin-bottom: 24px;
    padding: 28px 16px;
  }

  .site-footer {
    padding-bottom: 16px;
  }

  .page-hero {
    padding-top: 24px;
  }
}
