:root {
  --bg-main: #07090d;
  --text-main: #f2f5f8;
  --text-muted: #a9b3c1;
  --accent-orange: #d4681f;
  --accent-red: #b02121;
  --accent-blue: #3f8bd6;
  --border-glow: rgba(212, 104, 31, 0.38);
  --border-cool: rgba(63, 139, 214, 0.4);
  --shadow-heavy: 0 24px 70px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at 12% 12%, rgba(63, 139, 214, 0.13), transparent 35%),
    radial-gradient(circle at 88% 22%, rgba(176, 33, 33, 0.12), transparent 42%),
    linear-gradient(180deg, #0b0e13 0%, #07090d 100%);
  line-height: 1.5;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bg__overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 12%, black 12%, transparent 72%);
}

.bg__grain {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  width: min(1100px, 92vw);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 8, 12, 0.82);
}

.topbar__left {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: "Black Ops One", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  text-decoration: none;
}

.brand:link,
.brand:visited,
.brand:hover,
.brand:active {
  color: var(--text-main);
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.brand span {
  line-height: 1;
}

.brand__sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  letter-spacing: 0.05em;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.navlink {
  text-decoration: none;
  color: var(--text-main);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.navlink:hover,
.navlink:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  background: rgba(212, 104, 31, 0.12);
}

.navlink--warn {
  border-color: rgba(176, 33, 33, 0.45);
  background: rgba(176, 33, 33, 0.16);
}

.shell {
  width: min(1100px, 92vw);
  margin: 1rem auto 2.2rem;
}

.card {
  background: linear-gradient(160deg, rgba(13, 18, 27, 0.9), rgba(13, 16, 19, 0.68));
  border: 1px solid rgba(63, 139, 214, 0.3);
  border-radius: 16px;
  padding: 1.05rem;
  box-shadow: var(--shadow-heavy);
}

.card__title {
  margin: 0 0 0.6rem;
  font-family: "Black Ops One", sans-serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #f4d4be;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.input {
  width: 100%;
  padding: 0.72rem 0.78rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.input:focus {
  border-color: rgba(212, 104, 31, 0.52);
  background: rgba(212, 104, 31, 0.08);
}

.label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.72rem 0 0.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.btnrow {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.95rem;
}

.btn {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  padding: 0.58rem 0.9rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  background: rgba(212, 104, 31, 0.12);
}

.btn--primary {
  border-color: rgba(212, 104, 31, 0.6);
  background: linear-gradient(120deg, rgba(176, 33, 33, 0.58), rgba(212, 104, 31, 0.42));
}

.btn--danger {
  border-color: rgba(176, 33, 33, 0.5);
  background: rgba(176, 33, 33, 0.28);
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hr {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.9rem 0;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.55rem;
}

.table th {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: left;
  padding: 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 0.55rem;
}

.table tr td:first-child {
  border-radius: 10px 0 0 10px;
}

.table tr td:last-child {
  border-radius: 0 10px 10px 0;
}

.badge {
  display: inline-flex;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  color: var(--text-main);
}

.badge--good {
  border-color: rgba(35, 209, 139, 0.35);
  background: rgba(35, 209, 139, 0.12);
}

.badge--bad {
  border-color: rgba(255, 92, 92, 0.35);
  background: rgba(255, 92, 92, 0.12);
}

.footer {
  width: min(1100px, 92vw);
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.76rem;
}

pre {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  padding: 0.6rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.scrollBox {
  max-height: 420px;
  overflow: auto;
  padding-right: 0.3rem;
  scrollbar-width: none;
}

.scrollBox::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.licWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.licItem {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
}

.licName {
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

.licState {
  display: inline-flex;
  padding: 0.27rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
  color: var(--text-main);
}

.licState--on {
  border-color: rgba(35, 209, 139, 0.35);
  background: rgba(35, 209, 139, 0.12);
}

.licState--off {
  border-color: rgba(255, 92, 92, 0.35);
  background: rgba(255, 92, 92, 0.12);
}

.stat-meter {
  display: grid;
  grid-template-columns: minmax(78px, 120px) auto;
  align-items: center;
  gap: 0.45rem;
}

.meter-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.meter-fill {
  --p: 0;
  --tone: #d4681f;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: calc(var(--p) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 70%, #ffffff 30%), var(--tone));
  box-shadow: 0 0 12px color-mix(in srgb, var(--tone) 45%, transparent);
}

.meter-value {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
  min-width: 2.4rem;
}

.meter--high .meter-fill {
  --tone: #23d18b;
}

.meter--mid .meter-fill {
  --tone: #d4681f;
}

.meter--low .meter-fill {
  --tone: #ff5c5c;
}

.character-hero {
  border-color: rgba(212, 104, 31, 0.42);
  background: linear-gradient(150deg, rgba(28, 17, 14, 0.82), rgba(13, 17, 26, 0.82));
  padding: 0.9rem;
}

.character-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0.9rem;
  align-items: start;
}

.hero-main {
  min-width: 0;
}

.hero-head {
  display: grid;
  gap: 0.25rem;
}

.character-hero .card__title {
  margin: 0;
  font-family: "Barlow", sans-serif;
  font-weight: 800;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  color: #f2f5f8;
}

.hero-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  font-weight: 700;
  color: #f7c19e;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.6rem;
}

.profile-chips .badge {
  font-size: 0.64rem;
  padding: 0.24rem 0.5rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.62rem;
}

.quick-links .btn {
  padding: 0.35rem 0.62rem;
  font-size: 0.74rem;
  border-color: rgba(255, 255, 255, 0.16);
}

.profile-health {
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.62rem;
  background: rgba(8, 11, 17, 0.45);
}

.profile-health .card__title {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  margin-bottom: 0.35rem;
}

.health-bars {
  display: grid;
  gap: 0.4rem;
}

.health-row {
  display: grid;
  gap: 0.24rem;
}

.health-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.health-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #dce6f3;
}

.health-value {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
}

.health-track {
  position: relative;
  height: 12px;
  border: 2px solid rgba(188, 194, 202, 0.7);
  border-radius: 999px;
  background: rgba(224, 229, 235, 0.1);
  overflow: hidden;
}

.health-fill {
  --p: 0;
  height: 100%;
  width: calc(var(--p) * 1%);
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #74d100 0%, #63b700 48%, #4f9900 100%);
  box-shadow: inset 0 2px 0 rgba(201, 255, 133, 0.55), 0 0 16px rgba(116, 209, 0, 0.25);
  transition: width 0.28s ease;
}

.character-overview .card {
  min-height: 100%;
}

.money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.money-tile {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.68rem;
}

.money-value {
  margin-top: 0.25rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: #f7d2b7;
}

@media (max-width: 680px) {
  .topbar {
    width: 100%;
    padding: 0.65rem 4vw;
    min-height: unset;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .topbar__nav {
    width: 100%;
  }

  .shell,
  .footer {
    width: 92vw;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .stat-meter {
    grid-template-columns: minmax(64px, 96px) auto;
  }

  .money-grid {
    grid-template-columns: 1fr;
  }

  .character-hero-grid {
    grid-template-columns: 1fr;
  }

  .profile-health {
    margin-top: 0.3rem;
  }

  .health-track {
    height: 12px;
  }
}