:root {
  --bg: #05020a;
  --bg-2: #090316;
  --panel: rgba(18, 9, 35, 0.78);
  --panel-strong: rgba(26, 12, 54, 0.9);
  --text: #f8f4ff;
  --muted: #c8b6dd;
  --dim: #89769b;
  --purple: #912cff;
  --purple-2: #bd48ff;
  --violet: #5f17d9;
  --silver: #f4f1ff;
  --cyan: #53f6ff;
  --palm: #1ce2ba;
  --warn: #ffd36d;
  --danger: #ff4d8d;
  --line: rgba(255,255,255,.13);
  --line-strong: rgba(255,255,255,.24);
  --shadow: 0 28px 90px rgba(89, 20, 184, .42);
  --radius: 28px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(172, 51, 255, .42), transparent 36rem),
    radial-gradient(circle at 12% 15%, rgba(0, 255, 214, .13), transparent 28rem),
    radial-gradient(circle at 82% 0%, rgba(255, 77, 189, .16), transparent 27rem),
    linear-gradient(135deg, var(--bg), var(--bg-2) 60%, #020106);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .36;
  background:
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(255,255,255,.04) 26px 27px),
    radial-gradient(circle at 50% 20%, rgba(145,44,255,.26), transparent 34rem);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 86%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto auto 0 0;
  width: 46vw;
  height: 46vw;
  pointer-events: none;
  background: radial-gradient(circle, rgba(139,44,255,.28), transparent 60%);
  filter: blur(18px);
  z-index: 0;
  transform: translate(-22%, 36%);
}

.orb {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 999px;
  filter: blur(56px);
  background: radial-gradient(circle, rgba(28,226,186,.18), rgba(189,72,255,.1), transparent 66%);
  top: -210px;
  right: -180px;
  animation: orbFloat 8s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes orbFloat {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(-70px,70px,0) scale(1.08); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(28,226,186,.45); }
  70% { box-shadow: 0 0 0 10px rgba(28,226,186,0); }
  100% { box-shadow: 0 0 0 0 rgba(28,226,186,0); }
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
code { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; color: var(--silver); }

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 292px 1fr;
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19,8,38,.92), rgba(5,2,10,.76));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  overflow: hidden;
}

.sidebar::before,
.card::before,
.landing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,.1), transparent 30%);
  opacity: .5;
  pointer-events: none;
}

.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }
.brand.large { margin: 0 0 26px; }
.brand-logo { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: rgba(145,44,255,.14); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 0 28px rgba(145,44,255,.44); overflow: hidden; }
.brand-logo img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(145,44,255,.9)); }
.brand-wide { width: min(520px, 80vw); display: block; margin-bottom: 22px; filter: drop-shadow(0 24px 54px rgba(145,44,255,.45)); }
.brand strong { display: block; font-size: 20px; line-height: 1; letter-spacing: -.05em; }
.brand span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-top: 4px; }

.nav { position: relative; z-index: 1; display: grid; gap: 9px; }
.nav a {
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  padding: 12px 13px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 900;
  transition: transform .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease), color .22s var(--ease);
}
.nav a span { width: 30px; height: 30px; border-radius: 11px; display: grid; place-items: center; color: var(--silver); background: linear-gradient(135deg, rgba(145,44,255,.28), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.1); }
.nav a:hover, .nav a.active { color: white; transform: translateX(3px); border-color: rgba(189,72,255,.5); background: rgba(145,44,255,.18); }

.server-card { position: relative; z-index: 1; margin-top: 26px; padding: 18px; border-radius: 24px; border: 1px solid var(--line); background: radial-gradient(circle at 88% 0%, rgba(28,226,186,.18), transparent 42%), rgba(255,255,255,.045); }
.server-card small { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 950; }
.server-card strong { display: block; margin: 8px 0 12px; font-size: 18px; }

.main { min-width: 0; }
.landing { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.landing-card { position: relative; max-width: 1050px; width: 100%; border: 1px solid var(--line); background: radial-gradient(circle at 80% 12%, rgba(28,226,186,.18), transparent 30%), linear-gradient(180deg, var(--panel), rgba(8,3,18,.76)); border-radius: 38px; padding: clamp(28px, 5vw, 52px); box-shadow: var(--shadow); backdrop-filter: blur(20px); overflow: hidden; }
.landing-card > * { position: relative; z-index: 1; }
.landing h1, .topbar h1 { margin: 0; font-size: clamp(34px,5vw,72px); letter-spacing: -.08em; line-height: .92; background: linear-gradient(135deg,#fff,#d8ccff 42%,#bd48ff 70%,#53f6ff); -webkit-background-clip: text; color: transparent; }
.landing p, .topbar p { max-width: 790px; margin: 14px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }

.hero-actions, .portal-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn { border: 0; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 18px; border-radius: 999px; color: white; font-weight: 950; background: linear-gradient(135deg, #f5efff 0%, #be4dff 22%, #7c24ff 54%, #2e0b80 100%); box-shadow: 0 18px 44px rgba(145,44,255,.34), inset 0 1px 0 rgba(255,255,255,.34); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn.ghost { color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line); box-shadow: none; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.card { position: relative; border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(circle at 86% 0%, rgba(145,44,255,.18), transparent 36%), linear-gradient(180deg, var(--panel), rgba(8,3,18,.72)); box-shadow: var(--shadow); backdrop-filter: blur(18px); padding: 24px; overflow: hidden; }
.card > * { position: relative; z-index: 1; }
.card h3 { margin-top: 0; font-size: 1.28rem; }

.dashboard-grid { display: grid; grid-template-columns: minmax(520px,1.2fr) minmax(340px,.8fr); gap: 24px; }
.profile-card { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: stretch; }
.character-image-wrap { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 50% 30%, rgba(189,72,255,.38), transparent 34%), #07020f; min-height: 430px; }
.character-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-badge { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(5,2,10,.74); backdrop-filter: blur(14px); font-size: 12px; font-weight: 900; }
.image-badge span, .pill i { display: inline-block; width: 9px; height: 9px; border-radius: 99px; background: var(--palm); margin-right: 8px; animation: pulse 1.7s infinite; }
.profile-copy h2 { font-size: 38px; letter-spacing: -.06em; margin: 20px 0 6px; }
.profile-copy p { color: var(--muted); margin: 0 0 20px; }
.status-row { display: flex; gap: 9px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 2px; padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.055); color: #f1eaff; font-size: 12px; font-weight: 900; white-space: nowrap; }
.pill.green { color: #b8fff0; border-color: rgba(28,226,186,.25); background: rgba(28,226,186,.09); }
.stats-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.stat { min-height: 100px; padding: 18px; border-radius: 21px; border: 1px solid var(--line); background: rgba(255,255,255,.047); }
.stat small { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 950; }
.stat b { display: block; margin-top: 10px; font-size: 30px; letter-spacing: -.055em; }
.stack { display: grid; gap: 24px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.landing-features { max-width: 1050px; width: 100%; margin-top: 20px; }
.feature { padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.047); backdrop-filter: blur(14px); }
.feature b { display: block; }
.feature span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.list { display: grid; gap: 12px; }
.row, .vehicle-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.043); }
.vehicle-row { grid-template-columns: 64px 1fr auto; }
.row span, .vehicle-row span, .muted { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.car-icon { height: 48px; border-radius: 16px; background: linear-gradient(180deg,rgba(255,255,255,.25),transparent),linear-gradient(135deg,#2b0d5e,#912cff 58%,#53f6ff); position: relative; }
.car-icon::before { content: ""; position: absolute; left: 10px; right: 10px; top: 13px; height: 15px; border-radius: 10px 10px 4px 4px; background: rgba(3,6,17,.66); }
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--line); }
.info-table tr:last-child { border: 0; }
.info-table td { padding: 13px 0; font-size: 13px; }
.info-table td:first-child { color: var(--muted); font-weight: 900; }
.info-table td:last-child { text-align: right; }
.centered-card { max-width: 760px; margin: 10vh auto; }
.link-form, .form-card { display: grid; gap: 12px; margin-top: 20px; }
.link-form input, .form-card input, .form-card select, .form-card textarea { width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.06); border-radius: 16px; color: var(--text); padding: 14px; font: inherit; outline: none; }
.link-form input:focus, .form-card input:focus, .form-card textarea:focus { border-color: rgba(189,72,255,.65); box-shadow: 0 0 0 4px rgba(145,44,255,.16); }
.link-form label, .form-card label { font-weight: 900; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.note { margin-top: 14px; color: var(--muted); font-size: 13px; }
.flash { border-radius: 16px; padding: 13px 15px; margin-bottom: 16px; border: 1px solid var(--line); font-weight: 800; }
.flash.success { background: rgba(28,226,186,.09); color: #b8fff0; }
.flash.error { background: rgba(255,77,141,.09); color: #ffd4e3; }
.site-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 900; margin-top: 18px; }
.site-link:hover { color: white; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; top: 0; height: auto; }
  .nav { grid-template-columns: repeat(4,1fr); }
  .dashboard-grid, .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell, .landing { padding: 14px; }
  .profile-card { grid-template-columns: 1fr; }
  .feature-grid, .nav { grid-template-columns: 1fr; }
  .vehicle-row { grid-template-columns: 50px 1fr; }
  .vehicle-row .pill { grid-column: 2; width: max-content; }
  .landing-card { padding: 26px; }
  .stats-grid { grid-template-columns: 1fr; }
  .topbar { display: block; }
}
