/* ========================================
   ENHANCED HOVER-EXPANDABLE SIDEBAR
   ======================================== */

/* Main Sidebar Container - Sleeker Design */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 75px;
  height: 100vh;
  background: linear-gradient(180deg, 
    rgba(10, 14, 26, 0.98) 0%, 
    rgba(15, 20, 32, 0.98) 50%, 
    rgba(10, 14, 26, 0.98) 100%);
  backdrop-filter: blur(20px);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.7), 
              inset -1px 0 0 rgba(91, 158, 255, 0.1);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border-right: 1px solid rgba(91, 158, 255, 0.15);
}

/* Expanded Sidebar with Glow Effect */
.sidebar:hover {
  width: 250px;
  box-shadow: 4px 0 40px rgba(91, 158, 255, 0.3),
              4px 0 80px rgba(0, 0, 0, 0.8),
              inset -1px 0 0 rgba(91, 158, 255, 0.3);
  border-right-color: rgba(91, 158, 255, 0.3);
}

/* Enhanced Scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-color), var(--accent-secondary));
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4a8be8, #6a4ce5);
}

/* Sidebar Header with Enhanced Logo */
.sidebar-header {
  padding: 12px 0;
  text-align: center;
  margin-bottom: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-logoforanzoml {
  font-size: 38px;
  filter: drop-shadow(0 0 20px rgba(91, 158, 255, 0.7)) 
          drop-shadow(0 0 40px rgba(123, 92, 255, 0.4));
  animation: float 3.5s ease-in-out infinite;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 38px;
}

.sidebar:hover .sidebar-logoforanzoml {
  font-size: 46px;
}

.sidebar-logoforanzoml:hover {
  transform: scale(1.2) rotate(15deg);
  filter: drop-shadow(0 0 30px rgba(91, 158, 255, 0.9))
          drop-shadow(0 0 60px rgba(123, 92, 255, 0.6));
}

/* Enhanced Float Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Sidebar Navigation Container */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px;
  flex: 1;
}

/* Enhanced Sidebar Links */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 14px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 15px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  justify-content: flex-start;
  white-space: nowrap;
  border: 1px solid transparent;
}

/* Text with Smooth Transition */
.sidebar-link span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.35s ease, width 0.35s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.sidebar:hover .sidebar-link span {
  opacity: 1;
  width: auto;
}

/* Enhanced Background Gradient Effect */
.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(91, 158, 255, 0.15) 0%, 
    rgba(123, 92, 255, 0.1) 100%);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  border-radius: 14px;
}

.sidebar-link:hover::before {
  width: 100%;
}

/* Enhanced Hover State */
.sidebar-link:hover {
  color: var(--sidebar-text-hover);
  background: rgba(91, 158, 255, 0.08);
  transform: translateX(4px);
  border-color: rgba(91, 158, 255, 0.2);
}

/* Enhanced Active State */
.sidebar-link.active {
  background: linear-gradient(135deg, 
    rgba(91, 158, 255, 0.25) 0%, 
    rgba(123, 92, 255, 0.2) 100%);
  color: var(--sidebar-text-hover);
  box-shadow: 0 6px 20px rgba(91, 158, 255, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-weight: 700;
  border-color: rgba(91, 158, 255, 0.4);
}

/* Enhanced Active Accent Border */
.sidebar-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, #5b9eff 0%, #7b5cff 100%);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 16px rgba(91, 158, 255, 0.8),
              0 0 32px rgba(123, 92, 255, 0.4);
}

/* Enhanced Sidebar Icons */
.sidebar-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  stroke-width: 2.5;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Icon Hover Effect with Glow */
.sidebar-link:hover .sidebar-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px rgba(91, 158, 255, 0.6));
}

/* Icon Active Effect with Enhanced Glow */
.sidebar-link.active .sidebar-icon {
  filter: drop-shadow(0 0 10px rgba(91, 158, 255, 0.9))
          drop-shadow(0 0 20px rgba(123, 92, 255, 0.5));
  stroke-width: 3;
  transform: scale(1.1);
}

/* Enhanced Main Content Area */
.main-content {
  margin-left: 75px;
  min-height: 100vh;
  width: calc(100% - 75px);
  transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar:hover ~ .main-content {
  margin-left: 250px;
  width: calc(100% - 250px);
}

/* Container Adjustment */
.container {
  padding: 24px;
  max-width: 100%;
}

/* Hide Old Navbar */
.navbar {
  display: none !important;
}

/* Enhanced Content Fade Animation */
.content {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ripple Effect on Click */
.sidebar-link:active {
  transform: scale(0.96);
}

/* ========================================
   RESPONSIVE DESIGN - ENHANCED
   ======================================== */

/* Tablet Landscape */
@media (max-width: 1024px) {
  .sidebar {
    width: 70px;
  }

  .sidebar:hover {
    width: 230px;
  }

  .sidebar-link {
    padding: 13px 12px;
  }

  .sidebar-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }

  .main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
  }

  .sidebar:hover ~ .main-content {
    margin-left: 230px;
    width: calc(100% - 230px);
  }

  .sidebar-logoforanzoml {
    font-size: 34px;
  }

  .sidebar:hover .sidebar-logoforanzoml {
    font-size: 40px;
  }
}

/* Tablet Portrait */
@media (max-width: 768px) {
  .sidebar {
    width: 65px;
  }

  .sidebar:hover {
    width: 210px;
  }

  .sidebar-logoforanzoml {
    font-size: 30px;
  }

  .sidebar:hover .sidebar-logoforanzoml {
    font-size: 36px;
  }

  .sidebar-nav {
    padding: 0 10px;
    gap: 6px;
  }

  .sidebar-link {
    padding: 13px 11px;
  }

  .sidebar-icon {
    width: 21px;
    height: 21px;
    min-width: 21px;
  }

  .main-content {
    margin-left: 65px;
    width: calc(100% - 65px);
  }

  .sidebar:hover ~ .main-content {
    margin-left: 210px;
    width: calc(100% - 210px);
  }

  .container {
    padding: 18px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .sidebar {
    width: 60px;
  }

  .sidebar:hover {
    width: 190px;
  }

  .sidebar-logoforanzoml {
    font-size: 26px;
  }

  .sidebar:hover .sidebar-logoforanzoml {
    font-size: 32px;
  }

  .sidebar-nav {
    padding: 0 8px;
    gap: 5px;
  }

  .sidebar-link {
    padding: 11px 9px;
    border-radius: 12px;
    font-size: 14px;
  }

  .sidebar-icon {
    width: 19px;
    height: 19px;
    min-width: 19px;
    stroke-width: 2.4;
  }

  .sidebar-link.active::after {
    width: 3px;
    height: 55%;
  }

  .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
  }

  .sidebar:hover ~ .main-content {
    margin-left: 190px;
    width: calc(100% - 190px);
  }

  .container {
    padding: 12px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .sidebar {
    width: 55px;
  }

  .sidebar:hover {
    width: 170px;
  }

  .sidebar-nav {
    padding: 0 6px;
  }

  .sidebar-link {
    padding: 9px 7px;
    font-size: 13px;
  }

  .sidebar-icon {
    width: 17px;
    height: 17px;
    min-width: 17px;
  }

  .sidebar-logoforanzoml {
    font-size: 22px;
  }

  .sidebar:hover .sidebar-logoforanzoml {
    font-size: 28px;
  }

  .main-content {
    margin-left: 55px;
    width: calc(100% - 55px);
  }

  .sidebar:hover ~ .main-content {
    margin-left: 170px;
    width: calc(100% - 170px);
  }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
   ======================================== */

/* Enhanced Focus States */
.sidebar-link:focus {
  outline: 2px solid rgba(91, 158, 255, 0.6);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(91, 158, 255, 0.15);
}

.sidebar-link:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-link,
  .sidebar-icon,
  .sidebar-logoforanzoml,
  .content,
  .sidebar-link span,
  .main-content {
    animation: none;
    transition: none;
  }

  .sidebar-link::before {
    transition: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .sidebar {
    border-right: 2px solid rgba(255, 255, 255, 0.5);
  }
  
  .sidebar-link {
    border: 2px solid rgba(255, 255, 255, 0.4);
  }

  .sidebar-link.active {
    border: 3px solid #ffffff;
  }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
  .sidebar {
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.9),
                inset -1px 0 0 rgba(91, 158, 255, 0.15);
  }
  
  .sidebar:hover {
    box-shadow: 4px 0 40px rgba(91, 158, 255, 0.4),
                4px 0 80px rgba(0, 0, 0, 0.95);
  }
}

/* Print Styles */
@media print {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
