:root {
  --bg-1: #06111f;
  --bg-2: #0b1c34;
  --bg-3: #10284a;
  --surface: rgba(9, 21, 39, 0.82);
  --surface-strong: rgba(15, 30, 54, 0.94);
  --surface-soft: rgba(21, 40, 69, 0.7);
  --text: #eef4ff;
  --muted: #99abd0;
  --accent: #3aa0ff;
  --accent-strong: #1c7df0;
  --accent-soft: rgba(58, 160, 255, 0.18);
  --danger: #ff5f7d;
  --danger-soft: rgba(255, 95, 125, 0.16);
  --success-soft: rgba(86, 203, 158, 0.14);
  --border: rgba(150, 190, 255, 0.14);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  font-family: Bahnschrift, "Segoe UI Variable Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(58, 160, 255, 0.2), transparent 22%),
    radial-gradient(circle at 85% 12%, rgba(21, 103, 235, 0.24), transparent 18%),
    radial-gradient(circle at bottom right, rgba(86, 203, 158, 0.08), transparent 18%),
    linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 42%, var(--bg-3) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 88%);
}

.shell {
  width: min(1260px, calc(100vw - 32px));
  margin: 16px auto;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(8, 19, 36, 0.82), rgba(7, 17, 32, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero,
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.hero {
  margin-bottom: 8px;
  padding: 8px 2px 18px;
  border-bottom: 1px solid rgba(150, 190, 255, 0.1);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.stack {
  display: grid;
  gap: 14px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(18, 34, 59, 0.94), rgba(10, 22, 42, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(58, 160, 255, 0.08), transparent 36%, transparent 62%, rgba(255, 255, 255, 0.02));
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid rgba(140, 180, 244, 0.16);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: rgba(7, 15, 29, 0.88);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #7791be;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(58, 160, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(58, 160, 255, 0.14);
  background: rgba(10, 20, 37, 0.98);
}

button {
  width: auto;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
}

button:hover {
  transform: translateY(-1px);
}

button.primary {
  color: #f5fbff;
  border-color: rgba(101, 190, 255, 0.3);
  background: linear-gradient(135deg, #1e78e9, #39a4ff 58%, #7bd0ff);
  box-shadow: 0 16px 32px rgba(28, 125, 240, 0.26);
}

button.secondary {
  background: rgba(17, 34, 59, 0.86);
}

button.secondary:hover {
  border-color: rgba(95, 164, 255, 0.32);
  background: rgba(20, 40, 68, 0.96);
}

button.danger {
  color: #fff4f7;
  border-color: rgba(255, 95, 125, 0.28);
  background: linear-gradient(135deg, #b83054, #ff5f7d);
  box-shadow: 0 16px 28px rgba(184, 48, 84, 0.22);
}

.badge,
.notice {
  padding: 10px 13px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

.badge {
  backdrop-filter: blur(10px);
}

.notice {
  background: linear-gradient(180deg, rgba(18, 34, 59, 0.9), rgba(12, 25, 46, 0.9));
}

.notice.error {
  background: linear-gradient(180deg, rgba(91, 21, 42, 0.92), rgba(66, 14, 31, 0.9));
  border-color: rgba(255, 95, 125, 0.24);
}

.small {
  color: var(--muted);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.plans,
.user-table {
  display: grid;
  gap: 12px;
}

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

.plan,
.user-row,
.message {
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(140, 180, 244, 0.14);
  background: linear-gradient(180deg, rgba(10, 22, 41, 0.94), rgba(14, 28, 50, 0.96));
}

.plan {
  display: grid;
  gap: 10px;
}

.user-row {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.messages {
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(7, 17, 32, 0.76), rgba(12, 25, 47, 0.84));
}

.messages::-webkit-scrollbar {
  width: 10px;
}

.messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(79, 139, 222, 0.45);
}

.message + .message {
  margin-top: 8px;
}

.meta,
.mono {
  font-size: 12px;
  color: var(--muted);
}

.mono {
  font-family: Consolas, "Cascadia Code", monospace;
  word-break: break-all;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 10px, 100%);
    margin: 5px auto;
    padding: 14px;
    border-radius: 20px;
  }

  .card {
    padding: 16px;
    border-radius: 20px;
  }

  h1 {
    font-size: 1.85rem;
  }
}
