:root {
  --danger: #E05B4C;
  --danger-hover: #C24437;
  --danger-text: #C0392B;
  --success: #4C9E6B;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --font:
    "Karla",
    system-ui,
    Arial,
    sans-serif;
  --ease: 0.18s ease;
}
:root,
[data-theme=dark] {
  --primary: #8FB0C2;
  --primary-hover: #A3C0D0;
  --primary-glow: rgba(143, 176, 194, 0.18);
  --primary-faint: rgba(143, 176, 194, 0.13);
  --on-primary: #1A222C;
  --danger-text: #EF8C7E;
  --bg: #1A222C;
  --bg2: #202B37;
  --surface: #273443;
  --surface2: #2F4156;
  --card: #202B37;
  --border: #3A4A5C;
  --text: #F5EFEB;
  --muted: #A9BDCB;
  --input-bg: #1A222C;
  --nav-bg: rgba(26, 34, 44, 0.92);
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg:0 8px 40px rgba(0,0,0,0.50);
}
[data-theme=light] {
  --primary: #567C8D;
  --primary-hover: #476B7C;
  --primary-glow: rgba(86, 124, 141, 0.22);
  --primary-faint: rgba(86, 124, 141, 0.10);
  --on-primary: #FFFFFF;
  --bg: #F5EFEB;
  --bg2: #FFFFFF;
  --surface: #FFFFFF;
  --surface2: #EDE5DF;
  --card: #FFFFFF;
  --border: #DDD2CA;
  --text: #2F4156;
  --muted: #567C8D;
  --input-bg: #F5EFEB;
  --nav-bg: rgba(245, 239, 235, 0.92);
  --shadow: 0 4px 24px rgba(47, 65, 86, 0.08);
  --shadow-lg:0 8px 40px rgba(47, 65, 86, 0.14);
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  transition: background var(--ease), color var(--ease);
}
code {
  font-family: "Courier New", monospace;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--primary);
}
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background var(--ease), border-color var(--ease);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.nav-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
}
.nav-page {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-right-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-center {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.container {
  max-width: 860px;
  min-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.page-header p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background var(--ease), border-color var(--ease);
}
.section {
  padding: 20px 0 0;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.conn-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(76, 158, 107, 0.25);
}
.status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(224, 91, 76, 0.25);
}
.status-dot.warning {
  background: #D4953A;
  box-shadow: 0 0 0 3px rgba(212, 149, 58, 0.25);
}
button,
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger,
.btn-danger-outline {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--ease),
    box-shadow var(--ease),
    transform var(--ease),
    opacity var(--ease),
    color var(--ease),
    border-color var(--ease);
}
button:active,
.btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.btn-danger:active,
.btn-danger-outline:active {
  transform: scale(0.97);
}
button:disabled,
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface2);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-danger,
.btn-danger-outline {
  background: transparent;
  color: var(--danger-text);
  border: 1px solid var(--danger-text);
}
.btn-danger:hover,
.btn-danger-outline:hover {
  background: var(--danger-hover);
  color: #fff;
  border-color: var(--danger-hover);
}
.btn-lg {
  font-size: 16px;
  padding: 14px 28px;
}
.btn-md {
  font-size: 15px;
  padding: 13px 24px;
}
.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
}
.btn-full {
  width: 100%;
}
.btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 16px;
}
.btn-icon:hover {
  background: var(--surface2);
}
.btn-twitch {
  background: var(--primary);
  color: var(--on-primary);
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
}
.btn-twitch:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 28px var(--primary-glow);
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 18px;
  transition: color var(--ease);
}
.back-btn:hover {
  color: var(--text);
}
.back-btn:active {
  transform: none;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
input {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition:
    border-color var(--ease),
    box-shadow var(--ease),
    background var(--ease);
}
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-faint);
}
input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
.input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.input-row input {
  flex: 1;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 36px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-faint);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  border-radius: 20px;
  padding: 5px 10px 5px 13px;
  font-size: 13px;
  font-weight: 600;
  height: 30px;
}
.tag-remove {
  background: none;
  border: none;
  color: var(--primary);
  opacity: 0.7;
  padding: 0;
  width: 18px;
  height: 18px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition:
    opacity var(--ease),
    background var(--ease),
    color var(--ease);
}
.tag-remove:hover {
  opacity: 1;
  color: var(--danger);
  background: rgba(224, 91, 76, 0.12);
}
.tag-remove:active {
  transform: none;
}
.btn-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.btn-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background var(--ease);
}
.btn-list-item:hover {
  background: var(--surface2);
}
.btn-list-info {
  flex: 1;
  min-width: 0;
}
.btn-list-label {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-list-action {
  font-size: 12px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.control-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 20px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  transition:
    background var(--ease),
    border-color var(--ease),
    color var(--ease),
    box-shadow var(--ease),
    transform var(--ease);
}
.control-btn:hover:not(:disabled) {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: 0 4px 20px var(--primary-glow);
}
.control-btn:active:not(:disabled) {
  transform: scale(0.95);
}
.control-btn.firing {
  opacity: 0.6;
  transform: scale(0.95);
}
.scene-item .scene-btn {
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 4px);
}
.scene-item .scene-btn:hover:not(:disabled) {
  background: var(--primary);
}
.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.stream-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  transition:
    background var(--ease),
    border-color var(--ease),
    box-shadow var(--ease),
    transform var(--ease);
}
.stream-card:hover {
  background: var(--primary-faint);
  border-color: var(--primary);
  box-shadow: 0 4px 20px var(--primary-glow);
  transform: translateY(-2px);
}
.stream-card:active {
  transform: scale(0.97) translateY(0);
}
.stream-avatar {
  width: 48px;
  height: 48px;
  background: var(--primary-faint);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 320px;
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.22s ease forwards;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success {
  border-left: 3px solid var(--success);
}
.toast.error {
  border-left: 3px solid var(--danger);
}
.toast.info {
  border-left: 3px solid var(--primary);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  font-size: 14px;
  line-height: 1.8;
}
.empty-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}
.skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.skeleton-line,
.skeleton-card {
  border-radius: 6px;
  background:
    linear-gradient(
      90deg,
      var(--border) 25%,
      var(--surface2) 50%,
      var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}
.skeleton-line {
  height: 14px;
}
.skeleton-card {
  height: 80px;
  border-radius: var(--radius);
}
@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.tab-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  white-space: nowrap;
}
.tab-btn:hover {
  background: var(--surface2);
  color: var(--text);
}
.tab-btn:active {
  transform: none;
}
.tab-btn.active {
  background: var(--primary);
  color: var(--on-primary);
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  margin: 28px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
  padding: 40px 32px;
}
.login-logo {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.login-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 36px;
  line-height: 1.6;
}
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 0;
}
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition:
    border-color var(--ease),
    box-shadow var(--ease),
    background var(--ease);
}
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-faint);
}
textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition:
    border-color var(--ease),
    box-shadow var(--ease),
    background var(--ease);
}
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-faint);
}
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.container {
  flex: 1;
}
.nav-link {
  font-size: 13px;
  text-decoration: none;
  padding: 0 12px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition:
    background var(--ease),
    border-color var(--ease),
    color var(--ease);
}
.nav-link:hover {
  background: var(--surface2);
  border-color: var(--primary);
  color: var(--primary);
}
.site-footer {
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  margin-top: auto;
  transition: background var(--ease), border-color var(--ease);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-credit {
  font-size: 12px;
  color: var(--muted);
}
.footer-credit a {
  color: inherit;
  text-decoration: none;
}
.footer-credit a:hover {
  color: var(--primary);
  opacity: 1;
}
.hero {
  padding: 80px 24px 56px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.12;
  margin-bottom: 20px;
}
.highlight {
  color: var(--primary);
}
.hero > p {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.landing-section {
  padding: 56px 0;
}
.landing-section + .landing-section {
  border-top: 1px solid var(--border);
}
.landing-section .container {
  padding-top: 0;
  padding-bottom: 0;
}
.section-heading {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.section-subheading {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.feature-card {
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  transition: box-shadow var(--ease);
}
.feature-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px var(--primary-glow);
}
.feature-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}
.feature-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.feature-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.steps {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 180px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: none;
}
.step-num {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 14px;
}
.step h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
}
.step p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.pricing-cards-4 {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}
.pricing-cards-4 .pricing-card {
  padding: 24px 18px;
}
.pricing-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  transition: box-shadow var(--ease);
}
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}
.pricing-tier {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pricing-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.pricing-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.pricing-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.5;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 10px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pricing-cta {
  margin-top: auto;
}
.pricing-cta .btn,
.pricing-cta button {
  height: 38px;
}
.pricing-features li {
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.4;
}
.pricing-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.pricing-features li.premium::before {
  content: "★";
  color: var(--primary);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 400px;
}
.compare-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.compare-table th:not(:first-child) {
  text-align: center;
}
.compare-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.compare-table td:not(:first-child) {
  text-align: center;
}
.compare-table tr:last-child td {
  border-bottom: none;
}
.compare-table .yes {
  color: var(--success);
  font-weight: 700;
}
.compare-table .no {
  color: var(--border);
}
img.emoji {
  height: 0.9em !important;
  width: 0.9em !important;
  display: inline;
  vertical-align: -0.1em !important;
  margin: 0 0.05em 0 0.1em !important;
}
.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease);
}
.social-link:hover {
  background: var(--surface2);
  border-color: var(--primary);
}
.privacy-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 10px;
}
.privacy-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.privacy-list li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}
.privacy-list li::before {
  content: "•";
  color: var(--primary);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}
.feedback-form .field {
  margin-bottom: 12px;
}
.lang-dropdown {
  position: relative;
}
.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  height: 32px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: background var(--ease), border-color var(--ease);
  white-space: nowrap;
}
.lang-dropdown-btn:hover {
  background: var(--surface2);
  border-color: var(--primary);
}
.lang-dropdown-name {
  display: none;
}
.lang-chevron {
  flex-shrink: 0;
  transition: transform var(--ease);
}
.lang-dropdown-btn[aria-expanded=true] .lang-chevron {
  transform: rotate(180deg);
}
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 170px;
  z-index: 300;
  overflow: hidden;
}
.lang-dropdown-menu.open {
  display: block;
}
.lang-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--ease);
  white-space: nowrap;
}
.lang-dropdown-item:hover {
  background: var(--surface2);
}
.lang-dropdown-item.active {
  color: var(--primary);
}
.lang-check {
  margin-left: auto;
  color: var(--primary);
  font-size: 12px;
}
.fi {
  display: inline-block;
  background-size: cover;
  background-position: 50%;
  background-repeat: no-repeat;
  width: 1.4em;
  height: 1.05em;
  flex-shrink: 0;
  border-radius: 2px;
  vertical-align: -0.12em;
}
.fi-br {
  background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 640 480%22><path fill=%22%23229e45%22 d=%22M0 0h640v480H0z%22/><path fill=%22%23f8e509%22 d=%22m320 40 280 200-280 200L40 240z%22/><circle cx=%22320%22 cy=%22240%22 r=%22110%22 fill=%22%232b49a3%22/><path fill=%22%23fff%22 d=%22M215 205a230 230 0 0 1 209 30 110 110 0 0 1-8 22 205 205 0 0 0-194-28 110 110 0 0 1-7-24z%22/></svg>");
}
.fi-us {
  background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 640 480%22><path fill=%22%23bd3d44%22 d=%22M0 0h640v480H0%22/><path stroke=%22%23fff%22 stroke-width=%2237%22 d=%22M0 55.3h640M0 129h640M0 203h640M0 277h640M0 351h640M0 425h640%22/><path fill=%22%23192f5d%22 d=%22M0 0h364.8v258.5H0%22/><marker id=%22us-a%22 markerHeight=%2230%22 markerWidth=%2230%22><path fill=%22%23fff%22 d=%22m14 0 9 27L0 10h28L5 27z%22/></marker><path fill=%22none%22 marker-mid=%22url(%23us-a)%22 d=%22m0 0 16 11h61 61 61 61 60L47 37h61 61 60 61L16 63h61 61 61 61 60L47 89h61 61 60 61L16 115h61 61 61 61 60L47 141h61 61 60 61L16 166h61 61 61 61 60L47 192h61 61 60 61L16 218h61 61 61 61 60z%22/></svg>");
}
.fi-es {
  background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 640 480%22><path fill=%22%23aa151b%22 d=%22M0 0h640v480H0z%22/><path fill=%22%23f1bf00%22 d=%22M0 120h640v240H0z%22/><path fill=%22%23ad1519%22 d=%22M150 200h60v90a30 30 0 0 1-60 0z%22/></svg>");
}
.fi-cn {
  background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 xmlns:xlink=%22http://www.w3.org/1999/xlink%22 viewBox=%220 0 640 480%22><defs><path id=%22cn-a%22 fill=%22%23ff0%22 d=%22M-.6.8 0-1 .6.8-1-.3h2z%22/></defs><path fill=%22%23ee1c25%22 d=%22M0 0h640v480H0z%22/><use xlink:href=%22%23cn-a%22 width=%2230%22 height=%2220%22 transform=%22matrix(71.9991 0 0 72 120 120)%22/><use xlink:href=%22%23cn-a%22 width=%2230%22 height=%2220%22 transform=%22matrix(-12.33562 -20.5871 20.58684 -12.33577 240.3 48)%22/><use xlink:href=%22%23cn-a%22 width=%2230%22 height=%2220%22 transform=%22matrix(-3.38573 -23.75998 23.75968 -3.38578 288 95.8)%22/><use xlink:href=%22%23cn-a%22 width=%2230%22 height=%2220%22 transform=%22matrix(6.5991 -23.0749 23.0746 6.59919 288 168)%22/><use xlink:href=%22%23cn-a%22 width=%2230%22 height=%2220%22 transform=%22matrix(14.9991 -18.73557 18.73533 14.99929 240 216)%22/></svg>");
}
.fi-in {
  background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 xmlns:xlink=%22http://www.w3.org/1999/xlink%22 viewBox=%220 0 640 480%22><path fill=%22%23f93%22 d=%22M0 0h640v160H0z%22/><path fill=%22%23fff%22 d=%22M0 160h640v160H0z%22/><path fill=%22%23128807%22 d=%22M0 320h640v160H0z%22/><g transform=%22matrix(3.2 0 0 3.2 320 240)%22><circle r=%2220%22 fill=%22%23008%22/><circle r=%2217.5%22 fill=%22%23fff%22/><circle r=%223.5%22 fill=%22%23008%22/><g id=%22in-d%22><g id=%22in-c%22><g id=%22in-b%22><g id=%22in-a%22 fill=%22%23008%22><circle r=%22.9%22 transform=%22rotate(7.5 -8.8 133.5)%22/><path d=%22M0 17.5.6 7 0 2l-.6 5z%22/></g><use xlink:href=%22%23in-a%22 width=%22100%25%22 height=%22100%25%22 transform=%22rotate(15)%22/></g><use xlink:href=%22%23in-b%22 width=%22100%25%22 height=%22100%25%22 transform=%22rotate(30)%22/></g><use xlink:href=%22%23in-c%22 width=%22100%25%22 height=%22100%25%22 transform=%22rotate(60)%22/></g><use xlink:href=%22%23in-d%22 width=%22100%25%22 height=%22100%25%22 transform=%22rotate(120)%22/><use xlink:href=%22%23in-d%22 width=%22100%25%22 height=%22100%25%22 transform=%22rotate(-120)%22/></g></svg>");
}
.fi-eg {
  background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 640 480%22><path fill=%22%23ce1126%22 d=%22M0 0h640v160H0z%22/><path fill=%22%23fff%22 d=%22M0 160h640v160H0z%22/><path d=%22M0 320h640v160H0z%22/><path fill=%22%23c09300%22 d=%22M320 195c25 0 40 15 40 35s-15 35-40 35-40-15-40-35 15-35 40-35zm-22 78h44l-6 18h-32z%22/></svg>");
}
.fi-fr {
  background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 640 480%22><path fill=%22%23fff%22 d=%22M0 0h640v480H0z%22/><path fill=%22%23000091%22 d=%22M0 0h213.3v480H0z%22/><path fill=%22%23e1000f%22 d=%22M426.7 0H640v480H426.7z%22/></svg>");
}
.fi-ru {
  background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 640 480%22><path fill=%22%23fff%22 d=%22M0 0h640v160H0z%22/><path fill=%22%230039a6%22 d=%22M0 160h640v160H0z%22/><path fill=%22%23d52b1e%22 d=%22M0 320h640v160H0z%22/></svg>");
}
.navbar .btn-secondary:hover,
.navbar .btn-icon:hover,
.nav-mobile-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.nav-right-desktop .btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
}
.nav-right-desktop .btn-icon svg {
  pointer-events: none;
}
.nav-right-mobile {
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nav-lang-mobile {
  display: none;
}
.nav-right-mobile .btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
}
.nav-right-mobile .btn-icon svg {
  pointer-events: none;
}
.nav-mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  color: var(--text);
}
.nav-mobile-btn svg {
  pointer-events: none;
}
.theme-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  transition: background var(--ease), border-color var(--ease);
}
.theme-switch.on {
  background: var(--primary);
  border-color: var(--primary);
}
.theme-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform var(--ease);
}
.theme-switch.on .theme-switch-thumb {
  transform: translateX(20px);
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
}
.mobile-overlay.open {
  display: block;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  bottom: 0;
  z-index: 201;
  width: 280px;
  max-width: 85vw;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: right 0.22s ease;
  overflow-y: auto;
}
.mobile-drawer.open {
  right: 0;
}
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.mobile-drawer-body {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.mobile-nav-item {
  display: block;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 0;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  white-space: nowrap;
}
.mobile-nav-item:hover {
  background: var(--surface2);
}
.mobile-nav-item.primary {
  color: var(--primary);
  font-weight: 600;
}
.mobile-nav-item.danger {
  color: var(--danger);
}
.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.mobile-lang-section {
  padding: 12px 16px;
}
.mobile-lang-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 0 4px;
}
.mobile-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.mobile-lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
  white-space: nowrap;
}
.mobile-lang-item:hover {
  background: var(--surface2);
  border-color: var(--primary);
}
.mobile-lang-item.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-faint);
}
@media (max-width: 1180px) {
  .nav-page {
    display: none;
  }
  .nav-sep {
    display: none;
  }
}
@media (max-width: 920px) {
  body {
    padding: 0 16px;
  }
  .navbar {
    padding: 0 14px;
    margin: 0 -16px;
  }
  .nav-page {
    display: none;
  }
  .nav-link {
    display: none;
  }
  .nav-center {
    display: none;
  }
  .nav-right-desktop {
    display: none;
  }
  .nav-right-mobile {
    display: flex;
  }
  .nav-lang-mobile {
    display: flex;
  }
  .nav-mobile-btn {
    display: flex;
  }
  .container {
    min-width: 0;
    padding: 20px 0 48px;
    width: 100%;
  }
  .card {
    padding: 18px;
  }
  .input-row {
    flex-direction: column;
  }
  .input-row button {
    width: 100%;
  }
  #toast {
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .login-card {
    padding: 28px 20px;
  }
  .hero {
    padding: 48px 0 36px;
  }
  .hero h1 {
    font-size: 28px;
    letter-spacing: -0.5px;
  }
  .hero > p {
    font-size: 15px;
  }
  .landing-section {
    margin: 0 -16px;
    padding: 36px 16px;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pricing-cards {
    grid-template-columns: 1fr;
  }
  .pricing-card {
    min-width: 0;
  }
  .compare-table {
    min-width: 0;
    width: 100%;
  }
  .steps {
    flex-direction: column;
  }
  .site-footer {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .social-links {
    flex-direction: column;
  }
  .stream-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.cookie-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 150;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.cookie-notice-text {
  flex: 1 1 280px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.cookie-notice-text a {
  color: var(--primary);
  text-decoration: underline;
}
.cookie-notice-btn {
  flex-shrink: 0;
  width: auto;
  padding: 0 22px;
}
@media (max-width: 560px) {
  .cookie-notice {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 14px;
  }
  .cookie-notice-btn {
    width: 100%;
  }
}
:target,
.section-title[id] {
  scroll-margin-top: 76px;
}
