/* header.css — extracted from standard_header.php <style> block.
   Header, navigation, mobile drawer, notification dropdown, points badge, toast.
   Auto-extracted; keep in sync with standard_header.php. */

#siteHeader {
    background: #0d0d1a;
    border-bottom: 1px solid rgba(139,92,246,0.2);
    position: sticky; top: 0; z-index: 500; width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1400px; margin: 0 auto; padding: 0 24px; height: 64px;
}
.header-logo { flex-shrink: 0; }
.logo-link { display:flex; align-items:center; gap:10px; text-decoration:none; }
.logo-text { color:white; font-size:1.3rem; font-weight:800; letter-spacing:0.5px; }
.site-logo-img { max-height:44px; max-width:160px; object-fit:contain; }

.desktop-nav { display:flex; align-items:center; gap:2px; flex:1; justify-content:center; min-width:0; }
.desktop-nav .nav-link { color:#9ca3af; text-decoration:none; padding:8px 14px; border-radius:8px; font-size:0.88rem; font-weight:500; transition:all 0.2s; white-space:nowrap; }
.desktop-nav .nav-link:hover { color:white; background:rgba(139,92,246,0.15); }
.desktop-nav .nav-link.active { color:white; background:#8b5cf6; }

.header-right { display:flex; align-items:center; gap:10px; flex-shrink:0; margin-left:auto; }
.header-search .search-wrap { display:flex; align-items:center; background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.1); border-radius:8px; padding:6px 12px; gap:8px; }
.header-search .search-wrap i { color:#9ca3af; font-size:0.85rem; }
.header-search input { background:none; border:none; outline:none; color:white; font-size:0.85rem; width:160px; }
.header-search input::placeholder { color:#9ca3af; }

.notif-wrap { position:relative; }
.notif-btn { position:relative; background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.1); border-radius:50%; width:38px; height:38px; display:flex; align-items:center; justify-content:center; color:#9ca3af; cursor:pointer; transition:all 0.2s; font-size:0.95rem; }
.notif-btn:hover { background:#8b5cf6; color:white; border-color:transparent; }

/* Compact icon-only staff buttons (Mod / Admin) — saves header width vs text labels.
   Color + tinted background are set inline per-button; this provides the shape. */
.nav-staff-icon { width:38px; height:38px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:0.95rem; text-decoration:none; border:1px solid rgba(255,255,255,0.1); transition:all 0.2s; flex:0 0 auto; }
.nav-staff-icon:hover { transform:translateY(-1px); border-color:currentColor; filter:brightness(1.25); }
.notif-badge { position:absolute; top:-4px; right:-4px; background:#ef4444; color:white; font-size:0.65rem; font-weight:700; padding:2px 5px; border-radius:10px; min-width:16px; text-align:center; line-height:1.2; }

.notification-dropdown { position:absolute; top:calc(100% + 10px); right:0; width:360px; max-height:480px; background:#1a1a2e; border:1px solid rgba(139,92,246,0.3); border-radius:12px; box-shadow:0 16px 48px rgba(0,0,0,0.6); z-index:1000; display:none; flex-direction:column; overflow:hidden; }
.notification-dropdown.active { display:flex; }
.notification-header { display:flex; justify-content:space-between; align-items:center; padding:14px 18px; border-bottom:1px solid rgba(255,255,255,0.08); }
.notification-header h3 { margin:0; color:white; font-size:0.95rem; }
.mark-read-btn { background:none; border:none; color:#8b5cf6; cursor:pointer; font-size:0.78rem; font-weight:600; }
.notification-list { overflow-y:auto; flex:1; }
.notification-footer { padding:12px 18px; border-top:1px solid rgba(255,255,255,0.08); text-align:center; }
.notification-footer a { color:#8b5cf6; text-decoration:none; font-size:0.85rem; font-weight:600; }

/* Points balance badge */
.nav-points-badge {
    display:flex; align-items:center; gap:6px;
    background:linear-gradient(135deg, rgba(251,191,36,0.14), rgba(245,158,11,0.08));
    border:1px solid rgba(251,191,36,0.3);
    border-radius:20px; padding:6px 12px;
    color:#fbbf24; text-decoration:none;
    font-size:0.85rem; font-weight:700;
    transition:all 0.2s;
    white-space:nowrap;
}
.nav-points-badge:hover { border-color:#fbbf24; background:rgba(251,191,36,0.2); transform:translateY(-1px); }
.nav-points-badge i { font-size:0.8rem; }
.nav-points-label { color:#9ca3af; font-weight:600; font-size:0.72rem; }
.nav-points-badge.pts-bump { animation:navPointsBump 0.5s ease; }
@keyframes navPointsBump {
    0%   { transform:scale(1); }
    30%  { transform:scale(1.18); box-shadow:0 0 0 6px rgba(251,191,36,0.15); }
    100% { transform:scale(1); }
}

/* Global "+X pts" floating animation */
.pts-float-popup {
    position:fixed;
    z-index:100000;
    color:#fbbf24;
    font-weight:800;
    font-size:1rem;
    pointer-events:none;
    text-shadow:0 2px 8px rgba(0,0,0,0.5);
    animation:ptsFloatUp 1.4s ease-out forwards;
}
@keyframes ptsFloatUp {
    0%   { opacity:0; transform:translateY(0) scale(0.8); }
    15%  { opacity:1; transform:translateY(-6px) scale(1.05); }
    80%  { opacity:1; transform:translateY(-48px) scale(1); }
    100% { opacity:0; transform:translateY(-64px) scale(0.95); }
}

/* Global toast container (points / generic notifications) */
.rsfw-toast-container {
    position:fixed; bottom:24px; right:24px;
    display:flex; flex-direction:column; gap:10px;
    z-index:99999; pointer-events:none;
}
.rsfw-toast {
    display:flex; align-items:center; gap:10px;
    padding:13px 18px; border-radius:12px;
    background:#1a1a2e; border:1px solid rgba(139,92,246,0.35);
    color:#fff; font-size:0.88rem; font-weight:600;
    max-width:320px; box-shadow:0 12px 36px rgba(0,0,0,0.6);
    transform:translateX(130%); opacity:0;
    transition:transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
    pointer-events:all;
}
.rsfw-toast.show { transform:translateX(0); opacity:1; }
.rsfw-toast-points { border-color:rgba(251,191,36,0.5); }
.rsfw-toast-points i { color:#fbbf24; }
.rsfw-toast-success { border-color:rgba(74,222,128,0.4); }
.rsfw-toast-success i { color:#4ade80; }

.header-avatar { width:36px; height:36px; border-radius:50%; object-fit:cover; border:2px solid rgba(139,92,246,0.5); cursor:pointer; transition:border-color 0.2s, transform 0.2s; }
.header-avatar:hover { border-color:#8b5cf6; transform:scale(1.05); }
/* When render_avatar() wraps the header avatar, style the wrapper as clickable */
.header-avatar-wrap { cursor:pointer; display:inline-flex; align-items:center; }
.header-avatar-wrap .rsfw-avatar { cursor:pointer; transition:transform 0.2s; }
.header-avatar-wrap .rsfw-avatar:hover { transform:scale(1.05); }
.header-avatar-wrap .rsfw-avatar:hover .rsfw-avatar-img { filter:brightness(1.08); }
.header-auth { display:flex; gap:8px; }
.btn-sm { padding:7px 14px !important; font-size:0.82rem !important; }

.hamburger { background:none; border:none; cursor:pointer; padding:8px; display:flex; flex-direction:column; gap:5px; width:44px; height:44px; align-items:center; justify-content:center; border-radius:8px; }
.hamburger span { display:block; height:2px; width:22px; background:white; border-radius:2px; transition:all 0.3s; }
.hamburger.open span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity:0; }
.hamburger.open span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }
.hamburger:focus-visible { outline:2px solid #e10600; outline-offset:2px; }

/* Skip link — visually hidden until focused */
.skip-link { position:absolute; top:-100px; left:0; background:#e10600; color:white; padding:12px 20px; z-index:9999; border-radius:0 0 8px 0; font-weight:600; text-decoration:none; transition:top 0.2s; }
.skip-link:focus { top:0; }

.mobile-nav-drawer {
  display: none;
  background: #12121e;
  border-inline-end: 1px solid rgba(139,92,246,.28);
  padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 88vw);
  height: 100dvh;
  z-index: 520;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.mobile-nav-drawer.open { display: block; }
.mnav-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding: 4px 8px;
}
.mnav-toolbar-title { color: #c4b5fd; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .75rem; }
.mnav-close {
  width: 44px; height: 44px; border: 0; border-radius: 8px;
  background: rgba(139,92,246,.15); color: #fff; font-size: 1.6rem; cursor: pointer;
}
.mobile-nav-links { display:flex; flex-direction:column; gap:2px; margin-bottom:14px; }

/* Nav groups */
.mnav-group { margin-bottom:14px; }
.mnav-group-label { font-size:0.7rem; text-transform:uppercase; letter-spacing:0.08em; color:#6b7280; font-weight:700; padding:6px 16px; margin-bottom:4px; display:flex; align-items:center; gap:6px; }
.mnav-group-label i { font-size:0.8rem; color:#8b5cf6; }
.mobile-nav-links a { color:#9ca3af; text-decoration:none; padding:12px 16px; border-radius:8px; font-size:0.92rem; font-weight:500; transition:all 0.2s; min-height:44px; display:flex; align-items:center; gap:8px; }
.mobile-nav-links a:hover, .mobile-nav-links a.active { background:rgba(139,92,246,0.15); color:white; }
.mobile-nav-links a.active { background:#8b5cf6; color:white; }
.mobile-nav-links a:focus-visible { outline:2px solid #e10600; outline-offset:2px; }
.mobile-nav-links a.mnav-sublink { padding-left:28px; font-size:0.88rem; color:#8b9dc3; }
.mobile-nav-links a.mnav-staff-link { color:#f59e0b; font-weight:600; }
.mobile-nav-links a.mnav-staff-link:nth-of-type(2) { color:#a78bfa; }

/* CTA group */
.mnav-group-cta { border-top:1px solid rgba(255,255,255,0.08); padding-top:12px; }
.mnav-cta-link { background:rgba(225,6,0,0.1); border:1px solid rgba(225,6,0,0.25); justify-content:center; font-weight:600; }
.mnav-cta-link:hover { background:rgba(225,6,0,0.2); }
.mnav-discord { background:rgba(88,101,242,0.12); border-color:rgba(88,101,242,0.3); color:#a5aef8; }
.mnav-discord:hover { background:rgba(88,101,242,0.2); }

.mobile-search-form { display:flex; gap:8px; }
.mobile-search-form input { flex:1; background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.1); border-radius:8px; padding:12px 14px; color:white; font-size:0.88rem; outline:none; min-height:44px; }
.mobile-search-form input:focus-visible { outline:2px solid #e10600; outline-offset:1px; }
.mobile-search-form button { background:#8b5cf6; border:none; border-radius:8px; color:white; padding:12px 16px; cursor:pointer; min-height:44px; min-width:44px; }
.mobile-search-form button:focus-visible { outline:2px solid #e10600; outline-offset:2px; }
.mobile-nav-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:498; }
.mobile-nav-overlay.open { display:block; }

/* Hide old clan toggle elements (replaced by grouped nav) */
.mobile-clan-section { display:none; }

/* Clan Dropdown */
.nav-dropdown-wrap { position:relative; display:inline-flex; }
.nav-dropdown-btn {
    background:none; border:none; cursor:pointer;
    color:#9ca3af; padding:8px 14px; border-radius:8px;
    font-size:0.88rem; font-weight:500; transition:all 0.2s;
    display:flex; align-items:center; gap:5px; white-space:nowrap;
    font-family:inherit;
}
.nav-dropdown-btn:hover { color:white; background:rgba(139,92,246,0.15); }
.nav-dropdown-wrap.active .nav-dropdown-btn,
.nav-dropdown-wrap.open .nav-dropdown-btn { color:white; background:#8b5cf6; }
.nav-dd-arrow { font-size:0.7rem; transition:transform 0.2s; }
.nav-dropdown-wrap.open .nav-dd-arrow { transform:rotate(180deg); }

.nav-dropdown-menu {
    display:none; position:absolute; top:calc(100% + 8px); left:50%;
    transform:translateX(-50%);
    background:#1a1a2e; border:1px solid rgba(139,92,246,0.3);
    border-radius:14px; box-shadow:0 16px 48px rgba(0,0,0,0.6);
    z-index:600; min-width:580px; padding:14px;
}
.nav-dropdown-wrap.open .nav-dropdown-menu { display:block; }
.nav-dropdown-grid {
    display:grid; grid-template-columns:repeat(3, 1fr); gap:4px;
}
.nav-dd-item {
    display:flex; flex-direction:column; padding:9px 12px;
    border-radius:9px; text-decoration:none; transition:all 0.18s;
    border:1px solid transparent;
}
.nav-dd-item:hover { background:rgba(139,92,246,0.12); border-color:rgba(139,92,246,0.25); }
.nav-dd-item.active { background:rgba(139,92,246,0.18); border-color:rgba(139,92,246,0.35); }
.nav-dd-icon { color:#d1d5db; font-size:0.83rem; font-weight:600; }
.nav-dd-icon i { color:#8b5cf6; margin-right:5px; width:14px; text-align:center; }
.nav-dd-desc { color:#6b7280; font-size:0.72rem; margin-top:2px; padding-left:19px; }

/* Mobile clan section */
.mobile-clan-section { border-top:1px solid rgba(139,92,246,0.1); margin-top:4px; padding-top:4px; }
.mobile-clan-header {
    display:flex; justify-content:space-between; align-items:center;
    color:#9ca3af; padding:11px 16px; border-radius:8px; cursor:pointer;
    font-size:0.92rem; font-weight:600; transition:all 0.2s;
}
.mobile-clan-header:hover { background:rgba(139,92,246,0.1); color:white; }
.mobile-clan-links a { color:#8b7aaa; }
.mobile-clan-links a:hover, .mobile-clan-links a.active { background:rgba(139,92,246,0.15); color:white; }

.desktop-only { display: flex; }
.mobile-only  { display: none; }

@media (max-width: 991px) {
    .header-content { padding: 0 14px; height: 56px; }
    .logo-text { font-size: 1.1rem; }
    .site-logo-img { max-height: 36px; }
}

@media (max-width: 900px) {
    .nav-dropdown-menu { min-width:340px; }
    .nav-dropdown-grid { grid-template-columns:repeat(2,1fr); }
}


/* RSFW: ensure Clan menu is not clipped */
.nav-dropdown-wrap.open .nav-dropdown-menu { display:block !important; z-index:1400 !important; }
