/* ============================================
 ULTIMATE PREMIUM NAVIGATION 2025
  DARK ORANGE EDITION
============================================ */

:root {
  --nav-bg: #0f0f0f;
  --nav-bg-soft: #1a1a1a;
  --nav-text: rgba(255,255,255,0.9);
  --nav-text-dim: rgba(255,255,255,0.75);
  --nav-muted: rgba(255,255,255,0.5);
  --nav-accent: #FF8C42;
  --nav-accent-soft: #FFAE55;
  --nav-black: #0a0a0a;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes noise {
  0%,100% { transform: translate(0,0); }
  10% { transform: translate(-5%,-10%); }
  20% { transform: translate(-15%,5%); }
  30% { transform: translate(7%,-15%); }
  40% { transform: translate(-7%,15%); }
  50% { transform: translate(15%,2%); }
  60% { transform: translate(0%,10%); }
  70% { transform: translate(-15%,0%); }
  80% { transform: translate(3%,10%); }
  90% { transform: translate(12%,5%); }
}

@keyframes glow-pulse {
  0%,100% { filter: drop-shadow(0 0 12px rgba(255,121,0,0.25)); }
  50% { filter: drop-shadow(0 0 24px rgba(255,174,85,0.44)); }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.7; }
  100% { transform: scale(2); opacity: 0; }
}

.floating-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 64px;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(15,15,15,0.95), rgba(26,26,26,0.98));
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-bottom: 1px solid rgba(255,140,66,0.15);
  box-shadow:
    0 1px 3px rgba(0,0,0,0.3),
    0 4px 16px rgba(0,0,0,0.2),
    inset 0 -1px 0 rgba(255,140,66,0.08),
    inset 0 1px 0 rgba(255,255,255,0.03);
  transition: all 0.4s cubic-bezier(0.25,0.8,0.25,1);
}

.floating-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  animation: noise 8s steps(10) infinite;
}

.floating-nav::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,140,66,0.08), transparent);
  transition: left 0.7s ease;
  pointer-events: none;
}

.floating-nav.scrolled::after { left: 100%; }
.floating-nav.scrolled {
  background: linear-gradient(135deg, rgba(15,15,15,0.98), rgba(26,26,26,0.99));
  border-bottom-color: rgba(255,140,66,0.25);
  box-shadow:
    0 4px 6px rgba(0,0,0,0.35),
    0 8px 24px rgba(0,0,0,0.25),
    inset 0 -1px 0 rgba(255,140,66,0.12),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.nav-wrapper {
  position: relative;
  max-width: 1440px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: block;
  z-index: 1;
}

.brand {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 2;
}

.brand::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 12px;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(255,140,66,0.10), transparent 70%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.brand:hover::before { opacity: 1; }
.brand:hover { transform: translateY(-50%) scale(1.03); }
.brand:active { transform: translateY(-50%) scale(0.98); }

.brand-logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(255,140,66,0.30));
  transition: filter 0.4s ease;
}

.brand-text {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  display: none;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .brand-text {
    display: block;
  }
}

.brand:hover .brand-text {
  color: #FF8C42;
}

.brand:hover .brand-logo { animation: glow-pulse 2s ease-in-out infinite; }

.nav-menu {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  position: fixed;
  left: 50%;
  top: 32px;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 8px 16px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border-radius: 8px;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-link:hover::before { opacity: 1; }

.nav-link::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  background: radial-gradient(circle at var(--mouse-x,50%) var(--mouse-y,50%), rgba(255,140,66,0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nav-link:hover::after { opacity: 1; }
.nav-link:hover { color: var(--text); transform: translateY(-1px); }

.nav-link.active {
  color: var(--accent);
  background: rgba(255,121,0,0.13);
  box-shadow:
    inset 0 0 0 1px rgba(255,121,0,0.32),
    0 2px 8px rgba(255,174,85,0.12);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF8C42 20%, #FFAE55 80%, transparent);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,140,66,0.40);
  opacity: 1;
}

.nav-link:focus-visible {
  outline: 2px solid #FF8C42;
  outline-offset: 2px;
}

.nav-actions {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  z-index: 2;
}

.nav-cta {
  position: relative;
  height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,140,66,0.25), rgba(255,140,66,0.10));
  border: 1px solid rgba(255,140,66,0.35);
  color: #FF8C42;
  text-decoration: none;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow:
    0 2px 8px rgba(255,140,66,0.20),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 100px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  left: -100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.nav-cta:hover::before { left: 100%; }

.nav-cta::after {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, rgba(255,140,66,0.20), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  filter: blur(20px);
}

.nav-cta:hover::after { opacity: 1; }

.nav-cta:hover {
  background: linear-gradient(135deg, rgba(255,140,66,0.35), rgba(255,140,66,0.15));
  border-color: rgba(255,140,66,0.50);
  transform: translateY(-2px);
  box-shadow:
    0 4px 16px rgba(255,140,66,0.15),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.nav-cta:active { transform: translateY(0); }

.nav-cta-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-cta-text {
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.account-menu {
  position: relative;
  z-index: 1002;
}

.account-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  position: relative;
  cursor: pointer;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.account-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: radial-gradient(circle at center, rgba(255,140,66,0.35), transparent);
  opacity: 0;
  transform: scale(0);
}

.account-btn:active::before { animation: ripple 0.6s ease-out; }

.account-btn:hover {
  background: rgba(255,241,220,0.14);
  border-color: rgba(255,241,220,0.22);
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(255,174,85,0.17),
    inset 0 1px 0 rgba(255,241,220,0.16);
}

.account-btn:active { transform: translateY(0); }

.account-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(255,140,66,0.25));
  font-size: 16px;
  line-height: 1;
}

.account-icon img,
.account-head {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,140,66,0.25);
}

.account-text {
  display: none;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Minecraftia', 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
}

.account-dropdown {
  position: fixed;
  top: 72px;
  right: 16px;
  width: calc(100vw - 32px);
  max-width: 320px;
  background: linear-gradient(135deg, rgba(18,18,18,0.98), rgba(26,26,26,0.99));
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow:
    0 16px 32px rgba(0,0,0,0.5),
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(255,140,66,0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index: 1003;
  overflow: hidden;
}

.account-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.account-dropdown::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='nb'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23nb)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}

.dropdown-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 1;
}

.dropdown-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-large {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8C42, #FFAE55);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #0a0a0a;
  flex-shrink: 0; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.10);
  box-shadow: 0 4px 12px rgba(255,140,66,0.20), inset 0 1px 2px rgba(255,255,255,0.15);
}

.user-avatar-large img { width: 100%; height: 100%; object-fit: cover; }

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.95);
  margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em;
}

.user-status { font-size: 13px; color: rgba(255,255,255,0.50); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 0; }

.dropdown-menu { padding: 8px; position: relative; z-index: 1; }

.dropdown-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; height: 44px; position: relative;
  background: transparent; border: none; border-radius: 8px;
  color: rgba(255,255,255,0.80); font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
  text-align: left; cursor: pointer; transition: all 0.15s cubic-bezier(0.4,0,0.2,1); overflow: hidden;
}

.dropdown-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: #FF8C42; transform: translateX(-3px); transition: transform 0.2s ease;
}

.dropdown-item:hover::before { transform: translateX(0); }

.dropdown-item:not(:disabled):hover {
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,1); padding-left: 16px;
}

.dropdown-item:not(:disabled):active { background: rgba(255,255,255,0.10); transform: scale(0.98); }

.dropdown-item:disabled { opacity: 0.4; cursor: not-allowed; }

.dropdown-item.danger { color: #ff4444; }

.dropdown-item.danger:hover { background: rgba(255,68,68,0.11); color: #ff6666; }

.hamburger {
  display: none; /* Скрыт на десктопе */
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  z-index: 1001;
  position: relative;
}

.hamburger:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.15); }

.hamburger:active { transform: translateY(-50%) scale(0.95); }

.hamburger span {
  display: block;
  height: 2px; width: 100%;
  background: #FF8C42;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px rgba(255,140,66,0.30);
}

.hamburger:hover span { box-shadow: 0 0 12px rgba(255,140,66,0.45); }

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }

.hamburger.active span:nth-child(2) { opacity: 0; transform: translateX(-12px); }

.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 12px 16px;
        background: linear-gradient(135deg, rgba(15,15,15,0.98), rgba(26,26,26,0.99));
        backdrop-filter: blur(32px) saturate(180%);
        -webkit-backdrop-filter: blur(32px) saturate(180%);
        border: none;
        border-bottom: 1px solid rgba(255,140,66,0.10);
        border-radius: 0;
        box-shadow:
            0 12px 32px rgba(0,0,0,0.4),
            inset 0 1px 0 rgba(255,255,255,0.04);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-100%);
        transform-origin: top center;
        transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
        z-index: 999;
        overflow: visible;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        box-shadow:
            0 16px 48px rgba(0,0,0,0.5),
            inset 0 1px 0 rgba(255,255,255,0.06);
    }

    .nav-link {
        width: 100%;
        height: 48px;
        padding: 10px 14px;
        font-size: 15px;
        font-weight: 600;
        text-align: left;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.05);
        border-radius: 10px;
        color: rgba(255,255,255,0.80);
        text-decoration: none;
        transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-cta {
        display: none;
    }

    /* Мобильный профиль фикс */
    .account-text {
        display: none !important;
    }

    .account-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 10px;
    }

    .account-icon {
        margin: 0;
        width: 24px;
        height: 24px;
    }

    .account-icon img,
    .account-head {
        width: 100% !important;
        height: 100% !important;
        border-radius: 4px;
        display: block;
    }

    .nav-link:active {
        background: rgba(255,255,255,0.08);
        transform: scale(0.97);
    }

    .nav-link.active {
        background: rgba(255,140,66,0.15);
        border-color: rgba(255,140,66,0.30);
        color: #FF8C42;
        box-shadow: 0 0 12px rgba(255,140,66,0.15);
    }

    .nav-cta {
        display: none;
    }

    .nav-actions {
        display: flex !important;
        position: fixed;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
        height: auto;
        gap: 8px;
        z-index: 1002;
    }

    .hamburger {
        display: flex;
        position: fixed;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }

    .brand-logo {
        height: 32px;
    }
}

@media (min-width: 769px) {
  .hamburger { display: none !important; }
  .nav-menu { display: flex; }
  .account-text { display: inline; }
  .nav-cta { display: inline-flex; }
  .nav-wrapper { padding: 0 32px; }
  .nav-actions { position: absolute !important; right: 24px !important; top: 50% !important; transform: translateY(-50%) !important; display: flex !important; }
  .account-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: auto; transform-origin: top right; }
}

@media (min-width: 1024px) {
  .nav-wrapper { padding: 0 40px; }
  .nav-menu { gap: 8px; }
  .nav-link { padding: 8px 20px; font-size: 15px; }
}

@media (min-width: 1440px) {
  .nav-wrapper { padding: 0 48px; }
}
