/* ==========================================================================
   THE FLYING DUTCHMEN - SHARED NAVIGATION & HEADER DESIGN SYSTEM
   Used across Home, Lobby, Forum, Stats & all official apps
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
  --tfd-bg-dark: #081108;
  --tfd-bg-surface: rgba(16, 28, 16, 0.85);
  --tfd-bg-surface-elevated: rgba(24, 42, 22, 0.95);
  --tfd-border-gold: rgba(212, 175, 55, 0.28);
  --tfd-border-gold-bright: rgba(212, 175, 55, 0.55);
  --tfd-gold-primary: #d4af37;
  --tfd-gold-light: #f5d77f;
  --tfd-gold-dark: #aa820a;
  --tfd-gold-gradient: linear-gradient(135deg, #ffffff 0%, #f7df8b 60%, #d4af37 100%);
  --tfd-emerald-primary: #2d5016;
  --tfd-emerald-accent: #4a7c2c;
  --tfd-emerald-bright: #6b9440;
  --tfd-text-main: #f8fafc;
  --tfd-text-secondary: #cbd5e1;
  --tfd-text-muted: #94a3b8;
  --tfd-danger: #ef4444;
}

/* ==========================================================================
   TOP NAVIGATION BAR - SINGLE LINE STICKY HEADER (All Devices)
   ========================================================================== */
.tfd-navbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(8, 17, 8, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tfd-border-gold, rgba(212, 175, 55, 0.28));
  padding: 0 0.85rem;
  height: 48px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
}

.tfd-navbar-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

/* Brand Column (Menu Toggle + Brand Logo) */
.tfd-brand-row,
.tfd-brand-col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.tfd-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--tfd-text-main, #f8fafc);
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.tfd-brand:hover {
  opacity: 0.9;
  color: var(--tfd-text-main, #f8fafc);
}

.tfd-brand-text {
  background: var(--tfd-gold-gradient, linear-gradient(135deg, #ffffff 0%, #f7df8b 60%, #d4af37 100%));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Responsive Brand Replacement: "The Flying Dutchmen" -> "TFD" on small screens */
.tfd-brand-full {
  display: inline-block;
}
.tfd-brand-short {
  display: none;
}

@media (max-width: 600px) {
  .tfd-brand-full {
    display: none !important;
  }
  .tfd-brand-short {
    display: inline-block !important;
  }
}

/* Desktop Navigation Links */
.tfd-nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.tfd-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--tfd-text-secondary, #cbd5e1);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tfd-nav-link:hover {
  color: var(--tfd-gold-light, #f5d77f);
  background: rgba(212, 175, 55, 0.1);
}

.tfd-nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(74, 124, 44, 0.4) 0%, rgba(45, 80, 22, 0.6) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Actions Row: Language, Login/User & Mobile Toggle */
.tfd-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.tfd-actions-left {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.tfd-actions-right {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Language Icon Button */
.tfd-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--tfd-text-secondary, #cbd5e1);
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 30px;
  white-space: nowrap;
}

.tfd-icon-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--tfd-border-gold, rgba(212, 175, 55, 0.28));
  color: var(--tfd-gold-light, #f5d77f);
}

/* Golden Login Button */
.tfd-btn-login {
  background: linear-gradient(135deg, #e5be48 0%, #d4af37 50%, #aa820a 100%);
  color: #0d1509 !important;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
  transition: all 0.2s ease;
  min-height: 30px;
  white-space: nowrap;
}

.tfd-btn-login:hover {
  background: linear-gradient(135deg, #f3cb53 0%, #e0bc43 50%, #b88d0d 100%);
  color: #0d1509 !important;
  text-decoration: none;
}

/* User Pill Badge */
.tfd-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--tfd-bg-surface, rgba(16, 28, 16, 0.85));
  border: 1px solid var(--tfd-border-gold, rgba(212, 175, 55, 0.28));
  padding: 0.2rem 0.5rem;
  border-radius: 16px;
  font-size: 0.76rem;
  min-height: 30px;
  color: var(--tfd-text-main, #f8fafc);
  white-space: nowrap;
}

.tfd-user-role {
  background: var(--tfd-emerald-accent, #4a7c2c);
  color: var(--tfd-gold-light, #f5d77f);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.08rem 0.3rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.tfd-user-logout {
  background: transparent;
  border: none;
  color: var(--tfd-danger, #ef4444);
  padding: 0 0 0 2px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.tfd-user-logout:hover {
  opacity: 0.8;
  color: #f87171;
}

/* Mobile Toggle Hamburger Button */
.tfd-mobile-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--tfd-border-gold, rgba(212, 175, 55, 0.28));
  color: var(--tfd-gold-primary, #d4af37);
  width: 32px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tfd-mobile-toggle:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--tfd-gold-light, #f5d77f);
}

/* Mobile Drawer Overlay */
.tfd-mobile-drawer {
  display: none;
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 17, 8, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1250;
  padding: 1rem 0.85rem;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  border-top: 1px solid var(--tfd-border-gold, rgba(212, 175, 55, 0.28));
}

.tfd-mobile-drawer.open {
  display: flex;
  animation: drawerFadeIn 0.2s ease-out;
}

@keyframes drawerFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tfd-mobile-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--tfd-text-main, #f8fafc);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.tfd-mobile-link:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--tfd-border-gold, rgba(212, 175, 55, 0.28));
  color: var(--tfd-gold-light, #f5d77f);
}

.tfd-mobile-link.active {
  background: linear-gradient(135deg, rgba(74, 124, 44, 0.3) 0%, rgba(45, 80, 22, 0.5) 100%);
  border: 1px solid var(--tfd-border-gold, rgba(212, 175, 55, 0.28));
  color: #ffffff;
}

/* ==========================================================================
   DESKTOP EXPANSION (min-width: 768px)
   ========================================================================== */
@media (min-width: 768px) {
  .tfd-navbar {
    padding: 0 1.25rem;
    height: 48px;
  }

  .tfd-navbar-inner {
    gap: 0.85rem;
  }

  .tfd-actions-row {
    gap: 0.5rem;
  }

  .tfd-nav-links {
    display: flex;
  }

  .tfd-mobile-toggle {
    display: none;
  }

  .tfd-mobile-drawer {
    display: none !important;
  }
}
