/* site-header.css: shared header, navigation and mobile menu for every page.
   Source of truth: index.html + index.css. Regenerate with scripts/sync-header (see README in scripts). */
.header, .mobile-menu, .mobile-menu-overlay {
  --cyan-gradient: linear-gradient(135deg, #40E0FF, #00B8D4);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.7);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.header, .mobile-menu {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  line-height: 1.5;
  color: #E9EEF5;
  font-size: 16px;
  text-align: left;
}
.header {
 position: sticky;
 top: 0;
 left: 0;
 width: 100%;
 z-index: 100;
 transition: all 0.3s ease;
 background: rgba(11, 13, 16, 0.95);
 backdrop-filter: blur(12px);
 border-bottom: 1px solid #273140;
 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.header-container {
 max-width: 1400px;
 margin: 0 auto;
 padding: 12px 24px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 20px;
}
.logo-link {
 display: flex;
 align-items: center;
 gap: 10px;
 text-decoration: none;
 flex-shrink: 0;
 position: relative;
 padding: 4px 0;
}
.logo-icon {
 width: 40px;
 height: 40px;
 background: var(--cyan-gradient);
 border-radius: 12px;
 display: flex;
 align-items: center;
 justify-content: center;
 color: #0B0D10;
 font-size: 1.2rem;
 box-shadow: 0 0 20px rgba(64, 224, 255, 0.3);
 transition: var(--transition);
}
.logo-link:hover .logo-icon {
 transform: rotate(5deg) scale(1.05);
 box-shadow: 0 0 30px rgba(64, 224, 255, 0.5);
}
.brand-name {
 font-size: 1.3rem;
 font-weight: 800;
 font-family: 'Plus Jakarta Sans', sans-serif;
 color: #E9EEF5;
 letter-spacing: -0.5px;
 white-space: nowrap;
}
.brand-name span {
 color: #40E0FF;
 font-weight: 800;
 position: relative;
}
.brand-name span::after {
 content: '';
 position: absolute;
 bottom: -2px;
 left: 0;
 width: 100%;
 height: 2px;
 background: var(--cyan-gradient);
 border-radius: 2px;
 transform: scaleX(0);
 transition: transform 0.3s ease;
 transform-origin: right;
}
.logo-link:hover .brand-name span::after {
 transform: scaleX(1);
 transform-origin: left;
}
.main-nav {
 display: flex;
 align-items: center;
 gap: 4px;
 flex-wrap: nowrap;
 justify-content: center;
 margin: 0 auto;
 padding: 4px 8px;
 background: rgba(21, 26, 33, 0.6);
 border-radius: 60px;
 border: 1px solid #273140;
 backdrop-filter: blur(8px);
}
@media (max-width: 1200px) {
  .main-nav { display: none; }
}
.nav-link {
    color: #9AA5B5;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    border: 1px solid transparent;
}
.preview-nav-link {
    font-weight: 700;
    color: #0B0D10;
    background: var(--cyan-gradient);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(64, 224, 255, 0.25);
    transition: all 0.2s ease;
}
.preview-nav-link i {
    margin-right: 5px;
    color: #0B0D10;
}
.preview-nav-link:hover {
    color: #0B0D10;
    background: var(--cyan-gradient);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(64, 224, 255, 0.4);
}
.preview-nav-link:hover i {
    color: #0B0D10;
    transform: scale(1.1);
}
.nav-link i {
    font-size: 0.8rem;
    color: #727F93;
    transition: all 0.2s ease;
}
.nav-link:hover {
    color: #40E0FF;
    background: rgba(64, 224, 255, 0.1);
    border-color: rgba(64, 224, 255, 0.2);
    transform: translateY(-1px);
}
.nav-link:hover i {
    color: #40E0FF;
    transform: scale(1.1);
}
.nav-link.active {
    background: var(--cyan-gradient);
    color: #0B0D10;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(64, 224, 255, 0.3);
}
.nav-link.active i {
    color: #0B0D10;
}
.nav-dropdown {
    position: relative;
}
.dropdown-menu {
 position: absolute;
 top: calc(100% + 8px);
 left: 50%;
 transform: translateX(-50%) translateY(10px);
 background: #151A21;
 border-radius: 16px;
 padding: 8px;
 min-width: 200px;
 box-shadow: var(--shadow-lg);
 border: 1px solid #273140;
 opacity: 0;
 visibility: hidden;
 transition: all 0.2s ease;
 z-index: 1000;
 backdrop-filter: blur(12px);
}
.nav-dropdown:hover .dropdown-menu, .dropdown-menu:hover {
 opacity: 1;
 visibility: visible;
 transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 10px 16px;
 color: #9AA5B5;
 text-decoration: none;
 font-size: 0.8rem;
 border-radius: 10px;
 transition: all 0.2s ease;
}
.dropdown-menu a i {
 width: 18px;
 color: #40E0FF;
 font-size: 0.9rem;
}
.dropdown-menu a:hover {
 background: rgba(64, 224, 255, 0.1);
 color: #40E0FF;
 transform: translateX(4px);
}
.dropdown-group-title {
 font-size: 0.7rem;
 text-transform: uppercase;
 letter-spacing: 1px;
 font-weight: 700;
 color: #40E0FF;
 padding: 8px 12px 4px;
 margin-top: 4px;
 border-bottom: 1px solid #273140;
}
.dropdown-group-title:first-of-type {
 margin-top: 0;
}
.action-buttons {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-shrink: 0;
}
.auth-btn {
 padding: 8px 16px;
 border-radius: 40px;
 font-size: 0.8rem;
 font-weight: 600;
 background: #1E2630;
 border: 1px solid #273140;
 color: #E9EEF5;
 cursor: pointer;
 display: flex;
 align-items: center;
 gap: 8px;
 white-space: nowrap;
 transition: var(--transition);
 height: 44px;
}
.auth-btn i {
 font-size: 0.8rem;
 color: #40E0FF;
}
.auth-btn:hover {
 background: var(--cyan-gradient);
 border-color: transparent;
 color: #0B0D10;
 transform: translateY(-2px);
 box-shadow: 0 4px 12px rgba(64, 224, 255, 0.3);
}
.user-profile {
 display: flex;
 align-items: center;
 gap: 4px;
 background: #1E2630;
 border: 1px solid #273140;
 border-radius: 60px;
 padding: 3px 3px 3px 10px;
 transition: var(--transition);
 height: 44px;
}
.user-profile:hover {
 border-color: #40E0FF;
 background: rgba(64, 224, 255, 0.1);
}
.user-avatar {
 width: 36px;
 height: 36px;
 border-radius: 50%;
 background: var(--cyan-gradient);
 display: flex;
 align-items: center;
 justify-content: center;
 color: #0B0D10;
 font-weight: 600;
 font-size: 0.9rem;
}
.sign-out-btn {
 width: 36px;
 height: 36px;
 border-radius: 50%;
 border: none;
 background: transparent;
 color: #9AA5B5;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: var(--transition);
}
.sign-out-btn:hover {
 color: #FF5252;
 transform: scale(1.1);
 background: rgba(255, 82, 82, 0.1);
}
.mobile-menu-btn {
 width: 44px;
 height: 44px;
 border-radius: 50%;
 background: #1E2630;
 border: 1px solid #273140;
 display: none;
 align-items: center;
 justify-content: center;
 color: #40E0FF;
 transition: var(--transition);
 flex-shrink: 0;
 cursor: pointer;
}
.mobile-menu-btn i { font-size: 1.1rem; }
.mobile-menu-btn:hover {
 background: var(--cyan-gradient);
 color: #0B0D10;
 transform: translateY(-2px);
 border-color: transparent;
 box-shadow: 0 4px 12px rgba(64, 224, 255, 0.3);
}
@media (max-width: 1200px) {
  .mobile-menu-btn { display: flex; }
}
.mobile-menu {
 position: fixed;
 top: 0;
 right: -100%;
 width: 300px;
 max-width: 85vw;
 height: 100vh;
 background: #151A21;
 z-index: 1000;
 transition: right 0.3s ease;
 padding: 80px 20px 20px;
 border-left: 1px solid #273140;
 overflow-y: auto;
 box-shadow: var(--shadow-lg);
}
.mobile-menu.active { right: 0; }
.mobile-menu-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-bottom: 30px;
}
.mobile-menu-close {
 width: 44px;
 height: 44px;
 border-radius: 50%;
 background: #1E2630;
 border: 1px solid #273140;
 display: flex;
 align-items: center;
 justify-content: center;
 color: #40E0FF;
 cursor: pointer;
 transition: var(--transition);
}
.mobile-menu-close:hover {
 background: var(--cyan-gradient);
 color: #0B0D10;
 transform: rotate(90deg);
}
.mobile-nav-links {
 display: flex;
 flex-direction: column;
 gap: 4px;
 margin-bottom: 20px;
}
.mobile-nav-link {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 14px 16px;
 color: #9AA5B5;
 text-decoration: none;
 font-size: 0.95rem;
 border-radius: 12px;
 transition: var(--transition);
}
.mobile-preview-link {
 font-weight: 700;
 color: #0B0D10 !important;
 background: var(--cyan-gradient);
 border: 1px solid transparent;
 box-shadow: 0 4px 14px rgba(64, 224, 255, 0.25);
}
.mobile-preview-link i {
 color: #0B0D10 !important;
}
.mobile-preview-link:hover {
 transform: translateY(-1px);
 box-shadow: 0 6px 18px rgba(64, 224, 255, 0.4);
}
.mobile-nav-link i {
 width: 20px;
 color: #40E0FF;
}
.mobile-nav-link:hover {
 background: rgba(64, 224, 255, 0.1);
 color: #40E0FF;
 transform: translateX(5px);
}
.mobile-nav-link.active {
 background: rgba(64, 224, 255, 0.15);
 color: #40E0FF;
 font-weight: 600;
}
.mobile-nav-link-sub {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 12px 16px 12px 48px;
 color: #9AA5B5;
 text-decoration: none;
 font-size: 0.85rem;
 border-radius: 10px;
 transition: var(--transition);
}
.mobile-nav-link-sub i {
 width: 18px;
 color: #40E0FF;
 font-size: 0.8rem;
}
.mobile-nav-link-sub:hover {
 background: rgba(64, 224, 255, 0.1);
 color: #40E0FF;
 transform: translateX(5px);
}
.mobile-accordion-header {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 14px 16px;
 color: #9AA5B5;
 font-size: 0.95rem;
 border-radius: 12px;
 cursor: pointer;
 transition: var(--transition);
}
.mobile-accordion-header:hover {
 background: rgba(64, 224, 255, 0.05);
 color: #40E0FF;
}
.mobile-accordion-header i:first-child {
 width: 20px;
 color: #40E0FF;
}
.mobile-accordion-header i:last-child {
 margin-left: auto;
 transition: transform 0.3s ease;
}
.mobile-accordion-header i:last-child.rotated {
 transform: rotate(180deg);
}
.mobile-accordion-content {
 overflow: hidden;
 transition: all 0.3s ease;
}
.mobile-divider {
 height: 1px;
 background: #273140;
 margin: 16px 0;
}
.mobile-menu-overlay {
 position: fixed;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 background: rgba(0, 0, 0, 0.8);
 backdrop-filter: blur(4px);
 z-index: 999;
 opacity: 0;
 visibility: hidden;
 transition: var(--transition);
}
.mobile-menu-overlay.active {
 opacity: 1;
 visibility: visible;
}
.new-badge {
 margin-left: auto;
 font-size: 0.6rem;
 background: var(--cyan-gradient);
 color: #0B0D10;
 padding: 2px 6px;
 border-radius: 10px;
 font-weight: 600;
}
@media (min-width: 1201px) {
  .mobile-menu, .mobile-menu.active, .mobile-menu-overlay, .mobile-menu-overlay.active {
 display: none;
 }
}
@media (max-width: 768px) {
  .header-container { padding: 12px 16px; }
  .brand-name { font-size: 1.1rem; }
  .logo-icon { width: 36px; height: 36px; font-size: 1rem; }
  .mobile-menu-btn { width: 40px; height: 40px; }
  .auth-btn { padding: 6px 12px; height: 40px; font-size: 0.75rem; }
  .user-profile { padding: 2px 2px 2px 8px; height: 40px; }
  .user-avatar { width: 32px; height: 32px; font-size: 0.8rem; }
  .sign-out-btn { width: 36px; height: 36px; }
}
@media (max-width: 480px) {
  .header-container { padding: 10px 12px; }
  .brand-name { font-size: 1rem; }
  .logo-icon { width: 32px; height: 32px; font-size: 0.9rem; }
  .mobile-menu-btn { width: 36px; height: 36px; }
  .auth-btn { padding: 6px 10px; height: 36px; font-size: 0.7rem; }
  .auth-btn span { display: none; }
  .auth-btn i { font-size: 0.9rem; margin: 0; }
  .user-profile { padding: 2px; height: 36px; }
  .user-avatar { width: 28px; height: 28px; font-size: 0.7rem; }
  .sign-out-btn { width: 36px; height: 36px; }
}
@media (max-width: 768px) {
  .nav-link, .mobile-nav-link, .mobile-menu-btn, .auth-btn {
  min-height: 44px;
  min-width: 44px;
 }
}
.user-profile {
 animation: profileSlideIn 0.3s ease-out;
}
@media (display-mode: standalone) {
  header { 
 padding-top: env(titlebar-area-inset-top, 12px); 
 -webkit-app-region: drag; 
 }
  header .logo-link, header .nav-link, header .action-buttons button, header .action-buttons a, header .mobile-menu-btn { 
 -webkit-app-region: no-drag; 
 }
  .header-container { 
 padding-left: max(24px, env(titlebar-area-inset-left)); 
 padding-right: max(24px, env(titlebar-area-inset-right)); 
 }
}
@supports (padding: max(0px)) {
  .header-container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}
.mobile-accordion > summary { list-style: none; }
.mobile-accordion > summary::-webkit-details-marker { display: none; }
.mobile-accordion[open] > .mobile-accordion-header i:last-child { transform: rotate(180deg); }
/* pages whose content already clears a fixed header keep it fixed */
body.fp-fixed-header .header { position: fixed; }
