:root {
  --bg: #07060d;
  --surface: #100e1a;
  --surface2: #18152a;
  --surface3: #221c36;

  --purple: #7c5cbf;
  --purple-light: #a882f0;
  --purple-dark: #5b3fa0;

  --gold: #d4af37;
  --gold-light: #f0d060;

  --silver: #b0b8c8;
  --silver-light: #d8deea;

  --text: #e8e0f0;
  --muted: #7a7090;
  --muted-2: #9a8fb1;

  --success: #55d6a1;
  --danger: #ff6b81;
  --warning: #f0b35a;

  --border: rgba(124, 92, 191, 0.2);
  --border-strong: rgba(124, 92, 191, 0.35);

  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.24);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.48);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-2xl: 18px;
  --radius-pill: 999px;

  --maxw: 1200px;

  --nav-height: 72px;
  --transition-fast: 0.15s ease;
  --transition-mid: 0.22s ease;
  --transition-slow: 0.35s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(124, 92, 191, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.container {
  width: min(var(--maxw), calc(100% - 2rem));
  margin: 0 auto;
}

.container-narrow {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
}

.text-muted {
  color: var(--muted);
}

.text-muted-2 {
  color: var(--muted-2);
}

.text-gold {
  color: var(--gold-light);
}

.text-purple {
  color: var(--purple-light);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fw-900 {
  font-weight: 900;
}

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(7, 6, 13, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.nav-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo span {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-width: 0;
  flex-wrap: wrap;
}

.nav-username {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.page-main {
  position: relative;
  z-index: 1;
  width: min(var(--maxw), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.page-main-narrow {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.section-block {
  margin-bottom: 1.25rem;
}

.surface-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.surface-box-soft {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.section-title span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.4rem;
}

.gradient-number {
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade-in-up {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes modalIn {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .navbar {
    padding: 0.9rem 1rem;
  }

  .page-main,
  .page-main-narrow,
  .container,
  .container-narrow {
    width: min(100%, calc(100% - 1rem));
  }
}

@media (max-width: 500px) {
  .nav-logo span {
    font-size: 0.78rem;
  }

  .nav-right {
    gap: 0.5rem;
  }

  .page-main,
  .page-main-narrow {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }
}
