/* Content region reconstructed 1:1 from the reference DOM's Tailwind classes.
   Semantic color tokens mirror the reference's primary/secondary/tertiary
   background + text scheme; accent is Tailwind indigo-600. */
:root {
  --page-bg: #1f2937;        /* secondary-background (page + option boxes) = TW gray-800 */
  --panel-bg: #192130;       /* primary-background (cards) -- between sidebar gray-900 and page gray-800 */
  --tertiary: #374151;       /* tertiary-background (borders/dividers) = TW gray-700 */
  --primary-text: #f3f5f9;
  --secondary-text: #99a2b2;
  --success: #10b981;       /* border-success = TW emerald-500 */
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --blue-400: #60a5fa;
  --gray-300: #d1d5db;
  --sidebar-border: #29344d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--primary-text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar (bg-gray-900) ---------- */
.sidebar {
  width: 256px;
  background: #111827;
  border-right: 1px solid #374151;
  padding-top: 8px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 192px;
  height: 96px;
  margin: 0 auto;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  width: 192px;
  height: 96px;
  object-fit: contain;
  display: block;
}

/* nav area: px-3, sections gap-4, sign-in pinned bottom (justify-between h-full) */
.nav-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 12px 16px;
}
.nav { display: flex; flex-direction: column; gap: 16px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }

.nav-section {
  text-transform: uppercase;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--primary-text);
  margin-bottom: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 12px;
  border-radius: 6px;
  color: #9ca3af;
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.nav-item:hover { color: var(--primary-text); }
.nav-item .ni { width: 24px; height: 24px; flex-shrink: 0; }
.nav-item.active { background: var(--indigo-600); color: #fff; }

/* Sign In with Discord: bg-[#5865f2] py-2 px-3 text-sm font-medium rounded-md animate-bounce */
.signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5865f2;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  padding: 8px 12px;
  border-radius: 6px;
  animation: bounce 1s infinite;
}
.signin-btn:hover { background: rgba(88, 101, 242, 0.8); }

.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  overflow: hidden;
  background: #43b581;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.sidebar-user img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-user span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: none; animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .signin-btn { animation: none; }
}

/* ---------- Content region (their bg-secondary-background scroll area) ---------- */
.content-wrap {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--page-bg);
}

/* banner: rounded-md px-3 py-2 gap-2 bg-indigo-400/10 justify-center */
.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(129, 140, 248, 0.1);
  border-radius: 6px;
  width: 100%;
  height: 40px;
  box-sizing: border-box;
}
.banner-icon { width: 24px; height: 24px; color: #fff; flex-shrink: 0; }
.banner-text { font-size: 15px; line-height: 20px; color: #d1d5db; margin: 0; }
.banner-text a { color: #60a5fa; text-decoration: none; }
.banner-text a:hover { text-decoration: underline; }

/* wizard: flex flex-col gap-8 mb-8 */
.wizard { display: flex; flex-direction: column; gap: 32px; margin-bottom: 32px; }

/* header bar: px-8 py-4 space-x-4 border-b text-sm */
.page-title {
  padding: 16px 32px;
  border-bottom: 1px solid var(--tertiary);
  font-size: 16px;
  line-height: 20px;
}
.page-title .t { color: var(--primary-text); font-weight: 700; }
.page-title .s { color: var(--secondary-text); margin-left: 16px; }

/* content block: flex flex-col gap-6 px-8 */
.content-block { display: flex; flex-direction: column; gap: 24px; padding: 0 32px; }

.tail-spacer { height: 176px; }

/* ---------- Sidebar dashboard pages ---------- */
.dashboard-page[hidden] {
  display: none !important;
}

.dashboard-page {
  min-height: 100%;
}

.dashboard-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--tertiary);
  font-size: 14px;
  line-height: 20px;
}

.dashboard-title .t {
  color: var(--primary-text);
  font-weight: 700;
}

.dashboard-title .s {
  color: var(--secondary-text);
  font-weight: 400;
}

.dashboard-content {
  padding: 32px;
}

.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-card {
  position: relative;
  padding: 24px;
  background: var(--panel-bg);
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.dashboard-card h2,
.dashboard-card h3,
.dashboard-card p {
  margin-top: 0;
}

.dashboard-card h2 {
  margin-bottom: 16px;
  color: var(--primary-text);
  font-size: 20px;
  line-height: 28px;
}

.dashboard-card h3 {
  margin-bottom: 8px;
  color: var(--primary-text);
  font-size: 18px;
  line-height: 28px;
}

.dashboard-card p,
.dashboard-card li {
  color: var(--secondary-text);
  font-size: 14px;
  line-height: 20px;
}

.server-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.server-profile-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 9999px;
  object-fit: cover;
}

.server-profile h2 {
  margin: 0;
}

.server-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.server-tile,
.dashboard-inner-card,
.api-key-row,
.api-endpoint {
  padding: 16px;
  background: var(--page-bg);
  border-radius: 6px;
}

.server-tile p {
  margin-bottom: 0;
}

.dashboard-action {
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--indigo-600);
  border: 0;
  border-radius: 6px;
  color: #fff;
  font: 500 14px/20px "Poppins", sans-serif;
  cursor: pointer;
}

.dashboard-action:hover {
  background: var(--indigo-700);
}

.dashboard-action-wide {
  width: 100%;
  margin-top: 24px;
}

.subscription-plan {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.subscription-plan ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.subscription-plan strong {
  color: var(--primary-text);
  font-size: 24px;
}

.dashboard-label {
  display: block;
  margin-top: 16px;
  color: var(--primary-text);
  font-size: 14px;
  font-weight: 500;
}

.dashboard-label input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 16px;
  background: var(--page-bg);
  border: 1px solid var(--tertiary);
  border-radius: 6px;
  color: var(--primary-text);
  font: inherit;
}

.preference-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--primary-text);
  font-size: 14px;
}

.preference-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--indigo-600);
}

.support-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.support-card:hover {
  opacity: 0.8;
}

.api-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.api-key-row .dashboard-action {
  margin-top: 0;
}

.api-endpoint {
  margin-top: 8px;
  color: var(--primary-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.api-endpoint strong {
  margin-right: 8px;
}

.api-endpoint .get { color: #4ade80; }
.api-endpoint .post { color: #60a5fa; }
.api-endpoint .put { color: #facc15; }

/* panel: bg-primary-background shadow-md p-6 rounded-lg */
/* shadow-md (Tailwind default: faint, ~0.1 alpha) */
.panel {
  position: relative;
  background: var(--panel-bg);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* stepper: flex flex-col xl:flex-row (no gap); each step flex gap-4 p-4 flex-1 rounded-md */
.stepper-row { display: flex; flex-direction: column; }
@media (min-width: 1280px) { .stepper-row { flex-direction: row; } }

.step {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  padding: 16px;
  border-radius: 6px;
}
.step.active { background: var(--indigo-600); }
.step .dot {
  border: 2px solid #fff;
  border-radius: 9999px;
  height: 32px;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step .dot p { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--primary-text); }
.step .lbl { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--primary-text); }

/* card inner: flex flex-col gap-6 */
.card-inner { display: flex; flex-direction: column; gap: 24px; }
.card-head { display: flex; flex-direction: column; }
.card-head .t { margin: 0; font-size: 18px; line-height: 28px; font-weight: 700; color: var(--primary-text); }
.card-head .s { margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--secondary-text); }

/* options: flex flex-col gap-2 */
.options { display: flex; flex-direction: column; gap: 8px; }

/* option: bg-secondary-background shadow-sm p-4 rounded-md border-2 border-success */
/* option: bg-secondary-background shadow-sm hover:shadow-lg p-4 rounded-md border-2 border-success */
.option {
  position: relative;
  display: block;
  background: var(--page-bg);
  cursor: pointer;
  padding: 16px;
  border-radius: 6px;
  border: 2px solid var(--success);
  text-decoration: none;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: box-shadow 0.15s, opacity 0.15s;
}
.option:hover { opacity: 0.9; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.option-inner { display: flex; flex-direction: column; }
.option .t { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--primary-text); text-align: left; }
.option .s { margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--secondary-text); text-align: left; }

/* button: bg-indigo-600 py-2 px-3 rounded-md font-medium text-sm (full width via flex-col stretch) */
.btn {
  transition: background-color 0.15s;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--indigo-600);
  color: #fff;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--indigo-700); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* guild rows (Select Servers) */
.guild-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid var(--tertiary);
  border-radius: 6px;
  cursor: pointer;
  background: var(--page-bg);
}
.guild-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--indigo-600); }
.guild-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: #23304a; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #c3ccdd; flex-shrink: 0;
}

/* notices */
.notice { border-radius: 6px; padding: 12px 14px; font-size: 14px; line-height: 20px; }
.notice.err { background: rgba(237, 66, 69, 0.12); color: #ff9a9c; border: 1px solid rgba(237, 66, 69, 0.35); }
.notice.ok { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.notice.muted { background: rgba(139, 143, 156, 0.1); color: var(--secondary-text); border: 1px solid var(--tertiary); }

/* ---------- Roblox OAuth authorize modal (opens on Next) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 8, 12, 0.75);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;      /* vertically centered */
  justify-content: center;  /* horizontally centered */
  padding: 24px;
}
.modal-overlay[hidden] { display: none; }

.modal {
  width: 1367px;
  max-width: calc(100vw - 24px);
  height: 746px;
  max-height: calc(100vh - 24px);
  background: #101317;                 /* very dark blue-black body */
  border: 1px solid #2a2f3b;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;                  /* ~60px tall */
  background: #1a1d24;                 /* dark blue-gray charcoal */
  border-bottom: 1px solid #2a2f3b;
}
.modal-title { font-size: 18px; line-height: 28px; font-weight: 700; color: var(--primary-text); }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--secondary-text); padding: 4px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.modal-close { color: #8b93a4; }
.modal-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.modal-close svg { width: 22px; height: 22px; }

.modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* content sits in the middle */
  padding: 24px;
  overflow-y: auto;
}
.modal-h { margin: 0 0 20px; font-size: 34px; line-height: 40px; font-weight: 800; color: #fff; text-align: center; }
.modal-divider { width: 500px; max-width: 82%; height: 1px; background: #2a2f3b; margin-bottom: 34px; }

.modal-avatar {
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #3a3a3e, #161618);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.modal-robot { width: 118px; height: 118px; }   /* larger, more prominent icon (viewBox cropped to the robot) */

.modal-appname { margin: 0 0 22px; font-size: 18px; line-height: 28px; font-weight: 700; color: #fff; }

.modal-continue,
.modal-return {
  display: flex; align-items: center; justify-content: center;
  width: 278px; max-width: 90%;
  padding: 12px 20px; border-radius: 8px;   /* ~44px tall */
  font-size: 16px; line-height: 20px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.modal-continue { background: #e6e8ec; color: #111827; border: none; }
.modal-continue:hover { background: #d3d7dd; }

.modal-or {
  display: flex; align-items: center; gap: 12px;
  width: 278px; max-width: 90%; margin: 22px 0 21px;
  color: #8b93a4; font-size: 14px; line-height: 20px;
}
.modal-or::before, .modal-or::after { content: ""; flex: 1; height: 1px; background: #2a2f3b; }

.modal-return { background: #0f1219; color: #fff; border: 1px solid #2a2f3b; }
.modal-return:hover { background: #151a23; }

/* ---------- Multi-screen modal updates ---------- */
.modal-overlay {
  display: none !important;
}
.modal-overlay.active {
  display: flex !important;
  animation: overlayFadeIn 200ms ease-out forwards;
}
.modal-overlay.closing {
  animation: overlayFadeOut 200ms ease-in forwards;
}

@keyframes overlayFadeIn {
  from {
    background: rgba(6, 8, 12, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
  to {
    background: rgba(6, 8, 12, 0.75);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
}

@keyframes overlayFadeOut {
  from {
    background: rgba(6, 8, 12, 0.75);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  to {
    background: rgba(6, 8, 12, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
}

.modal-container {
  width: 1439px;
  max-width: calc(100vw - 48px);
  height: 803px;
  max-height: calc(100vh - 48px);
  background: #101317;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

.modal-overlay.active .modal-container {
  opacity: 0;
  animation: containerFadeIn 200ms ease-out forwards;
}

.modal-overlay.closing .modal-container {
  animation: containerFadeOut 200ms ease-in forwards;
}

@keyframes containerFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes containerFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #1a1d24;
  border-bottom: 1px solid #2a2f3b;
  height: 65px;
  box-sizing: border-box;
}
.modal-header h3 { margin: 0; font-size: 18px; line-height: 28px; font-weight: 700; color: var(--primary-text); }
.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #8b93a4;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: color 0.15s;
}
.close-btn:hover { color: #fff; }
.close-btn svg { width: 22px; height: 22px; }

.modal-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  box-sizing: border-box;
}

/* Screen visibility */
.oauth-screen,
.loading-screen,
.login-screen {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.oauth-screen.active,
.loading-screen.active,
.login-screen.active {
  display: flex;
}

/* OAuth screen fade-in only on modal open */
.modal-overlay.active .oauth-screen.active {
  animation: screenFadeIn 200ms ease-out forwards;
}

.modal-overlay.closing .oauth-screen.active {
  animation: screenFadeOut 200ms ease-in forwards;
}

@keyframes screenFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes screenFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* OAuth Screen */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(520px, 100%);
}
.auth-title {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.divider {
  width: calc(100% - 50px);
  height: 1px;
  background: #2a2f3b;
  border: none;
  margin: 25px 0 35px;
}
.auth-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 450px;
  max-width: 100%;
}
.game-popup {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: none !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
  pointer-events: none;
}
.game-popup.show {
  display: flex !important;
  pointer-events: auto;
}
.popup-topbar {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  z-index: 101;
}
@font-face {
  font-family: "Builder Sans";
  src: url("https://css.rbxcdn.com/5f8b8d5d1962b747.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Builder Sans";
  src: url("https://css.rbxcdn.com/7f3ddcb5a3796526.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Builder Sans";
  src: url("https://css.rbxcdn.com/3e19a797e2ce0522.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Builder Sans";
  src: url("https://css.rbxcdn.com/be234b98e1d313a5.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}
.popup-roblox-nav {
  display: flex;
  align-items: center;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  overflow: hidden;
  background: #191a1f;
  border-bottom: 1px solid #2d2f35;
  color: #f7f7f8;
  font-family: "Builder Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
}
.popup-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 9px;
  flex: 0 0 auto;
  color: #f7f7f8;
  text-decoration: none;
  pointer-events: none;
}
.game-popup.show .popup-nav-link {
  pointer-events: auto;
}
.popup-nav-link:hover {
  color: #fff;
  background: transparent;
}
.popup-nav-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}
.popup-nav-item::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 2px;
  left: 9px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  opacity: 0;
  transition: none;
}
.popup-nav-item:hover::after,
.popup-nav-item:focus-visible::after {
  opacity: 1;
}
.popup-roblox-logo {
  width: 44px;
  padding: 0 7px;
}
.popup-roblox-logo svg {
  display: block;
  width: 30px;
  height: 30px;
}
.popup-nav-charts { width: 100px; }
.popup-nav-marketplace { width: 150px; }
.popup-nav-create { width: 110px; }
.popup-nav-robux { width: 100px; }
.popup-roblox-search {
  display: flex;
  align-items: center;
  width: min(476px, 33vw);
  height: 28px;
  padding: 0;
  flex: 0 1 auto;
  background: #24262c;
  border: 1px solid #303239;
  border-radius: 8px;
  color: #b7bac1;
  pointer-events: none;
}
.game-popup.show .popup-roblox-search {
  pointer-events: auto;
}
.popup-roblox-search:focus-within {
  border-color: #5b5e66;
}
.popup-roblox-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 100%;
  padding: 0;
  flex: 0 0 33px;
  background: transparent;
  border: 0;
  color: #b7bac1;
  cursor: pointer;
}
.popup-roblox-search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.popup-roblox-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 5px 10px 5px 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #f7f7f8;
  caret-color: #fff;
  font: 400 16px/1.4 "Builder Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.popup-roblox-search input::placeholder {
  color: #b7bac1;
  opacity: 1;
}
.popup-roblox-search input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}
.popup-roblox-search input::-ms-clear {
  display: none;
}
.popup-roblox-signup {
  height: 28px;
  margin-left: auto;
  padding: 0 12px;
  background: #335fff;
  color: #fff;
  border-radius: 4px;
}
.popup-roblox-signup:hover {
  background: #2563eb;
}
.popup-image {
  display: block;
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 auto !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0;
  object-fit: cover;
}

/* Roblox Login Overlay - Centered on Image */
.login-overlay {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 100 !important;
}

.verification-rectangle {
  width: 360px !important;
  height: 490px !important;
  min-width: 360px !important;
  min-height: 490px !important;
  max-width: none !important;
  flex: none !important;
  display: block;
  padding: 32px 0 44px;
  box-sizing: border-box;
  background: #272930;
  border: 0;
  box-shadow: none;
  pointer-events: none;
  transform: none !important;
}
.game-popup.show .verification-rectangle {
  pointer-events: auto;
}
.verification-rectangle.is-login-loading {
  height: 472px !important;
  min-height: 472px !important;
}
.mock-login-content {
  display: block;
  width: 332px !important;
  min-width: 332px !important;
  max-width: none !important;
  margin-left: auto;
  margin-right: auto;
  flex: none !important;
  color: #f7f7f8;
  font-family: "Builder Sans", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  text-align: center;
  transform: none !important;
}
.mock-login-content h2 {
  margin: -10px 0 9px;
  padding: 0;
  color: #f7f7f8;
  font-size: 32px;
  font-weight: 800;
  line-height: 36px;
  letter-spacing: 0.04em;
}
.mock-login-fields {
  display: block;
  width: 332px !important;
  margin: 0 auto 3px;
}
.mock-login-field {
  display: block;
  width: 332px !important;
  min-width: 332px !important;
  max-width: none !important;
  height: 38px !important;
  margin: 0 0 18px;
  padding: 5px 12px;
  background: rgba(208, 217, 251, 0.08);
  border: 1px solid rgba(208, 217, 251, 0.12);
  border-radius: 8px;
  color: #f7f7f8;
  caret-color: #fff;
  font-family: "Builder Sans", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22.4px;
  text-align: left;
  outline: none;
  box-shadow: none;
}
.mock-login-field:last-child {
  margin-bottom: 0;
}
.mock-login-field::placeholder {
  color: #d5d7dd;
  opacity: 1;
}
.mock-login-field:focus,
.mock-login-field:focus-visible {
  border-color: #d5d7dd;
  outline: none;
}
.mock-login-error {
  display: none;
  width: 332px;
  margin: 0 auto;
  padding: 0;
  color: #df281f;
  font-family: "Builder Sans", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 10px;
  font-weight: 500;
  line-height: 15px;
  text-align: left;
}
.mock-login-content.has-error .mock-login-fields {
  margin-bottom: 0;
}
.mock-login-content.has-error .mock-login-error {
  display: block;
}
.mock-login-button {
  display: block;
  width: 332px !important;
  min-width: 332px !important;
  max-width: none !important;
  height: 36px;
  margin-left: auto;
  margin-right: auto;
  padding: 9px;
  border-radius: 8px;
  color: #f7f7f8;
  font-family: "Builder Sans", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 16px;
  cursor: pointer;
}
.mock-login-button:focus-visible,
.mock-login-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.mock-login-submit {
  margin-top: 6px;
  margin-bottom: 28px;
  background: transparent;
  border: 1px solid #d5d7dd;
  color: #bcbec8;
}
.mock-login-submit:hover {
  background: transparent;
  border-color: #f7f7f8;
  color: #f7f7f8;
}
.mock-login-loading.spinner.spinner-default {
  display: none;
  width: 100%;
  height: 24px;
  margin: 6px auto;
  background-color: transparent;
  background-image: url("/static/roblox-spinner-dark.gif");
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: auto 24px;
}
.mock-login-content.is-loading .mock-login-submit {
  display: none;
}
.mock-login-content.is-loading .mock-login-loading {
  display: inline-block;
}
.mock-login-link {
  display: inline-block;
  color: #f7f7f8;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}
.mock-login-link:hover {
  text-decoration: underline;
}
.mock-login-divider {
  width: 332px !important;
  height: 1px;
  margin: 26px auto 18px;
  background: rgba(208, 217, 251, 0.12);
}
.mock-login-secondary {
  background: rgba(208, 217, 251, 0.12);
  border: 1px solid transparent;
}
.mock-login-secondary:hover {
  background: rgba(208, 217, 251, 0.12);
  border-color: transparent;
  color: #f7f7f8;
}
.mock-login-secondary + .mock-login-secondary {
  margin-top: 12px;
}
.mock-login-signup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 38px;
  color: #f7f7f8;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
}

/* Roblox Login Section - Dark panel background */
.section-content.login-section {
  background: #272930;
  padding: 40px 36px;
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  box-shadow: none;
  border: none;
  border-radius: 4px;
  margin: 0;
}

.login-header {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 28px 0;
  font-family: Arial, sans-serif;
  line-height: 1.2;
}

/* Form Styling */
.login-form-container {
  margin-bottom: 6px;
}

.login-form {
  margin: 0;
  padding: 0;
}

.form-group {
  margin-bottom: 16px;
}

.username-form-group {
  margin-bottom: 16px;
}

.password-form-group {
  margin-bottom: 18px;
}

.form-control,
.input-field {
  display: block;
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.42857;
  color: #ffffff;
  background-color: #3c3f47;
  border: 1px solid #464a52;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.15s ease-in-out;
  font-family: Arial, sans-serif;
}

.form-control:focus,
.input-field:focus {
  border-color: #0084ff;
  outline: none;
  background-color: #424854;
}

.input-field::placeholder {
  color: #9299a0;
}

.form-control::placeholder {
  color: #9299a0;
}

/* Button Base Styling */
.btn-full-width {
  display: block;
  width: 100%;
  height: 42px;
  padding: 6px 12px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.42857;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid rgba(70, 74, 82, 0.6);
  border-radius: 4px;
  transition: all 0.15s ease-in-out;
  font-family: Arial, sans-serif;
}

.login-button,
.btn-secondary-md {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid #ffffff;
}

.login-button:hover,
.btn-secondary-md:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
  color: #ffffff;
}

.login-button:active,
.btn-secondary-md:active {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

.btn-control-md {
  background-color: #3c3f47;
  color: #ffffff;
  border: 1px solid #464a52;
}

.btn-control-md:hover {
  background-color: #464a52;
  border-color: #515964;
  color: #ffffff;
}

.btn-control-md:active {
  background-color: #4a4e56;
  border-color: #515964;
  color: #ffffff;
}

/* Text and Links */
.text-center {
  text-align: center;
}

.text-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.text-link:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* Forgot Credentials */
.forgot-credentials-link {
  margin-top: 18px;
  margin-bottom: 28px;
  text-align: center;
}

/* Divider */
.alternative-login-divider-container {
  margin: 28px 0 20px 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rbx-divider,
.alternative-login-divider {
  height: 1px;
  background-color: #464a52;
  width: 100%;
}

/* Alternative Login Buttons */
.otp-login-button {
  margin-top: 12px;
  margin-bottom: 6px;
}

.cross-device-login-button {
  margin-top: 6px;
  margin-bottom: 10px;
}

/* Sign Up Option */
.signup-option {
  margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  font-size: 14px;
  text-align: center;
  font-weight: 400;
}

.no-account-text {
  color: #ffffff;
  font-weight: 400;
  margin-right: 6px;
}

.signup-link {
  color: #ffffff;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
}

.signup-link:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
.logo-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #1a1d24;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-name {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  margin: 0;
  display: block;
}
.primary-btn,
.secondary-btn {
  width: 100%;
  height: 50px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
}
#continueBtn {
  width: 300px;
  height: 44px;
}

.primary-btn {
  background: #e6e8ec;
  color: #111827;
  border: none;
}
.primary-btn:hover {
  background: #d3d7dd;
}

.secondary-btn {
  width: 300px;
  height: 46px;
  background: transparent;
  color: #fff;
  border: 1px solid #3f4558;
}
.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #4f5a6f;
}
.divider-or {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 3px 0;
}
.divider-or .line {
  flex: 1;
  height: 1px;
  background: #3f4558;
}
.or-text {
  color: #9ca3af;
  font-size: 16px;
}

/* Loading Screen */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  transform: translateY(-100px);
}

.loading-title {
  font-size: 23px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  position: relative;
  top: -16px;
}

.loading-divider {
  width: 1128px;
  height: 1px;
  background: #2a2f3b;
  border: none;
  margin: 0 auto;
  position: relative;
  top: -10px;
}

.spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.spinner-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-svg {
  width: 40px;
  height: 40px;
  transform-origin: center;
  animation: circular-progress-rotate 0.8s linear infinite;
  will-change: transform;
}

.spinner-circle {
  stroke: #2bb1ff;
  stroke-dasharray: 50px 126px;
  stroke-dashoffset: 0;
}

@keyframes circular-progress-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loading-text {
  text-align: center;
  color: #8b93a4;
  font-size: 14px;
  margin: 0;
  position: relative;
  top: 0px;
}

.cancel-link {
  color: #2bb1ff;
  text-decoration: none;
}

.cancel-link:hover {
  text-decoration: underline;
}

/* Login Screen */
.login-screen {
  padding: 0;
}
#loginIframe,
#twofaIframe {
  width: 100%;
  height: 100%;
  border: none;
}
#twofaIframe {
  display: none;
}

/* standalone (error) page */
.center-page { width: 100%; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.center-card {
  background: var(--panel-bg);
  border: 1px solid var(--tertiary);
  border-radius: 12px;
  padding: 40px 48px;
  text-align: center;
  max-width: 420px;
}

@media (max-width: 720px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--sidebar-border); }
  .content-block, .page-title { padding-left: 20px; padding-right: 20px; }
}

/* Username verification page only: match the current Bloxlink dashboard. */
.username-verification-page {
  font-family: "Poppins", sans-serif;
}

.username-verification-page .nav-item,
.username-verification-page .signin-btn,
.username-verification-page .banner-text,
.username-verification-page .page-title,
.username-verification-page .btn {
  font-size: 14px;
  line-height: 20px;
}

.username-verification-page .nav-item.active {
  background: var(--indigo-600);
  color: #fff;
}

.username-verification-page .nav-item.active:hover {
  color: var(--primary-text);
}

.username-verification-page .page-title .s {
  margin-left: 12px;
}

.username-verification-page .brand-logo {
  transform: translateY(-3px);
}

.username-verification-page .nav {
  transform: translateY(3px);
}

@media (max-width: 767px) {
  body.username-verification-page {
    display: block;
  }

  .username-verification-page .sidebar {
    display: none;
  }

  .username-verification-page .content-wrap {
    width: 100%;
    min-height: 100vh;
  }

  .username-verification-page .banner {
    height: auto;
    min-height: 40px;
    border-radius: 0;
  }

  .username-verification-page .page-title {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .username-verification-page .page-title .s {
    margin-left: 0;
  }

  .username-verification-page .content-block,
  .username-verification-page .page-title,
  .username-verification-page .dashboard-content,
  .username-verification-page .dashboard-title {
    padding-left: 16px;
    padding-right: 16px;
  }

  .username-verification-page .dashboard-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .server-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Mobile: verification game-popup ---------- */
@media (max-width: 500px) {
  /* Remove padding so the game popup fills the whole screen */
  .modal-overlay {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  .modal-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }

  /* Scale verification rectangle to fit narrow screens */
  .verification-rectangle {
    width: calc(100vw - 20px) !important;
    min-width: 0 !important;
    max-width: 360px !important;
  }

  /* Scale mock login inner content */
  .mock-login-content {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .mock-login-fields {
    width: 100% !important;
    max-width: 100% !important;
  }

  .mock-login-field {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* OAuth screen first card */
  .modal-body {
    padding: 16px !important;
  }

  /* Nav items in the Roblox topbar — hide text links, keep logo */
  .popup-nav-item {
    display: none !important;
  }

  .popup-roblox-signup {
    display: none !important;
  }
}
