:root {
  color-scheme: dark;
  --bg: #05040f;
  --surface: rgba(15, 23, 42, 0.82);
  --surface-strong: rgba(8, 15, 32, 0.88);
  --border: rgba(148, 163, 184, 0.12);
  --text: #f8fafc;
  --muted: #9ca3af;
  --heading: #e2e8f0;
  --twitch: #9146ff;
  --kick: #53fc18;
  --shadow: 0 34px 68px -36px rgba(8, 12, 22, 0.95);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(145, 70, 255, 0.22), transparent 58%),
    radial-gradient(120% 120% at 100% 0%, rgba(83, 252, 24, 0.22), transparent 62%),
    linear-gradient(180deg, #040312 0%, #010107 100%);
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 120%, rgba(10, 14, 26, 0.75), transparent 65%);
  mix-blend-mode: screen;
}
main {
  position: relative;
  z-index: 1;
  max-width: 1680px;
  margin: 0 auto;
  padding: 64px clamp(32px, 6vw, 96px) 112px 32px;
}
.topbar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 3vw, 32px) clamp(20px, 3vw, 32px);
  margin-bottom: 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--surface), var(--surface-strong));
  border: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}
.topbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand-icon {
  width: 62px;
  height: 62px;
  background: url("../aitranslator.png") center/cover no-repeat;
}
.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-meta strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
}
.brand-meta span {
  font-size: 14px;
  color: var(--muted);
}
.topbar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.22);
  color: var(--muted);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.4);
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.22s ease;
}
.topbar-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.45);
}
/* Hero removed per design simplification */
.grid {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  grid-template-columns: repeat(auto-fit, minmax(620px, 1fr));
  align-items: start;
}
.card {
  position: relative;
  padding: clamp(36px, 5vw, 48px);
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.94), rgba(10, 15, 30, 0.86));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
  overflow: hidden;
  min-height: 440px;
}
.card.loggedout { min-height: 380px; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.95;
}
.card.twitch::after {
  background: radial-gradient(ellipse at 120% -10%, rgba(145, 70, 255, 0.36), transparent 60%);
}
.card.kick::after {
  background: radial-gradient(ellipse at 120% -10%, rgba(83, 252, 24, 0.42), transparent 62%);
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  min-height: 46px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  color: #02010a;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.card.twitch .badge {
  background: var(--twitch);
  box-shadow: 0 22px 40px rgba(145, 70, 255, 0.45);
}
.card.kick .badge {
  background: var(--kick);
  box-shadow: 0 22px 40px rgba(83, 252, 24, 0.35);
}
.card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 800;
  color: var(--heading);
}
.card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.75;
  font-size: 18px;
}
.tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.92);
}
.profile {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding: 18px clamp(18px, 3vw, 22px);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.card.twitch .profile {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.18), rgba(15, 23, 42, 0.5));
  box-shadow: inset 0 0 0 1px rgba(145, 70, 255, 0.16);
}
.card.kick .profile {
  background: linear-gradient(135deg, rgba(83, 252, 24, 0.18), rgba(15, 23, 42, 0.5));
  box-shadow: inset 0 0 0 1px rgba(83, 252, 24, 0.14);
}
.identity {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 14px 26px rgba(8, 12, 26, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.4);
}
.avatar.fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 18px;
  color: #f8fafc;
}
.card.twitch .avatar.fallback {
  background: linear-gradient(135deg, rgba(145, 70, 255, 0.88), rgba(103, 55, 210, 0.92));
}
.card.kick .avatar.fallback {
  background: linear-gradient(135deg, rgba(83, 252, 24, 0.85), rgba(56, 178, 24, 0.88));
  color: #021004;
}
.identity-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.identity-meta strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--heading);
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: rgba(226, 232, 240, 0.88);
}
.profile-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.9);
  font-size: 14px;
  font-weight: 600;
}
.profile-status.live {
  background: linear-gradient(180deg, rgba(6, 95, 70, 0.65), rgba(4, 60, 47, 0.65));
  border-color: rgba(16, 185, 129, 0.65);
  color: #eafff3;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35), 0 10px 24px rgba(16, 185, 129, 0.18);
}
.card.twitch .profile-status {
  background: rgba(145, 70, 255, 0.18);
  border-color: rgba(145, 70, 255, 0.28);
}
.card.kick .profile-status {
  background: rgba(83, 252, 24, 0.18);
  border-color: rgba(83, 252, 24, 0.26);
  color: #04110b;
}
.card.twitch .profile-status.live,
.card.kick .profile-status.live {
  background: linear-gradient(180deg, rgba(6, 95, 70, 0.65), rgba(4, 60, 47, 0.65));
  border-color: rgba(16, 185, 129, 0.65);
  color: #eafff3;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35), 0 10px 24px rgba(16, 185, 129, 0.18);
}
.profile-status code.channel {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(2, 6, 15, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 4px 8px;
  border-radius: 10px;
  color: inherit;
}
.profile-status .emoji {
  font-size: 18px;
}
.status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 20px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--muted);
}
.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.status.running {
  background: rgba(145, 70, 255, 0.2);
  color: #e3d9ff;
}
.card.kick .status.running {
  background: rgba(83, 252, 24, 0.22);
  color: #e4ffe0;
}
.status.pending {
  color: #fde68a;
  background: rgba(202, 138, 4, 0.28);
}
.status.idle {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.16);
}
.muted {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin-top: 24px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 14px;
  padding: 16px 32px;
  min-height: 52px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 140ms ease, box-shadow 180ms ease, opacity 120ms ease;
}
.btn.primary {
  color: #0b021e;
  background: var(--twitch);
  box-shadow: 0 14px 30px rgba(145, 70, 255, 0.32);
}
.card.kick .btn.primary {
  background: var(--kick);
  box-shadow: 0 14px 30px rgba(83, 252, 24, 0.28);
}
.card.kick .btn.primary:hover {
  box-shadow: 0 20px 44px rgba(83, 252, 24, 0.34);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(145, 70, 255, 0.38);
}
.btn.secondary {
  background: rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.88);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}
.btn.warning {
  background: linear-gradient(180deg, #f59e0b, #ea7c00);
  color: #1b0a00;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.35);
}
.btn.warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.45);
}
.btn.ghost {
  background: rgba(8, 15, 32, 0.35);
  color: rgba(148, 163, 184, 0.9);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}
.btn.ghost:hover {
  background: rgba(8, 15, 32, 0.5);
}
.btn.danger {
  background: linear-gradient(180deg, #ef4444, #c81e1e);
  color: #220506;
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.35);
}
.btn.danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(239, 68, 68, 0.45);
}
.btn:focus-visible {
  outline: 2px solid rgba(145, 70, 255, 0.55);
  outline-offset: 3px;
}
.btn[disabled],
.btn.disabled {
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}
form { margin: 0; }
footer {
  margin-top: 24px;
  text-align: center;
  color: rgba(148, 163, 184, 0.68);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.settings-main {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 64px clamp(32px, 6vw, 96px) 96px 32px;
}
.settings-shell {
  display: grid;
  gap: clamp(24px, 4vw, 40px);
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.settings-nav h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--heading);
}
.settings-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-tabs .tab {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.1);
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}
.settings-tabs .tab span {
  display: block;
  font-weight: 600;
  color: var(--heading);
}
.settings-tabs .tab small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.settings-tabs .tab:hover {
  transform: translateX(4px);
  border-color: rgba(148, 163, 184, 0.3);
}
.settings-tabs .tab.active {
  background: rgba(145, 70, 255, 0.16);
  border-color: rgba(145, 70, 255, 0.4);
  box-shadow: 0 16px 28px rgba(17, 24, 39, 0.32);
}
.settings-panels {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.settings-panel {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.24s ease;
}
.settings-panel.active {
  display: flex;
}
.settings-panel header h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--heading);
}
.settings-panel header p {
  margin: 10px 0 0;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.7;
}
.usage-summary {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.usage-total {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.usage-total-label {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.usage-total-value {
  font-size: 44px;
  font-weight: 800;
  color: var(--heading);
}
.usage-total-target {
  font-size: 14px;
  color: rgba(148, 163, 184, 0.75);
}
.usage-cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.usage-card {
  padding: 22px;
  border-radius: 20px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.usage-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--heading);
}
.usage-identifier {
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
}
.usage-identifier.muted {
  color: var(--muted);
}
.usage-count {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
}
.billing-placeholder,
.about-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: rgba(226, 232, 240, 0.9);
}
.billing-placeholder ul,
.about-content ul {
  margin: 0;
  padding-left: 22px;
  color: rgba(226, 232, 240, 0.9);
}
.billing-placeholder .muted {
  color: var(--muted);
}
.link-chip {
  text-decoration: none;
  color: inherit;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 820px) {
  .topbar-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar-chip {
    align-self: flex-end;
  }
  .settings-shell {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    position: sticky;
    top: 20px;
  }
}
@media (max-width: 640px) {
  header.hero {
    margin-bottom: 48px;
  }
  header.hero h1 {
    font-size: clamp(38px, 10vw, 48px);
  }
  .settings-main {
    padding: 48px 20px 72px;
  }
  .settings-tabs .tab {
    padding: 16px 18px;
  }
  .usage-total-value {
    font-size: 36px;
  }
}
