:root {
  --bg-0: #05080f;
  --bg-1: #07111f;
  --bg-2: #0b1b31;
  --panel: rgba(12, 22, 38, 0.72);
  --panel-strong: rgba(9, 19, 34, 0.88);
  --panel-soft: rgba(13, 27, 46, 0.56);
  --line: rgba(142, 238, 255, 0.18);
  --line-strong: rgba(142, 238, 255, 0.34);
  --text: #edf7ff;
  --muted: #a7bdd4;
  --accent: #8eeeff;
  --accent-2: #7ddfff;
  --accent-soft: rgba(142, 238, 255, 0.16);
  --accent-glow: 0 0 30px rgba(125, 223, 255, 0.24);
  --danger: #ff7ea8;
  --warn: #ffd58b;
  --success: #87ffd9;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-display: "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 16%, rgba(125, 223, 255, 0.18), transparent 23rem),
    radial-gradient(circle at 82% 14%, rgba(184, 215, 255, 0.1), transparent 19rem),
    radial-gradient(circle at 50% 110%, rgba(48, 123, 178, 0.2), transparent 30rem),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 52%, #06101d);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background-image:
    linear-gradient(rgba(142, 238, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 238, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 82%);
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 12% 72%, rgba(142, 238, 255, 0.12), transparent 18rem),
    radial-gradient(circle at 88% 78%, rgba(125, 223, 255, 0.1), transparent 18rem);
  filter: blur(24px);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #d4f7ff;
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(1180px, calc(100% - 24px));
  margin: 18px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 15, 27, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #c9f6ff);
  box-shadow: 0 0 22px rgba(142, 238, 255, 0.72);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(142, 238, 255, 0.08);
  transform: translateY(-1px);
}

.page-main {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 34px 0 48px;
  flex: 1;
}

.page-main.centered-main {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.glass-card,
.panel-card,
.surface-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(13, 27, 46, 0.82), rgba(6, 15, 28, 0.78));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.glass-card::before,
.panel-card::before,
.surface-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(142, 238, 255, 0.08), transparent 44%, rgba(184, 215, 255, 0.05));
  pointer-events: none;
}

.hero-card {
  padding: clamp(28px, 4vw, 44px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title,
.page-title,
.section-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  line-height: 0.92;
}

.page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.hero-text,
.page-copy,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.button-stack,
.control-row,
.inline-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button-stack {
  flex-direction: column;
}

.btn,
button,
.revoke-btn,
.copy-btn,
.small-btn {
  position: relative;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-warning {
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-primary,
button.primary,
button.linkvertise,
button.payhip,
#createNewKey,
#loginBtn,
#generateTokenBtn,
#refreshDataBtn,
#logoutBtn {
  color: #04121f;
  background: linear-gradient(135deg, #92f1ff, #68d8ff);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(142, 238, 255, 0.18), 0 18px 38px rgba(104, 216, 255, 0.22);
}

.btn-secondary,
button.lootlabs,
button.paypal,
#registerBtn,
.copy-btn,
.small-btn,
.revoke-btn {
  color: var(--text);
  background: rgba(142, 238, 255, 0.08);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-warning {
  color: #07111f;
  background: linear-gradient(135deg, #ffd6a1, #ffecc0);
  border-color: rgba(255, 240, 214, 0.35);
}

.btn:hover,
button:hover,
.revoke-btn:hover,
.copy-btn:hover,
.small-btn:hover {
  transform: translateY(-2px);
}

.btn-primary:hover,
button.primary:hover,
button.linkvertise:hover,
button.payhip:hover,
#createNewKey:hover,
#loginBtn:hover,
#generateTokenBtn:hover,
#refreshDataBtn:hover,
#logoutBtn:hover {
  box-shadow: 0 0 0 1px rgba(142, 238, 255, 0.22), 0 20px 44px rgba(104, 216, 255, 0.32), var(--accent-glow);
}

.page-panel {
  width: min(760px, 100%);
  padding: clamp(26px, 4vw, 40px);
}

.panel-layout {
  display: grid;
  gap: 24px;
}

.stats-grid,
.feature-grid,
.pricing-grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.mini-card,
.stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.mini-card h3,
.stat-card h3,
.stat-card strong {
  margin: 0 0 10px;
}

.stat-card strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stat-card h3,
.stat-card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-panel,
.result-panel,
.pricing-panel,
.login-panel,
.dashboard-panel {
  padding: clamp(24px, 3.4vw, 34px);
}

.script-display,
.key-display {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(4, 11, 21, 0.72);
  color: #dff8ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.key-display.loading {
  color: var(--muted);
}

.status-badges,
.meta-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(142, 238, 255, 0.08);
  color: #d7f6ff;
  font-size: 0.83rem;
}

.pill.good {
  color: #d8fff0;
  border-color: rgba(135, 255, 217, 0.34);
  background: rgba(135, 255, 217, 0.08);
}

.pill.warn {
  color: #fff0d0;
  border-color: rgba(255, 213, 139, 0.28);
  background: rgba(255, 213, 139, 0.08);
}

.pill.neutral {
  border-color: rgba(184, 215, 255, 0.26);
  background: rgba(184, 215, 255, 0.08);
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(142, 238, 255, 0.08);
}

.info-row:last-child {
  border-bottom: 0;
}

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

.pricing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.pricing-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(142, 238, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(142, 238, 255, 0.05);
}

.field-group {
  display: grid;
  gap: 12px;
}

input,
select {
  min-height: 50px;
  width: 100%;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(6, 14, 24, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input:focus,
select:focus,
button:focus {
  outline: 0;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(142, 238, 255, 0.14);
}

.site-footer {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto 20px;
  padding: 18px 22px 28px;
  color: #8ca9c4;
  font-size: 0.92rem;
  text-align: center;
}

.dashboard-page {
  margin: 0;
}

.dashboard-wrap {
  width: min(1240px, calc(100% - 24px));
  margin: 0 auto;
  padding: 30px 0 44px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 24px;
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.token-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 0 12px;
  flex-wrap: wrap;
}

.token-actions label {
  color: var(--muted);
  font-size: 0.96rem;
}

#tokenResult {
  min-height: 28px;
  margin-bottom: 12px;
  color: var(--muted);
}

#tokenResult code {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.84);
  border: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(5, 12, 22, 0.56);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(142, 238, 255, 0.1);
}

th {
  color: #d8f6ff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(142, 238, 255, 0.06);
}

tbody tr:hover {
  background: rgba(142, 238, 255, 0.05);
}

code {
  color: #dcfbff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.accounts-root {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-card,
.dropdown,
.item-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(11, 22, 37, 0.88), rgba(7, 16, 29, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.account-card {
  padding: 18px;
}

.account-card.collapsed .account-body {
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
}

.account-header,
.item-header,
.dropdown-header {
  cursor: pointer;
}

.account-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-title,
.dropdown-title,
.item-title {
  font-weight: 700;
}

.account-title {
  font-size: 1.1rem;
}

.account-meta,
.item-meta,
.uid-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.account-body {
  margin-top: 14px;
}

.dropdown {
  overflow: hidden;
  margin-bottom: 12px;
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
  padding: 0 16px;
}

.dropdown.expanded .dropdown-content {
  padding-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.item-card {
  padding: 14px;
}

.item-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.item-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms ease;
  color: #dceeff;
  font-size: 0.94rem;
}

.item-card.expanded .item-body {
  max-height: 420px;
  margin-top: 10px;
}

.chevron {
  color: var(--accent);
  transition: transform 180ms ease;
}

.dropdown.expanded .chevron {
  transform: rotate(90deg);
}

.status-message {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(142, 238, 255, 0.05);
}

.error {
  color: #ffd6e2 !important;
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .pricing-grid,
  .dashboard-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    border-radius: 24px;
    padding: 16px;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .topbar,
  .page-main,
  .site-footer,
  .dashboard-wrap {
    width: min(100% - 16px, 1180px);
  }

  .topbar {
    margin-top: 10px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-title {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .page-title {
    font-size: clamp(1.7rem, 8vw, 2.6rem);
  }

  .info-row {
    flex-direction: column;
    gap: 6px;
  }

  th,
  td {
    min-width: 140px;
  }
}
