:root {
  --bg: #08111f;
  --bg-2: #0d1728;
  --bg-3: #101c31;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);

  --text: #f4f7fb;
  --text-soft: #93a0b8;
  --text-muted: #6e7b92;

  --primary: #6a7dff;
  --primary-soft: rgba(106, 125, 255, 0.14);

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-mobile: 0 8px 24px rgba(0, 0, 0, 0.22);

  --container: 1240px;
  --header-height: 86px;
  --mobile-bottom-height: 88px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(106, 125, 255, 0.10), transparent 26%),
    radial-gradient(circle at top right, rgba(84, 188, 255, 0.07), transparent 24%),
    linear-gradient(180deg, #07111d 0%, #08111f 100%);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
}

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

.page-shell {
  min-height: 100vh;
  padding-bottom: calc(var(--mobile-bottom-height) + 28px);
}

.container {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(7, 14, 27, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-row {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* LOGO */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #5f73ff, #7b6dff);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(90, 120, 255, 0.22);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
}

.logo-text strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-text span {
  font-size: 12px;
  color: var(--text-soft);
}

/* DESKTOP NAV */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(106, 125, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

/* MAIN */
.site-main {
  min-height: calc(100vh - var(--header-height));
}

/* MOBILE BOTTOM NAV */
.mobile-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 1200;

  width: min(calc(100% - 16px), 430px);
  min-height: 74px;
  padding: 8px;

  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 4px;

  background: rgba(11, 19, 33, 0.92);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: var(--shadow-mobile);
}

.mobile-bottom-link {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px 8px;
  border-radius: 16px;
  color: var(--text-muted);
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.mobile-bottom-link:hover {
  color: var(--text-soft);
}

.mobile-bottom-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-bottom-link.active::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.mobile-bottom-icon {
  width: 21px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-bottom-icon svg {
  width: 21px;
  height: 21px;
}

.mobile-bottom-link span:last-child {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* RESPONSIVE */
@media (max-width: 920px) {
  .desktop-nav {
    gap: 4px;
  }

  .nav-link {
    padding: 11px 13px;
    font-size: 13px;
  }
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-shell {
    padding-bottom: calc(var(--mobile-bottom-height) + 28px);
  }

  .site-header {
    background: rgba(7, 14, 27, 0.88);
  }

  .header-row {
    min-height: 74px;
  }

  .mobile-bottom-nav {
    display: flex;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 20px, var(--container));
  }

  .header-row {
    min-height: 70px;
  }

  .logo-badge {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 17px;
  }

  .logo-text strong {
    font-size: 14px;
  }

  .logo-text span {
    font-size: 11px;
  }

  .mobile-bottom-nav {
    width: calc(100% - 12px);
    bottom: 8px;
    border-radius: 20px;
    padding: 7px;
    gap: 2px;
  }

  .mobile-bottom-link {
    border-radius: 14px;
    padding: 10px 2px 8px;
  }

  .mobile-bottom-link span:last-child {
    font-size: 9px;
  }

  .mobile-bottom-icon,
  .mobile-bottom-icon svg {
    width: 20px;
    height: 20px;
  }

  .mobile-bottom-link.active::before {
    width: 18px;
    top: 5px;
  }
}