/* ── Site Nav ── */

/* Shared nav item */
.site-nav-item {
  align-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.site-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}
.site-nav-item--active {
  color: rgba(255, 255, 255, 0.95);
}
.site-nav-icon {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  height: 20px;
  justify-content: center;
  width: 20px;
}
.site-nav-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Desktop sidebar */
.site-nav--sidebar {
  background: #000000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  bottom: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
  left: 0;
  overflow: hidden;
  padding: 56px 8px 16px;
  position: fixed;
  top: 0;
  transition: width 0.22s ease;
  width: 56px;
  z-index: 200;
}
.site-nav--sidebar.expanded {
  width: 200px;
}
.site-nav--sidebar:not(.expanded) .site-nav-label {
  display: none;
}
.site-nav--sidebar:not(.expanded) .site-nav-item {
  justify-content: center;
  padding: 10px;
}
.site-nav-sidebar-toggle {
  background: none;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 8px;
  position: absolute;
  right: 8px;
  top: 12px;
  transition: color 0.15s ease;
}
.site-nav-sidebar-toggle:hover {
  color: rgba(255, 255, 255, 0.8);
}
.site-nav-user {
  color:           rgba(255, 255, 255, 0.85);
  display:         none;
  font-size:       12px;
  font-weight:     600;
  letter-spacing:  0.02em;
  overflow:        hidden;
  padding:         6px 10px 10px;
  text-decoration: none;
  text-overflow:   ellipsis;
  white-space:     nowrap;
}
.site-nav-user:hover { color: #fff; }
.site-nav--sidebar.expanded .site-nav-user { display: block; }
.site-nav-room-mode-actions {
  margin: 0;
}
.site-nav-logout-form {
  margin: 0;
}
.site-nav-room-mode-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  display: flex;
  font-family: inherit;
  gap: 12px;
  padding: 10px 12px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  width: 100%;
}
.site-nav-room-mode-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.96);
}

/* Nav logout */
.site-nav-item--logout {
  margin: 0;
  margin-top: auto;
}
.site-nav-logout-btn {
  align-items:     center;
  background:      none;
  border:          none;
  border-radius:   8px;
  color:           rgba(255, 255, 255, 0.55);
  cursor:          pointer;
  display:         flex;
  font-family:     inherit;
  gap:             12px;
  padding:         10px 14px;
  text-decoration: none;
  transition:      background 0.15s ease, color 0.15s ease;
  white-space:     nowrap;
  width:           100%;
}
.site-nav-logout-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color:      rgba(255, 255, 255, 0.9);
}
.site-nav--sidebar:not(.expanded) .site-nav-logout-btn {
  justify-content: center;
  padding:         10px;
}

/* Mobile top bar */
.site-nav--mobile {
  background: #000000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: none;
  flex-direction: column;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 200;
}
.site-nav-mobile-bar {
  align-items: center;
  display: flex;
  height: 52px;
  justify-content: space-between;
  padding: 0 16px;
}
.site-nav-mobile-bar--room-mode {
  gap: 12px;
}
.site-nav-mobile-logo {
  color: rgba(255, 255, 255, 0.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 13px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.site-nav-mobile-name {
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 13px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-nav-mobile-quit-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 6px 10px;
}
.site-nav--room-mode-game {
  display: flex;
}
.site-nav-hamburger {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 4px;
}
.site-nav-hamburger:hover {
  color: rgba(255, 255, 255, 0.95);
}
.site-nav-mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 8px 12px;
}
.site-nav-mobile-drawer.open {
  display: flex;
}

/* Responsive breakpoints */
@media (min-width: 768px) {
  .site-nav--sidebar {
    display: flex;
  }
  .site-nav--mobile {
    display: none !important;
  }
  .site-nav--room-mode-game {
    display: flex !important;
  }
  /* Shift all page content right so it centers in the area beside the sidebar */
  body {
    padding-left: 56px;
  }
  body.sidebar-expanded {
    padding-left: 200px;
  }
  body.room-mode-game-active {
    padding-left: 0;
  }
  /* Homepage needs extra right offset to visually re-center */
  body .home-wrap {
    padding-left: 32px;
  }
  body.room-mode-game-active .game-layout {
    height: calc(100dvh - 52px);
    margin-top: 52px;
  }
}
@media (max-width: 767px) {
  .site-nav--sidebar {
    display: none !important;
  }
  .site-nav--mobile {
    display: flex;
  }
  /* Subpages need top padding for the fixed mobile nav bar */
  body .info-wrap,
  body .admin-wrap,
  body .done-wrap,
  body .error-wrap,
  body .merch-wrap {
    padding-top: calc(52px + 24px);
  }
  /* Game page: sit below the fixed mobile nav bar */
  .game-layout {
    height: calc(100dvh - 52px);
    margin-top: 52px;
  }
}
body.room-mode-game-active .done-wrap {
  height: calc(100dvh - 52px);
  margin-top: 52px;
  padding-top: 24px;
}
body.room-mode-game-active .error-wrap,
body.room-mode-game-active .info-wrap,
body.room-mode-game-active .merch-wrap {
  padding-top: calc(52px + 24px);
}
.home-hr {
  width: 100%;
  max-width: 400px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0 0 20px;
}
