.nav-pill,
.profile-pill,
.logout-button {
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cream);
  background: rgba(137, 192, 182, 0.09);
  cursor: pointer;
  transform: scale(1);
  transition:
    transform 150ms ease,
    color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}
.nav-pill:hover,
.nav-pill.active,
.logout-button:hover,
.logout-button:focus-visible,
.profile-pill:hover,
.profile-pill.active {
  color: var(--bg);
  background: var(--mint);
  box-shadow:
    inset 0 0 0 1px rgba(228, 241, 225, 0.28),
    0 3px 12px rgba(0, 0, 0, 0.24);
  transform: scale(1.05);
}
.profile-pill {
  background: rgba(137, 192, 182, 0.09);
}
.nav-icon svg,
.profile-icon svg,
.logout-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon,
.profile-icon {
  width: 18px;
  height: 18px;
}
.profile-icon {
  border: 0;
}
.logout-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.logout-button svg {
  width: 16px;
  height: 16px;
}
.logout-button {
  color: var(--cream);
  background: rgba(205, 93, 83, 0.12);
}
.logout-button:hover,
.logout-button:focus-visible {
  color: #fff;
  background: rgba(205, 93, 83, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(240, 167, 160, 0.3),
    0 3px 12px rgba(0, 0, 0, 0.24);
  transform: scale(1.05);
}
.nav-pill:active,
.profile-pill:active,
.logout-button:active {
  transform: scale(0.97);
}
.nav-pill:focus-visible,
.profile-pill:focus-visible,
.logout-button:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
.page-intro {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
}
.page-heading .count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
}
.nav-icon,
.profile-icon {
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}
.profile-icon {
  width: 20px;
  height: 20px;
}
.nav-label {
  margin-left: 2px !important;
  margin-top: 1px;
  margin-right: 2px;
}
.logout-button {
  white-space: nowrap;
}
@media (max-width: 600px) {
  .nav-label {
    display: none;
  }
  .nav-pill,
  .profile-pill {
    padding: 9px 11px;
  }
  .logout-button {
    padding: 9px 11px;
  }
  .logout-label {
    display: none;
  }
  .welcome-stats {
    display: none;
  }
}
.compact-login {
  min-height: calc(100dvh - 72px);
  padding: clamp(28px, 6vh, 64px) 18px 18px;
  align-items: start;
}
.compact-login .login-card {
  margin: 0;
}
.auth-content {
  padding-top: 0;
  padding-bottom: 0;
}
.auth-shell {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.auth-shell .content-wrap {
  flex: 1;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.auth-shell .login-page {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: clamp(28px, 6vh, 64px) 18px 18px;
  align-items: start;
}
.auth-shell .login-card {
  margin: 0;
  padding: 22px 30px;
}
.auth-shell .login-card .muted {
  margin: 0 0 10px;
}
.auth-shell .login-card label {
  margin-top: 10px;
}
.auth-shell .login-card input {
  padding: 10px 12px;
}
.auth-shell .login-card .wide {
  margin-top: 16px;
  padding: 12px;
}
.auth-shell .login-note {
  margin-top: 12px;
}
@media (max-height: 700px) and (min-width: 601px) {
  .auth-shell .login-card {
    padding: 16px 26px;
  }
  .auth-shell .login-card h1 {
    font-size: 1.9rem;
  }
  .auth-shell .login-card label {
    margin-top: 7px;
  }
  .auth-shell .login-card .wide {
    margin-top: 10px;
    padding: 10px;
  }
  .auth-shell .login-note {
    margin-top: 8px;
  }
}
@media (max-width: 600px) {
  .compact-login,
  .auth-shell .login-page {
    padding-top: 30px;
  }
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}
.account-actions .account-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  transform: scale(1);
  transition:
    transform 150ms ease,
    color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}
.account-actions .account-action-button svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
@media (max-width: 420px) {
  .page-heading.compact {
    flex-wrap: wrap;
  }
  .account-actions {
    width: 100%;
  }
}
.account-server {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.account-actions .account-action-button:hover,
.account-actions .account-action-button:focus-visible {
  transform: scale(1.04);
  box-shadow:
    inset 0 0 0 1px rgba(137, 192, 182, 0.28),
    0 3px 12px rgba(0, 0, 0, 0.2);
}
.account-actions .account-action-button:active {
  transform: scale(0.97);
}
.account-actions .account-logout {
  color: #ffd8d4;
  background: rgba(205, 93, 83, 0.18);
}
.account-actions .account-logout:hover,
.account-actions .account-logout:focus-visible {
  color: #fff;
  background: rgba(205, 93, 83, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(240, 167, 160, 0.36),
    0 3px 12px rgba(0, 0, 0, 0.2);
}
.account-actions .account-action-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-actions .button.ghost {
  color: var(--cream);
  background: rgba(137, 192, 182, 0.11);
}
.account-actions .button.ghost:hover,
.account-actions .button.ghost:focus-visible {
  color: var(--bg);
  background: var(--mint);
}
.wordmark {
  display: inline-flex;
  gap: 0px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.wordmark span:first-child {
  color: var(--cream);
}
.wordmark span:last-child,
.brand-accent {
  color: var(--mint);
}
.login-card h1 .wordmark {
  font-size: 0.92em;
  vertical-align: baseline;
}
.welcome-page > .eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--cream);
}
.welcome-page .wordmark span:first-child {
  color: var(--cream);
}
.welcome-page .wordmark span:last-child {
  color: var(--mint);
}

/* Keep the top-right control group compact and aligned on one grid. */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
}
.topbar-actions > .nav-pill,
.topbar-actions > .profile-pill,
.topbar-actions > .logout-button {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  margin: 0;
  line-height: 1;
  vertical-align: middle;
}
.topbar-actions > .nav-pill {
  min-width: 88px;
  padding: 0 9px;
  gap: 4px;
}
.topbar-actions > .nav-shares {
  min-width: 76px;
}
.topbar-actions > .nav-watch {
  min-width: 82px;
}
.topbar-actions > .profile-pill {
  width: 38px;
  min-width: 38px;
  padding: 0;
}
.topbar-actions > .logout-button {
  min-width: 82px;
  padding: 0 10px;
}
.topbar-actions .nav-icon,
.topbar-actions .profile-icon,
.topbar-actions .logout-button svg {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.topbar-actions .nav-label {
  margin-left: 4px;
  white-space: nowrap;
  line-height: 1;
  transform: translateY(0);
}
.topbar-actions .nav-pill:hover .nav-label,
.topbar-actions .nav-pill.active .nav-label {
  transform: none;
}

@media (max-width: 600px) {
  .topbar-actions {
    gap: 5px;
  }
  .topbar-actions > .nav-pill,
  .topbar-actions > .profile-pill,
  .topbar-actions > .logout-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }
  .topbar-actions > .nav-pill .nav-label,
  .topbar-actions > .logout-button .logout-label {
    display: none !important;
  }
  .topbar-actions > .logout-button svg {
    width: 18px;
    height: 18px;
  }
}
.auth-loading {
  min-height: calc(100vh - 72px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.8rem;
}
.loading-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--mint);
  border-radius: 50%;
  color: var(--mint);
  font-size: 1.7rem;
  animation: streamlink-pulse 1.2s ease-in-out infinite;
}
.welcome-page {
  width: min(1100px, 100%);
  max-width: 1100px;
  margin: 9vh auto;
  padding: 20px;
}
.welcome-page h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  white-space: nowrap;
  margin-bottom: 18px;
}
.welcome-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.welcome-actions span {
  margin-left: 8px;
}
.welcome-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 70px;
}
.welcome-stats div {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: rgba(13, 36, 40, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.welcome-stats span {
  color: var(--muted);
  font-size: 0.75rem;
}
.welcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}
.welcome-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 13px;
  row-gap: 5px;
  align-items: center;
  padding: 18px;
  color: var(--cream);
  background: linear-gradient(
    145deg,
    rgba(18, 50, 56, 0.9),
    rgba(13, 36, 40, 0.9)
  );
  border: 1px solid var(--line);
  border-radius: 16px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}
.welcome-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  background: var(--surface-2);
}
.welcome-card-icon {
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--bg);
  background: var(--mint);
}
.welcome-card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.welcome-card strong {
  font: 600 1rem "Space Grotesk";
}
.welcome-card > span:nth-of-type(2) {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.welcome-card-link {
  margin-top: 5px;
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 700;
}
.welcome-card-link b {
  margin-left: 4px;
  font-size: 1rem;
}
.category-toolbar {
  display: flex;
  justify-content: space-between;
  margin: -14px 0 12px;
  font-size: 0.72rem;
}
.category-search {
  max-width: 430px;
  margin: 18px 0 18px;
  background: var(--surface);
}
.count-badge .live-dot {
  font-size: 0.68rem;
  letter-spacing: 1px;
}
@keyframes streamlink-pulse {
  50% {
    transform: scale(1.08);
    opacity: 0.65;
  }
}
@media (max-width: 600px) {
  .welcome-page {
    margin: 6vh auto;
  }
  .welcome-page h1 {
    font-size: clamp(2.1rem, 9vw, 3rem);
    white-space: normal;
  }
  .welcome-actions {
    flex-direction: column;
  }
  .welcome-actions .button {
    width: 100%;
  }
  .welcome-stats {
    margin-top: 45px;
    grid-template-columns: 1fr;
  }
  .category-toolbar {
    margin-top: -8px;
  }
  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 24px;
  }
  .welcome-card {
    padding: 15px;
  }
}
.watch-entry-heading {
  margin-bottom: 14px;
}
.watch-entry-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
  max-width: 680px;
}
.watch-entry-form .search {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.watch-entry-form .button {
  white-space: nowrap;
}
.watch-entry-form .button span {
  margin-left: 7px;
}
.watch-entry-error {
  max-width: 680px;
}
@media (max-width: 600px) {
  .watch-entry-form {
    flex-direction: column;
  }
  .watch-entry-form .button {
    min-height: 46px;
  }
}
