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

:root {
  --bg: #17080a;
  --bg-raised: #210c0e;
  --bg-nav: #2a1012;
  --bg-glass: rgba(28, 8, 10, 0.85);
  --bg-glass-hover: #2d1315;

  --accent: #c8253a;
  --accent-dim: #8a1525;
  --accent-alt: #9e1530;
  --accent-alt-dim: #7a1020;

  --text: #f0e6e8;
  --text-muted: #d8c0c4;
  --text-faint: #7a5558;

  --border: #9e2535;
  --border-dim: #c82536;
  --border-bright: #f0e6e8;
  --border-faint: rgba(158, 37, 53, 0.25);

  --shadow: rgba(180, 25, 45, 0.4);
  --shadow-dim: rgba(200, 37, 54, 0.4);
  --shadow-faint: rgba(240, 220, 225, 0.2);
  --shadow-bright: rgba(220, 80, 100, 0.5);

  --spinner: #c82536;
  --modal-bg: rgba(33, 10, 14, 0.9);
  --bar-bg: #2a1012;

  --quicklink-bg: #1e0a0c;
  --quicklink-hover: #2d1315;
}

body {
  height: 100vh;
  overflow: hidden;
  font-family: 'Parkinsans', sans-serif;
  color: var(--text);
  background-color: var(--bg);
}

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(42, 16, 18, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(158, 37, 53, 0.25);
}

.nav-left { display: flex; align-items: center; gap: 0.75rem; }

.nav-logo-img {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.75rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s;
}

.nav-link i { font-size: 0.85rem; }

.nav-link:hover {
  color: var(--text);
  background: var(--quicklink-bg);
}

.nav-right { display: flex; align-items: center; gap: 0.15rem; }

.nav-icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--accent-dim);
  font-size: 1.1rem;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
}

.nav-icon-btn:hover {
  color: var(--text);
  background: var(--quicklink-bg);
}

.nav-sep {
  width: 1px;
  height: 18px;
  background: rgba(158, 37, 53, 0.3);
  margin: 0 0.5rem;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Parkinsans', sans-serif;
}

.nav-dropdown-arrow {
  font-size: 0.65rem !important;
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  background: rgba(42, 16, 18, 0.98);
  border: 1px solid rgba(158, 37, 53, 0.3);
  border-radius: 9px;
  padding: 0.35rem;
  z-index: 200;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-dropdown-item i { font-size: 0.85rem; width: 14px; text-align: center; }

.nav-dropdown-item:hover {
  color: var(--text);
  background: var(--quicklink-bg);
}

#frame {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  border: none;
  width: 100%;
  height: 100%;
}

#pull-tab {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 300;
  background: var(--bar-bg);
  border: 1px solid rgba(158, 37, 53, 0.3);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 3px 18px 6px;
  cursor: pointer;
  color: var(--accent-dim);
  font-size: 11px;
  letter-spacing: 0.05em;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: color 0.18s, top 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

#pull-tab:hover { color: var(--text); }
#pull-tab.open  { color: var(--accent); }

#nav-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 299;
  background: rgba(42, 16, 18, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(158, 37, 53, 0.3);
  padding: 0.6rem 1.5rem;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  white-space: nowrap;
  transform: translateY(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav-bar.open { transform: translateY(0); }

#home-btn {
  background: rgba(158, 37, 53, 0.12);
  border: 1px solid rgba(158, 37, 53, 0.3);
  border-radius: 7px;
  color: var(--accent-dim);
  cursor: pointer;
  padding: 0.42rem 0.65rem;
  display: flex;
  align-items: center;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}

#home-btn:hover { background: rgba(158, 37, 53, 0.22); color: var(--text); }
