/* ── Sidebar Nav ────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 200px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-mid);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  overflow: visible;
}

#site-header { min-height: 0; }

.header-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 24px;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border);
}

.header-brand img {
  height: 48px;
  width: auto;
  border-radius: 4px;
}

.header-brand-name {
  font-family: var(--font-gothic);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--red);
  text-align: center;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 0 16px;
  margin-top: auto;
}

.header-live-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.header-live-status.is-live { color: var(--white); }

/* Navigation */
.site-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.site-nav a {
  padding: 8px 12px;
  font-family: var(--font-gothic);
  font-size: 13px;
  color: var(--text-sec);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--white);
  background: var(--gray-hi);
}

.site-nav a.active,
.nav-has-sub.active > a {
  color: var(--red);
  background: rgba(255, 0, 0, 0.06);
}

/* Sidebar flyout submenus */
.nav-has-sub {
  position: relative;
}

.nav-has-sub > a {
  display: block;
}

.nav-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 160px;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  padding: 6px 0;
  z-index: 1100;
}

.nav-has-sub:hover .nav-submenu {
  display: block;
}

.nav-submenu a {
  display: block;
  padding: 7px 16px;
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--text-sec);
  border-radius: 0;
  transition: color 0.2s, background 0.2s;
}

.nav-submenu a:hover {
  color: var(--white);
  background: rgba(255, 0, 0, 0.08);
}

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--red);
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Mobile: sidebar becomes top bar + slide-out ── */
@media (max-width: 767px) {
  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 56px;
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
    border-right: none;
    border-bottom: 1px solid var(--border-mid);
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .header-brand {
    flex-direction: row;
    padding: 0;
    border-bottom: none;
    gap: 10px;
  }

  .header-brand img { height: 32px; }
  .header-brand-name { font-size: 13px; }

  .hamburger { display: flex; }
  .header-live-status { display: none; }
  .header-right {
    flex-direction: row;
    margin-top: 0;
    padding: 0;
  }

  .site-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-mid);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 1001;
  }

  .nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 12px 24px;
    border-radius: 0;
  }

  .nav-submenu {
    display: block;
    position: static;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    padding: 0 0 0 16px;
    min-width: 0;
  }

  .nav-submenu a {
    padding: 10px 24px;
    font-size: 12px;
  }

  .nav-open .hamburger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-open .hamburger span:nth-child(2) {
    opacity: 0;
  }
  .nav-open .hamburger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  body { padding-top: 56px; padding-left: 0; }
}

/* Nav backdrop */
.nav-backdrop {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}
.nav-open .nav-backdrop { display: block; }

/* Body offset for sidebar (desktop only) */
@media (min-width: 768px) {
  body { padding-top: 0; padding-left: 200px; }
}

/* Footer */
.site-footer {
  position: relative;
  background: var(--gray-lo);
  border-top: 1px solid var(--border-mid);
  padding: 48px 24px 24px;
  margin-top: 80px;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.3;
}

.site-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(255, 0, 0, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

#site-footer { min-height: 200px; }

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-brand {
  font-family: var(--font-gothic);
  font-size: 16px;
  color: var(--red);
  letter-spacing: 0.08em;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-system);
  font-size: 12px;
  color: var(--text-sec);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--red); }

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-system);
  font-size: 12px;
  color: var(--text-sec);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.footer-social a:hover {
  border-color: var(--red);
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--text-dim);
}

/* Page Container */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Grid Utilities */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
