/* ?? ULTRA-MODERN MOBILE MENU - Canva/Adobe Inspired */

:root {
    --menu-primary: #667eea;
    --menu-primary-dark: #5568d3;
  --menu-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --menu-text-primary: #1a202c;
    --menu-text-secondary: #4a5568;
    --menu-text-muted: #718096;
    --menu-bg-primary: #ffffff;
    --menu-bg-secondary: #f7fafc;
    --menu-border: #e2e8f0;
  --menu-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --menu-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --menu-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ?? ENHANCED HEADER CONTAINER */
.header-container {
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--menu-transition);
}

.header-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--menu-border) 20%, 
  var(--menu-border) 80%, 
        transparent 100%);
}

/* ?? MODERN SEARCH CONTAINER */
.search-container {
  transition: var(--menu-transition);
}

.search-container input[type="search"] {
    transition: var(--menu-transition);
}

.search-container:focus-within {
    transform: translateY(-1px);
}

.search-container input[type="search"]:focus {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    border-color: var(--menu-primary);
}

/* ?? PROFESSIONAL PROFILE AVATAR */
.profile-avatar {
    transition: var(--menu-transition);
  cursor: pointer;
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.profile-avatar img {
    transition: var(--menu-transition);
}

.profile-avatar:hover img {
  filter: brightness(1.1);
}

/* ?? ANIMATED HAMBURGER ICON */
.modern-menu-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 12px;
  transition: var(--menu-transition);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.modern-menu-trigger:hover {
    background: rgba(102, 126, 234, 0.1);
}

.modern-menu-trigger:active {
    transform: scale(0.95);
}

.modern-menu-trigger:focus {
    outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.menu-icon {
    position: relative;
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-line {
    width: 100%;
    height: 3px;
    background: var(--menu-primary);
    border-radius: 3px;
    transition: var(--menu-transition);
    transform-origin: center;
}

/* Animated hamburger to X transformation */
.modern-menu-trigger.menu-open .menu-line:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.modern-menu-trigger.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.modern-menu-trigger.menu-open .menu-line:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* ?? OVERLAY/BACKDROP */
.menu-overlay {
  position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: var(--menu-transition);
    -webkit-tap-highlight-color: transparent;
}

.menu-overlay-active {
    opacity: 1;
 visibility: visible;
    background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* ?? SLIDE-IN MENU PANEL */
.modern-menu-panel {
    position: fixed;
    top: 0;
  right: 0;
    bottom: 0;
    width: 85%;
  max-width: 380px;
    background: var(--menu-bg-primary);
    box-shadow: var(--menu-shadow);
    z-index: 51;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
          opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.menu-panel-active {
    transform: translateX(0);
    opacity: 1;
}

/* ?? MENU HEADER */
.menu-panel-header {
    background: var(--menu-gradient);
    padding: 1.5rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.menu-panel-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.menu-panel-header-content {
    display: flex;
    align-items: center;
  justify-content: space-between;
    position: relative;
    z-index: 1;
}

.menu-brand {
    display: flex;
  align-items: center;
    gap: 0.75rem;
}

.menu-brand-icon {
 width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.menu-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
}

.menu-close-btn {
    width: 40px;
 height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: var(--menu-transition);
    -webkit-tap-highlight-color: transparent;
}

.menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.menu-close-btn:active {
    transform: scale(0.9) rotate(90deg);
}

/* ?? MENU CONTENT */
.menu-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
    -webkit-overflow-scrolling: touch;
}

.menu-panel-content::-webkit-scrollbar {
    width: 6px;
}

.menu-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.menu-panel-content::-webkit-scrollbar-thumb {
    background: var(--menu-border);
    border-radius: 10px;
}

/* ?? MENU ITEMS */
.menu-item {
    display: flex;
 align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin: 0.25rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--menu-text-primary);
    background: transparent;
    transition: var(--menu-transition);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
min-height: 72px;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
 inset: 0;
    background: var(--menu-gradient);
  opacity: 0;
    transition: var(--menu-transition);
    border-radius: 14px;
}

.menu-item:hover::before,
.menu-item:active::before {
    opacity: 0.08;
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-item-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    color: var(--menu-primary);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: var(--menu-transition);
}

.menu-item:hover .menu-item-icon {
    background: var(--menu-gradient);
    color: white;
    transform: scale(1.05);
}

.menu-item-content {
    flex: 1;
  display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    z-index: 1;
}

.menu-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--menu-text-primary);
  line-height: 1.4;
}

.menu-item-description {
    font-size: 0.8125rem;
    color: var(--menu-text-muted);
    line-height: 1.3;
}

.menu-item-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--menu-text-muted);
    flex-shrink: 0;
    position: relative;
z-index: 1;
    transition: var(--menu-transition);
}

.menu-item:hover .menu-item-arrow {
    color: var(--menu-primary);
    transform: translateX(4px);
}

/* ?? MENU FOOTER */
.menu-panel-footer {
    padding: 1rem 1.25rem 1.5rem;
    background: var(--menu-bg-secondary);
    border-top: 1px solid var(--menu-border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
}

.menu-footer-content {
    display: flex;
    align-items: center;
 gap: 1rem;
}

.menu-footer-user {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
    padding: 0.75rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--menu-border);
}

.menu-footer-avatar {
    width: 44px;
    height: 44px;
 border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--menu-border);
}

.menu-footer-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.menu-footer-user-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--menu-text-primary);
  overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-footer-user-status {
    font-size: 0.75rem;
    color: var(--menu-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.menu-footer-user-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--menu-primary);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}

/* ?? ANIMATIONS */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
    opacity: 0.5;
    }
}

/* Staggered menu item entrance animation */
.menu-panel-active .menu-item {
    animation: slideInRight 0.4s ease-out backwards;
}

.menu-panel-active .menu-item:nth-child(1) { animation-delay: 0.05s; }
.menu-panel-active .menu-item:nth-child(2) { animation-delay: 0.1s; }
.menu-panel-active .menu-item:nth-child(3) { animation-delay: 0.15s; }
.menu-panel-active .menu-item:nth-child(4) { animation-delay: 0.2s; }
.menu-panel-active .menu-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideInRight {
    from {
        opacity: 0;
      transform: translateX(30px);
    }
    to {
  opacity: 1;
        transform: translateX(0);
    }
}

/* ?? RESPONSIVE DESIGN */
@media (min-width: 640px) {
    .modern-menu-panel {
        max-width: 420px;
    }
    
    .menu-item {
        min-height: 76px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .menu-panel-header {
        padding: 1rem 1.25rem;
    }
    
    .menu-item {
        min-height: 60px;
        padding: 0.75rem 1.25rem;
    }
    
    .menu-panel-footer {
        padding: 0.75rem 1.25rem;
    }
}

/* ? ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
 transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .menu-item {
        border: 2px solid currentColor;
    }
    
    .modern-menu-trigger {
        border: 2px solid currentColor;
    }
}

/* Focus visible for keyboard navigation */
.menu-item:focus-visible,
.modern-menu-trigger:focus-visible,
.menu-close-btn:focus-visible {
    outline: 3px solid var(--menu-primary);
  outline-offset: 2px;
}

/* Touch feedback enhancement */
@media (hover: none) and (pointer: coarse) {
    .menu-item:active {
        background: rgba(102, 126, 234, 0.15);
    }
    
    .modern-menu-trigger:active,
    .menu-close-btn:active {
        background: rgba(102, 126, 234, 0.2);
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ?? DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    :root {
        --menu-text-primary: #f7fafc;
        --menu-text-secondary: #e2e8f0;
    --menu-text-muted: #cbd5e0;
        --menu-bg-primary: #1a202c;
        --menu-bg-secondary: #2d3748;
        --menu-border: #4a5568;
    }
    
    .menu-panel-footer {
        background: #2d3748;
    }
    
.menu-footer-user {
        background: #1a202c;
    }
}

/* Safe area handling for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
    .menu-panel-header {
   padding-top: calc(1.5rem + env(safe-area-inset-top));
    }
    
    .menu-panel-footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }
}

/* Print styles */
@media print {
    .modern-menu-trigger,
    .modern-menu-panel,
    .menu-overlay {
display: none !important;
    }
}

/* ??? ULTRA-MODERN DESKTOP MENU */
.desktop-menu-container {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--menu-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.desktop-menu-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
 display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
}

.desktop-menu-nav {
    display: flex;
    align-items: center;
 gap: 0.5rem;
    flex: 1;
}

/* ?? DESKTOP MENU ITEMS */
.desktop-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--menu-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--menu-transition);
 cursor: pointer;
    overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.desktop-menu-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--menu-gradient);
  opacity: 0;
    transition: var(--menu-transition);
    border-radius: 12px;
}

.desktop-menu-item:hover::before {
    opacity: 0.08;
}

.desktop-menu-item:hover {
    color: var(--menu-primary);
    transform: translateY(-1px);
}

.desktop-menu-item:active {
    transform: translateY(0);
}

.desktop-menu-item-icon {
    width: 36px;
    height: 36px;
 display: flex;
    align-items: center;
    justify-content: center;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
    color: var(--menu-primary);
    flex-shrink: 0;
    position: relative;
 z-index: 1;
    transition: var(--menu-transition);
}

.desktop-menu-item:hover .desktop-menu-item-icon {
 background: var(--menu-gradient);
    color: white;
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.desktop-menu-item-text {
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

/* Animated bottom indicator */
.desktop-menu-item-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 3px;
  background: var(--menu-gradient);
    border-radius: 3px 3px 0 0;
    transition: var(--menu-transition);
    z-index: 2;
}

.desktop-menu-item:hover .desktop-menu-item-indicator {
    transform: translateX(-50%) scaleX(1);
}

/* Active/Current page state */
.desktop-menu-item.active {
    color: var(--menu-primary);
    font-weight: 600;
}

.desktop-menu-item.active .desktop-menu-item-icon {
  background: var(--menu-gradient);
    color: white;
 box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.desktop-menu-item.active .desktop-menu-item-indicator {
    transform: translateX(-50%) scaleX(1);
}

/* ?? PREMIUM BADGE */
.desktop-menu-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--menu-gradient);
    color: white;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: shimmer 3s infinite;
}

.desktop-menu-badge svg {
    animation: rotate-star 4s linear infinite;
}

@keyframes shimmer {
    0%, 100% {
     box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    50% {
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    }
}

@keyframes rotate-star {
    from {
     transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
  }
}

/* ?? RESPONSIVE TABLET */
@media (min-width: 1024px) and (max-width: 1280px) {
    .desktop-menu-item {
    padding: 0.625rem 1rem;
        font-size: 0.875rem;
 }
  
    .desktop-menu-item-icon {
        width: 32px;
        height: 32px;
    }
    
    .desktop-menu-item-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ?? DARK MODE FOR DESKTOP MENU */
@media (prefers-color-scheme: dark) {
    .desktop-menu-container {
 background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    border-bottom-color: #4a5568;
    }
    
    .desktop-menu-item {
        color: #e2e8f0;
    }
    
    .desktop-menu-item:hover {
   color: #667eea;
    }
}

/* ? ACCESSIBILITY FOR DESKTOP */
.desktop-menu-item:focus-visible {
    outline: 3px solid var(--menu-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .desktop-menu-badge svg {
        animation: none;
    }
    
    .desktop-menu-item-icon {
        transition: background 0.01ms, color 0.01ms;
 }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .desktop-menu-item-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}
