:root {
  --gameap-primary: #2563eb !important;
  --gameap-primary-hover: #1d4ed8 !important;
  --gameap-primary-active: #1e40af !important;
  --gameap-surface: #f6f8fb !important;
  --gameap-surface-elevated: #ffffff !important;
  --gameap-surface-hover: #eef4ff !important;
  --gameap-border: #dbe6f6 !important;
  --gameap-text: #111827 !important;
  --gameap-text-muted: #64748b !important;
  --gameap-radius: 16px !important;
}

html.dark {
  --gameap-primary: #60a5fa !important;
  --gameap-primary-hover: #93c5fd !important;
  --gameap-primary-active: #bfdbfe !important;
  --gameap-surface: #0b1220 !important;
  --gameap-surface-elevated: #111827 !important;
  --gameap-surface-hover: #172033 !important;
  --gameap-border: #243149 !important;
  --gameap-text: #f8fafc !important;
  --gameap-text-muted: #a8b3c7 !important;
}

* { box-sizing: border-box !important; }

html, body {
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden !important;
}

body {
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%) !important;
  color: var(--gameap-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

html.dark body {
  background: linear-gradient(180deg, #070b12 0%, #0f172a 100%) !important;
}

/* Remove the messy floating overlay badges on mobile and desktop. */
#app::before,
#app::after,
.peaknodes-shell-badge {
  display: none !important;
  content: none !important;
}

/* Keep the original GameAP layout, just make it cleaner. */
.n-card,
.n-modal,
.n-dialog,
.n-data-table,
.n-dropdown-menu {
  border-radius: 18px !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  box-shadow: 0 18px 55px rgba(15,23,42,.10) !important;
  overflow: hidden !important;
}

.n-card-header,
.n-card > .n-card-header,
.n-card > .n-card__header,
.n-card-header__main {
  background: #111827 !important;
  color: #ffffff !important;
  border: 0 !important;
}

.n-card-header__main,
.n-card-header .n-text,
.n-card-header h1,
.n-card-header h2,
.n-card-header h3 {
  color: #ffffff !important;
  font-weight: 850 !important;
  letter-spacing: -.025em !important;
}

.n-card > .n-card__footer,
.n-card-action,
.n-card__action {
  background: #111827 !important;
  border-top: 0 !important;
}

.n-button,
button,
input,
textarea,
select,
.n-input,
.n-input-wrapper,
.n-base-selection,
.n-checkbox-box {
  border-radius: 14px !important;
}

.n-button--primary-type {
  background: #2563eb !important;
  border-color: #2563eb !important;
  box-shadow: 0 10px 24px rgba(37,99,235,.22) !important;
  font-weight: 800 !important;
}

.n-button--primary-type:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

input,
textarea,
.n-input-wrapper,
.n-input__input-el {
  font-weight: 500 !important;
}

/* Login page mobile cleanup. */
@media (max-width: 720px) {
  body {
    background: #f3f7ff !important;
  }

  #app {
    min-height: 100vh !important;
  }

  .n-card,
  .n-modal,
  .n-dialog {
    border-radius: 16px !important;
    box-shadow: 0 12px 32px rgba(15,23,42,.10) !important;
  }

  .n-card-header,
  .n-card > .n-card-header,
  .n-card > .n-card__header {
    padding: 28px 28px !important;
  }

  .n-card-header__main,
  .n-card-header h1,
  .n-card-header h2,
  .n-card-header h3 {
    font-size: 28px !important;
    line-height: 1.1 !important;
  }

  .n-card__content,
  .n-card > .n-card__content {
    padding: 28px !important;
  }

  .n-card__footer,
  .n-card-action,
  .n-card__action {
    padding: 24px 28px 28px !important;
  }

  .n-form-item-label,
  label {
    font-size: 17px !important;
    line-height: 1.25 !important;
  }

  .n-input,
  .n-input-wrapper {
    min-height: 52px !important;
  }

  .n-button {
    min-height: 48px !important;
    padding: 0 22px !important;
    font-size: 17px !important;
  }
}


/* Replace upstream GameAP logo with PeakNodes branding. */
.navbar-brand {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 190px !important;
  height: 42px !important;
}

.navbar-brand img.logo,
.navbar-brand .logo {
  opacity: 0 !important;
  width: 0 !important;
  max-width: 0 !important;
  overflow: hidden !important;
}

.navbar-brand::before {
  content: "PN";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -.04em;
  box-shadow: 0 8px 18px rgba(37,99,235,.22);
}

.navbar-brand::after {
  content: "PeakNodes";
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}

@media (max-width: 720px) {
  .navbar-brand { min-width: 168px !important; height: 40px !important; }
  .navbar-brand::before { width: 31px; height: 31px; border-radius: 9px; font-size: 12px; margin-right: 9px; }
  .navbar-brand::after { font-size: 21px; }
}
