:root {
  --bg: #0b0c10;
  --panel: #12141a;
  --panel2: #171920;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f5f5;
  --muted: #9297a5;
  --accent: #dc2944;
  --accent2: #f06a45;
  --success: #52d68a;
  --danger: #ef6a7a;
  --radius: 18px;
}

html[data-theme="light"] {
  --bg: #f3f5fa;
  --panel: #ffffff;
  --panel2: #f7f8fb;
  --line: rgba(24, 31, 48, 0.12);
  --text: #171b26;
  --muted: #687083;
}

* {
  box-sizing: border-box;
}

/* =========================
   HIDDEN STATE
========================= */

[hidden] {
  display: none !important;
}


html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  min-height: 100vh;

  background:
    radial-gradient(
      circle at 55% -10%,
      rgba(107, 121, 236, 0.16),
      transparent 35%
    ),
    var(--bg);

  color: var(--text);

  font-family: Inter, system-ui, sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));

  margin: auto;
}

/* =========================
   NAV
========================= */

.topbar {
  position: sticky;

  top: 0;

  z-index: 50;

  background: rgba(11, 12, 16, 0.82);

  backdrop-filter: blur(18px);

  border-bottom: 1px solid var(--line);
}

.nav {
  height: 68px;

  display: flex;

  align-items: center;

  gap: 10px;
}

.brand {
  display: flex;

  align-items: center;

  gap: 10px;

  margin-right: auto;

  font-weight: 900;

  letter-spacing: -0.03em;
}

.brand > span:last-child > span {
  color: var(--accent);
}

.brand-logo {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  border-radius: 11px;
}

.brand-logo img {
  width: 100%;
  height: 100%;

  object-fit: contain;

  display: block;
}

.nav > a:not(.brand) {
  padding: 9px 12px;

  border-radius: 10px;

  color: var(--muted);

  font-size: 13px;

  font-weight: 700;
}

.nav > a:not(.brand):hover,
.nav > a.active:not(.brand) {
  background: rgba(255, 255, 255, 0.06);

  color: var(--text);
}

.theme-toggle {
  flex: 0 0 36px;

  width: 36px;
  height: 36px;

  display: grid;

  place-items: center;

  border: 1px solid var(--line);

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.04);

  color: var(--text);

  cursor: pointer;

  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));

  background: color-mix(in srgb, var(--accent) 12%, transparent);

  transform: translateY(-1px);
}

/* =========================
   HERO
========================= */

.hero {
  padding: 88px 0 48px;

  display: grid;

  grid-template-columns: 1.2fr 0.8fr;

  gap: 42px;

  align-items: center;
}

.eyebrow {
  color: var(--accent);

  text-transform: uppercase;

  letter-spacing: 0.16em;

  font-size: 12px;

  font-weight: 900;
}

.hero h1 {
  margin: 18px 0;

  font-size: clamp(42px, 7vw, 82px);

  line-height: 0.95;

  letter-spacing: -0.06em;
}

.hero-copy > p {
  max-width: 680px;

  color: var(--muted);

  font-size: 18px;

  line-height: 1.65;
}

.actions {
  display: flex;

  flex-wrap: wrap;

  gap: 12px;

  margin-top: 28px;
}

/* =========================
   BUTTONS
========================= */

.btn {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  padding: 12px 18px;

  border: 1px solid var(--line);

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.04);

  color: var(--text);

  font-size: 13px;

  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.2s,
    border-color 0.2s,
    background 0.2s,
    opacity 0.2s;
}

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

  border-color: rgba(107, 121, 236, 0.45);
}

.btn.primary {
  border: 0;

  background: linear-gradient(135deg, var(--accent), var(--accent2));

  color: #fff;
}

.btn.danger {
  color: #ffc1c8;

  border-color: rgba(239, 106, 122, 0.28);

  background: rgba(239, 106, 122, 0.08);
}

/* =========================
   PILLS
========================= */

.hero-pills {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-top: 22px;
}

.chip {
  display: inline-flex;

  align-items: center;

  gap: 6px;

  border: 1px solid var(--line);

  background: rgba(255, 255, 255, 0.04);

  padding: 5px 9px;

  border-radius: 999px;

  font-size: 11px;

  font-weight: 800;

  color: var(--muted);
}

/* =========================
   CARDS
========================= */

.profile-card,
.panel,
.stat-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.025)
  );

  border: 1px solid var(--line);

  border-radius: var(--radius);

  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.profile-card {
  padding: 28px;
}

.link-card {
  text-align: left;
}

.link-head {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 20px;
}

.link-head h2 {
  margin: 8px 0 4px;

  font-size: 26px;
}

.link-head p {
  margin: 0;

  font-size: 13px;
}

.live-dot {
  width: 9px;
  height: 9px;

  margin-top: 8px;

  border-radius: 999px;

  background: var(--success);

  box-shadow:
    0 0 0 5px rgba(82, 214, 138, 0.08),
    0 0 18px rgba(82, 214, 138, 0.45);
}

.muted {
  color: var(--muted);
}

/* =========================
   ALERTES
========================= */

.notice {
  margin: 20px 0 0;

  padding: 12px 14px;

  border-radius: 10px;

  background: rgba(107, 121, 236, 0.1);

  color: #b9c0ff;

  font-size: 13px;
}

.notice.success {
  background: rgba(82, 214, 138, 0.09);

  color: #a6f2c4;
}

.notice.error {
  background: rgba(239, 106, 122, 0.09);

  color: #ffc1c8;
}

/* =========================
   STEPS
========================= */

.steps {
  display: flex;

  align-items: center;

  margin: 24px 0 16px;
}

.step {
  display: flex;

  align-items: center;

  gap: 9px;

  opacity: 0.38;

  transition: opacity 0.2s;
}

.step.active,
.step.done {
  opacity: 1;
}

.step > span {
  width: 30px;
  height: 30px;

  display: grid;

  place-items: center;

  border: 1px solid var(--line);

  border-radius: 9px;

  background: var(--panel2);

  color: var(--muted);

  font-size: 11px;

  font-weight: 900;
}

.step.active > span {
  border-color: rgba(107, 121, 236, 0.45);

  background: rgba(107, 121, 236, 0.12);

  color: #c2c8ff;
}

.step.done > span {
  border-color: rgba(82, 214, 138, 0.32);

  background: rgba(82, 214, 138, 0.08);

  color: #99efbb;
}

.step strong,
.step small {
  display: block;
}

.step strong {
  font-size: 12px;
}

.step small {
  margin-top: 2px;

  color: var(--muted);

  font-size: 10px;
}

.step-line {
  flex: 1;

  padding: 0 14px;
}

.step-line > span {
  display: block;

  height: 1px;

  background: linear-gradient(90deg, var(--accent), rgba(107, 121, 236, 0.08));
}

/* =========================
   ACCOUNTS
========================= */

.account-card {
  display: grid;

  grid-template-columns: 52px 1fr auto;

  gap: 14px;

  align-items: center;

  padding: 14px;

  border: 1px solid var(--line);

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.028);

  transition:
    opacity 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.account-card:not(.disabled):hover {
  transform: translateY(-1px);

  border-color: rgba(107, 121, 236, 0.35);
}

.account-card.disabled {
  opacity: 0.43;
}

.account-icon {
  width: 52px;

  height: 52px;

  display: grid;

  place-items: center;

  overflow: hidden;

  border: 1px solid var(--line);

  border-radius: 13px;

  background: var(--panel2);

  font-size: 20px;

  font-weight: 900;
}

.account-icon img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.discord-icon {
  color: #9ea7ff;
}

.ng-icon {
  color: #92c8ff;

  font-size: 13px;
}

.account-title {
  display: flex;

  align-items: center;

  gap: 8px;
}

.account-title strong {
  font-size: 14px;
}

.account-main p {
  margin: 5px 0 0;

  color: var(--muted);

  font-size: 12px;
}

.status-badge {
  padding: 3px 7px;

  border: 1px solid var(--line);

  border-radius: 999px;

  color: var(--muted);

  background: rgba(255, 255, 255, 0.035);

  font-size: 9px;

  font-weight: 800;
}

.status-badge.ok {
  border-color: rgba(82, 214, 138, 0.28);

  background: rgba(82, 214, 138, 0.08);

  color: #9ceabc;
}

.provider-btn {
  min-width: 112px;

  padding: 10px 13px;

  border-radius: 10px;
}

.discord-btn {
  border-color: rgba(88, 101, 242, 0.34);

  background: rgba(88, 101, 242, 0.13);

  color: #d9ddff;
}

.ng-btn {
  border-color: rgba(85, 166, 232, 0.3);

  background: rgba(85, 166, 232, 0.1);

  color: #cceaff;
}

.provider-btn[aria-disabled="true"] {
  pointer-events: none;

  opacity: 0.55;
}

.connector {
  display: flex;

  align-items: center;

  gap: 10px;

  margin: 9px 8px;
}

.connector span {
  flex: 1;

  height: 1px;

  background: var(--line);
}

.connector small {
  color: var(--muted);

  font-size: 8px;

  font-weight: 900;

  letter-spacing: 0.14em;
}

/* =========================
   LINKED
========================= */

.linked-card {
  display: grid;

  grid-template-columns: 42px 1fr auto;

  align-items: center;

  gap: 12px;

  margin-top: 14px;

  padding: 13px;

  border: 1px solid rgba(82, 214, 138, 0.2);

  border-radius: 13px;

  background: rgba(82, 214, 138, 0.06);
}

.linked-icon {
  width: 42px;

  height: 42px;

  display: grid;

  place-items: center;

  border-radius: 11px;

  background: rgba(82, 214, 138, 0.12);

  color: #9ceabc;

  font-size: 18px;
}

.linked-card small,
.linked-card strong {
  display: block;
}

.linked-card small {
  margin-bottom: 3px;

  color: #79c999;

  font-size: 9px;

  font-weight: 900;

  letter-spacing: 0.1em;
}

.linked-card strong {
  font-size: 12px;
}

/* =========================
   BOTTOM
========================= */

.section {
  padding: 36px 0 70px;
}

.section-head {
  display: flex;

  align-items: end;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 24px;
}

.section h2 {
  margin: 0;

  font-size: 30px;
}

.grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 16px;
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;

  margin-top: 8px;

  font-size: 32px;
}

.stat-card small {
  color: var(--muted);
}

.stat-card p {
  margin: 12px 0 0;

  color: var(--muted);

  font-size: 13px;

  line-height: 1.55;
}

/* =========================
   ANIMATION
========================= */

.reveal {
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;

    transform: translateY(10px);
  }

  to {
    opacity: 1;

    transform: none;
  }
}

/* =========================
   FOOTER
========================= */

footer {
  border-top: 1px solid var(--line);

  padding: 28px 0;

  color: var(--muted);

  font-size: 12px;
}

.footer-content {
  display: flex;

  justify-content: space-between;

  gap: 20px;
}

/* =========================
   LIGHT MODE
========================= */

html[data-theme="light"] body {
  background:
    radial-gradient(
      circle at 55% -10%,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent 35%
    ),
    var(--bg);
}

html[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .profile-card,
html[data-theme="light"] .panel,
html[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.86);

  box-shadow: 0 18px 50px rgba(45, 55, 85, 0.1);
}

html[data-theme="light"] .nav > a:not(.brand):hover,
html[data-theme="light"] .nav > a.active:not(.brand),
html[data-theme="light"] .chip,
html[data-theme="light"] .btn,
html[data-theme="light"] .theme-toggle {
  background: rgba(20, 28, 50, 0.05);
}

html[data-theme="light"] .btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

/* =========================
   MOBILE
========================= */

@media (max-width: 800px) {
  .nav {
    overflow-x: auto;
  }

  .brand {
    position: sticky;

    left: 0;

    background: var(--bg);

    padding-right: 8px;
  }

  .hero {
    grid-template-columns: 1fr;

    padding-top: 54px;
  }

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

  .account-card {
    grid-template-columns: 52px 1fr;
  }

  .provider-btn {
    grid-column: 1 / -1;

    width: 100%;
  }

  .linked-card {
    grid-template-columns: 42px 1fr;
  }

  .linked-card .danger {
    grid-column: 1 / -1;

    width: 100%;
  }

  .section-head {
    align-items: start;

    flex-direction: column;
  }
}

/* =========================
   RUBYSTAFF - LINK STATE
========================= */

.ng-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.linked-provider-btn {
  min-width: 112px;
  padding: 10px 13px;
  border-radius: 10px;
  border-color: rgba(82, 214, 138, 0.28);
  background: rgba(82, 214, 138, 0.09);
  color: #9ceabc;
  cursor: default;
}

.linked-provider-btn:disabled {
  opacity: 1;
}

.disabled-button,
.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}
