/* ── Boxing Hosting — global shared styles ─────────────────────
   Loaded by every page to provide consistent nav, footer,
   base typography, and colour theme.
   Page-specific styles live in their own CSS files.
   ─────────────────────────────────────────────────────────── */

/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0b0c10;
  --bg2:      #111318;
  --surface:  #1a1d26;
  --border:   rgba(255,255,255,0.08);
  --gold:     #f5c518;
  --gold-dim: rgba(245,197,24,0.15);
  --blue:     #4f8ef7;
  --blue-dim: rgba(79,142,247,0.15);
  --text:     #e8eaf0;
  --muted:    #8b909e;
  --radius:   12px;
  --nav-h:    64px;
}

html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

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

img { max-width: 100%; height: auto; }

/* ── bh-nav ───────────────────────────────────── */
.bh-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: rgba(11,12,16,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.bh-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
  letter-spacing: 0.02em;
  padding-right: 1.75rem;
  margin-right: 0.5rem;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.bh-nav__brand img {
  width: 32px;
  height: 32px;
  min-width: 32px;
  max-width: 32px;
  border-radius: 6px;
  object-fit: contain;
}
.bh-nav__brand img:hover { transform: none; }

.bh-nav__links {
  display: flex;
  align-items: stretch;
  list-style: none;
  flex: 1;
  height: 100%;
  padding: 0;
  margin: 0;
}

.bh-nav__links li {
  display: flex;
  align-items: stretch;
  flex: 1;
  padding: 0;
  margin: 0;
}

.bh-nav__links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 14px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.15s, background 0.15s;
}

.bh-nav__links li a:hover {
  color: var(--muted);
  background: rgba(255,255,255,0.06);
}
@keyframes nav-glow-pulse {
  0%, 100% {
    box-shadow: inset 0 0 10px rgba(245,197,24,0.1), 0 0 6px rgba(245,197,24,0.08);
  }
  50% {
    box-shadow: inset 0 0 18px rgba(245,197,24,0.25), 0 0 14px rgba(245,197,24,0.22);
  }
}
.bh-nav__links li a.active {
  color: var(--gold);
  background: rgba(245,197,24,0.1);
  animation: nav-glow-pulse 2.4s ease-in-out infinite;
}

.bh-nav__end {
  margin-left: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
}

.bh-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  border: none;
  background: none;
}

.bh-nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Profile menu ─────────────────────────────── */
.profile-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-toggle {
  background: rgba(245,197,24,0.12);
  border: 1px solid rgba(245,197,24,0.35);
  color: var(--gold);
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}

.profile-toggle:hover { background: rgba(245,197,24,0.22); border-color: var(--gold); }
.profile-toggle:focus { outline: none; box-shadow: 0 0 0 2px rgba(245,197,24,0.3); }

.profile-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
  z-index: 9999;
  min-width: 160px;
  overflow: hidden;
  padding-top: 6px;
}

.profile-dropdown a {
  display: block;
  color: var(--text);
  padding: 10px 16px;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.profile-dropdown a:hover { background: rgba(255,255,255,0.07); }

.profile-menu:hover .profile-dropdown,
.profile-menu:focus-within .profile-dropdown,
.profile-menu.open .profile-dropdown { display: block; }

.profile-menu.is-logged-out .profile-dropdown { display: none !important; }
.profile-menu.is-logged-out .profile-toggle {
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  color: var(--text);
}

/* ── Page header centered variant (e.g. bots page) ── */
.page-header--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem 1.5rem;
}
.page-header--centered .section-label {
  margin-bottom: 1.2rem;
}
.page-header__icon {
  width: 192px;
  height: 192px;
  border-radius: 36px;
  object-fit: contain;
  margin-bottom: -1.4rem;
}
.page-header--centered .page-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
}
.page-header--centered .page-subtitle {
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* ── Page content wrapper ─────────────────────── */
.page-content {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ── Common headings ──────────────────────────── */
.page-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ── Section label pill ───────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: #0b0c10;
  box-shadow: 0 4px 20px rgba(245,197,24,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(245,197,24,0.5); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); }

/* ── Generic card ─────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

/* ── Tables ───────────────────────────────────── */
.bh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.bh-table th {
  background: var(--surface);
  color: var(--gold);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.bh-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.bh-table tr:last-child td { border-bottom: none; }

.bh-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ── Footer ───────────────────────────────────── */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 2rem 2rem;
  background: var(--bg2);
  position: static;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}
.footer-brand span { color: var(--gold); }

.footer-copy { font-size: 0.82rem; color: var(--muted); }

.footer-links { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; }

.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

/* ── Spinner (used by staff/donator pages) ────── */
.spinner-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.spinner-container { text-align: center; }
.spinner-border {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(245,197,24,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: bh-spin 0.75s linear infinite;
}
@keyframes bh-spin { to { transform: rotate(360deg); } }

/* ── Responsive nav ───────────────────────────── */
@media (max-width: 680px) {
  .bh-nav { padding: 0 1rem; }
  .bh-nav__toggle { display: flex; }

  .bh-nav__links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(11,12,16,0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
    z-index: 99;
  }

  .bh-nav__links.open { display: flex; }
  .bh-nav__links li { height: auto; }

  .bh-nav__links li a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .bh-nav__end { display: none; }
  .bh-nav__end.open { display: flex; padding: 0 1rem 1rem; }

  .page-content { padding: 2rem 1.25rem; }
}
