/* ===========================
   SOCyberX Sidebar Styles
   =========================== */

/* Import JetBrains Mono for global navigation */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* Sidebar Container (Right, Collapsible) */
.socx-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--card);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--border, rgba(0, 140, 255, 0.2));
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  /* Hide scrollbar visually but allow scrolling */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Sidebar Header */
.socx-sidebar-header {
  position: relative;
  width: 100%;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border, rgba(0, 140, 255, 0.15));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 60px;
  z-index: 1;
}

/* Sidebar Open State (toggled via body.sidebar-open) */
body.sidebar-open .socx-sidebar {
  transform: translateX(0);
}

/* Sidebar Content Container */
.socx-sidebar-content {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 60px);
  padding: 2rem 1.5rem;
  gap: 1.5rem;
  /* Remove overflow-y to prevent double scrolling - sidebar handles scrolling */
  overflow: visible;
}

/* Profile Block */
.socx-sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border, rgba(0, 140, 255, 0.15));
}

.socx-sidebar-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border, rgba(0, 140, 255, 0.4));
  box-shadow: 0 0 20px var(--glow, rgba(0, 140, 255, 0.3));
  background: var(--glow, rgba(0, 140, 255, 0.1));
}

.socx-sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.socx-sidebar-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text, rgba(255, 255, 255, 0.9));
  text-align: center;
  letter-spacing: 0.5px;
}

/* Stats Block (Points/XP) */
.socx-sidebar-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.socx-sidebar-points {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--glow, rgba(0, 140, 255, 0.08));
  border: 1px solid var(--border, rgba(0, 140, 255, 0.2));
  border-radius: 8px;
}

.socx-stat-label {
  font-size: 0.9rem;
  color: var(--muted, rgba(255, 255, 255, 0.7));
  font-weight: 500;
}

.socx-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(0, 255, 255, 0.9);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Level/Progress Bar */
.socx-sidebar-level {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.socx-level-label {
  font-size: 0.85rem;
  color: var(--muted, rgba(255, 255, 255, 0.6));
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.socx-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--glow, rgba(0, 140, 255, 0.1));
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(0, 140, 255, 0.2));
}

.socx-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 140, 255, 0.8) 0%, rgba(0, 255, 255, 0.8) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Navigation Links */
.socx-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.socx-nav-link {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--text, rgba(255, 255, 255, 0.8));
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.socx-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--glow, rgba(0, 140, 255, 0.8));
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.socx-nav-link:hover {
  background: var(--glow, rgba(0, 140, 255, 0.1));
  color: var(--text, rgba(255, 255, 255, 1));
  border-color: var(--border, rgba(0, 140, 255, 0.3));
  padding-left: 1.25rem;
}

.socx-nav-link:hover::before {
  transform: scaleY(1);
}

.socx-nav-link:active {
  background: var(--glow, rgba(0, 140, 255, 0.15));
}

/* Theme Toggle */
.socx-sidebar-theme {
  padding: 1rem 0;
  border-top: 1px solid var(--border, rgba(0, 140, 255, 0.15));
}

.socx-theme-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.socx-theme-label:hover {
  background: var(--glow, rgba(0, 140, 255, 0.05));
}

.socx-theme-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text, rgba(255, 255, 255, 0.8));
}

.socx-theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--glow, rgba(0, 140, 255, 0.2));
  border: 1px solid var(--border, rgba(0, 140, 255, 0.3));
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.socx-theme-toggle:focus {
  box-shadow: 0 0 0 3px var(--glow, rgba(0, 255, 255, 0.2));
}

.socx-theme-toggle::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.socx-theme-toggle:checked {
  background: rgba(0, 255, 255, 0.4);
  border-color: rgba(0, 255, 255, 0.5);
}

.socx-theme-toggle:checked::before {
  left: calc(100% - 20px);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 8px rgba(0, 255, 255, 0.4);
}

/* Social Media Icons */
.socx-social {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 12px 0;
  border-top: 1px solid var(--border, rgba(0, 140, 255, 0.12));
  margin-top: 12px;
}

.socx-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.2s ease;
  text-decoration: none;
}

.socx-social__icon {
  width: 22px;
  height: 22px;
}

/* Brand colors */
.socx-social__btn.instagram .socx-social__icon {
  fill: url(#igGradient);
}

.socx-social__btn.linkedin .socx-social__icon {
  fill: #0A66C2;
}

.socx-social__btn:hover {
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.6));
}

/* Light mode - ensure icons remain visible */
body[data-theme="light"] .socx-social__btn.instagram .socx-social__icon {
  fill: url(#igGradient);
}

body[data-theme="light"] .socx-social__btn.linkedin .socx-social__icon {
  fill: #0A66C2;
}

body[data-theme="light"] .socx-social__btn:hover {
  filter: drop-shadow(0 0 8px rgba(0, 140, 255, 0.5));
}

/* Footer with Logout */
.socx-sidebar-footer {
  padding-top: 1rem;
}

/* Sidebar Footer Buttons */
.socx-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 6px;
  color: var(--text, rgba(255, 255, 255, 0.9));
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-align: center;
  display: block;
  border: none;
  font-family: inherit;
}

/* Logout Button - Red/Danger Style */
.socx-btn--logout {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.socx-btn--logout:hover {
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.5);
  color: rgba(255, 255, 255, 1);
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.3);
}

.socx-btn--logout:active {
  background: rgba(255, 59, 48, 0.25);
}

/* Login Button - Green/Neon Style */
.socx-btn--login {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: rgba(255, 255, 255, 0.9);
}

.socx-btn--login:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(16, 185, 129, 0.3) 100%);
  border-color: rgba(34, 197, 94, 0.6);
  color: rgba(255, 255, 255, 1);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.socx-btn--login:active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.35) 0%, rgba(16, 185, 129, 0.35) 100%);
}

/* Sign Up Button - Secondary/Cyan Outline Style */
.socx-btn--signup {
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.9);
  margin-top: 10px;
}

.socx-btn--signup:hover {
  background: rgba(0, 255, 255, 0.1);
  border-color: rgba(0, 255, 255, 0.6);
  color: rgba(255, 255, 255, 1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.socx-btn--signup:active {
  background: rgba(0, 255, 255, 0.15);
}

/* Sidebar Overlay (when open, darken background) */
body.sidebar-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  pointer-events: all;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===========================
   Cyber Background Animation
   =========================== */

.socx-bg-animated {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.15;
}

/* Animated Glow Lines */
.socx-bg-animated::before,
.socx-bg-animated::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, transparent 20%, rgba(0, 140, 255, 0.1) 21%, rgba(0, 140, 255, 0.1) 34%, transparent 35%, transparent),
              radial-gradient(circle, transparent 20%, rgba(0, 255, 255, 0.08) 21%, rgba(0, 255, 255, 0.08) 34%, transparent 35%, transparent);
  background-size: 150px 150px, 200px 200px;
  animation: cyberRotate 20s linear infinite;
  transform-origin: center center;
}

.socx-bg-animated::after {
  animation: cyberRotateReverse 25s linear infinite;
  background-size: 180px 180px, 220px 220px;
  opacity: 0.7;
}

@keyframes cyberRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes cyberRotateReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

/* Moving Particles/Streams */
.socx-bg-animated {
  background-image: 
    linear-gradient(45deg, transparent 48%, rgba(0, 140, 255, 0.03) 49%, rgba(0, 140, 255, 0.03) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(0, 255, 255, 0.03) 49%, rgba(0, 255, 255, 0.03) 51%, transparent 52%);
  background-size: 100px 100px;
  animation: cyberStream 15s linear infinite;
}

@keyframes cyberStream {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 100px 100px, -100px -100px;
  }
}

/* Additional Glow Effects */
.socx-bg-animated {
  box-shadow: inset 0 0 200px rgba(0, 140, 255, 0.05);
}

/* Ensure z-index hierarchy:
   - Background animation: z-index 0
   - Grid: z-index 1
   - Map: z-index 2
   - Scanline: higher
   - Portal: highest
   - Sidebar: z-index 1000 (above all) */

/* Responsive adjustments */
@media (max-width: 768px) {
  .socx-sidebar {
    width: 260px;
  }
  
  .socx-sidebar-content {
    padding: 1.5rem 1.25rem;
  }
}

/* Hide scrollbar for sidebar (Webkit browsers) */
.socx-sidebar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
  width: 0;
  height: 0;
}

/* ===========================
   Global Navigation
   =========================== */

/* Unified Top Header */
.socx-global-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  z-index: 10000;
  background: transparent;
  pointer-events: none; /* Allow clicks to pass through header container */
  box-sizing: border-box;
}

/* SOCYBERX Logo - Top Left */
.socx-global-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.15em;
  color: rgba(0, 255, 255, 0.95);
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-shadow: 
    0 0 8px rgba(0, 255, 255, 0.6),
    0 0 16px rgba(0, 140, 255, 0.4);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto; /* Enable clicks on logo */
}

.socx-global-logo:hover {
  color: rgba(0, 255, 255, 1);
  text-shadow: 
    0 0 12px rgba(0, 255, 255, 0.9),
    0 0 24px rgba(0, 140, 255, 0.6),
    0 0 36px rgba(0, 255, 255, 0.3);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.3),
    inset 0 0 20px rgba(0, 255, 255, 0.05);
  transform: translateY(-1px);
}

.socx-global-logo:active {
  transform: translateY(0);
}

.socx-logo-text {
  position: relative;
  display: inline-block;
}

/* Fixed Open Menu Button - Top Right (visible when sidebar is closed) */
.socx-menu-open-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 255, 0.95);
  text-transform: uppercase;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  outline: none;
  white-space: nowrap;
  pointer-events: auto; /* Enable clicks on button */
}

.socx-menu-open-btn:hover {
  color: rgba(0, 255, 255, 1);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.3),
    inset 0 0 20px rgba(0, 255, 255, 0.05);
  transform: translateY(-1px);
}

.socx-menu-open-btn:active {
  transform: translateY(0);
}

.socx-menu-open-btn:focus-visible {
  outline: 2px solid rgba(0, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Hide open button when sidebar is open */
body.sidebar-open .socx-menu-open-btn {
  display: none;
}

/* Close Menu Button - Inside Sidebar Header (visible when sidebar is open) */
.socx-menu-close-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 255, 0.95);
  text-transform: uppercase;
  transition: all 0.3s ease;
  outline: none;
  white-space: nowrap;
}

.socx-menu-close-btn:hover {
  color: rgba(0, 255, 255, 1);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.3),
    inset 0 0 20px rgba(0, 255, 255, 0.05);
  transform: translateY(-1px);
}

.socx-menu-close-btn:active {
  transform: translateY(0);
}

.socx-menu-close-btn:focus-visible {
  outline: 2px solid rgba(0, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Hide close button when sidebar is closed */
.socx-sidebar:not(.sidebar-open) .socx-menu-close-btn,
body:not(.sidebar-open) .socx-menu-close-btn {
  display: none;
}

/* Menu Icons */
.menu-icon-open,
.menu-icon-close {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  text-shadow: 
    0 0 6px rgba(0, 255, 255, 0.5),
    0 0 12px rgba(0, 140, 255, 0.3);
}

/* Menu text */
.menu-text {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-shadow: 
    0 0 6px rgba(0, 255, 255, 0.5),
    0 0 12px rgba(0, 140, 255, 0.3);
}

.socx-menu-open-btn:hover .menu-text,
.socx-menu-close-btn:hover .menu-text {
  text-shadow: 
    0 0 8px rgba(0, 255, 255, 0.7),
    0 0 16px rgba(0, 140, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .socx-global-header {
    padding: 12px 16px;
  }

  .socx-global-logo {
    font-size: 16px;
    padding: 6px 12px;
  }

  .socx-menu-open-btn {
    padding: 8px 14px;
    font-size: 12px;
    gap: 6px;
  }

  .socx-menu-close-btn {
    padding: 6px 12px;
    font-size: 11px;
    gap: 6px;
  }

  .menu-icon-open,
  .menu-icon-close {
    font-size: 14px;
  }

  .menu-text {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .socx-global-header {
    padding: 10px 12px;
  }

  .socx-global-logo {
    font-size: 14px;
    padding: 5px 10px;
    letter-spacing: 0.1em;
  }

  .socx-menu-open-btn {
    padding: 6px 12px;
    gap: 5px;
  }

  .socx-menu-close-btn {
    padding: 5px 10px;
    gap: 5px;
  }

  .menu-text {
    display: none; /* Hide text on very small screens, show icon only */
  }
}

/* ===========================
   Energy Rift Toggle (Hidden - kept for compatibility)
   =========================== */

/* Hide old energy rift toggle */
.cyber-side-menu {
  display: none !important;
  position: fixed !important;
  top: 30px !important;
  left: 20px !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 9999 !important;
}

/* Hide old dot-inner */
.cyber-side-dot .dot-inner {
  display: none !important;
}

/* Energy Rift Button - Vertical Glowing Crack */
.cyber-side-dot {
  position: relative;
  width: 33px !important;
  height: 110px !important;
  border-radius: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease, filter 0.3s ease;
  outline: none;
  overflow: visible;
}

/* Rift Core - Main vertical crack */
.rift-core {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 7px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 255, 255, 0.95) 20%,
    rgba(0, 140, 255, 1) 50%,
    rgba(0, 255, 255, 0.95) 80%,
    transparent 100%
  );
  box-shadow: 
    0 0 12px rgba(0, 255, 255, 0.95),
    0 0 24px rgba(0, 140, 255, 0.75),
    0 0 36px rgba(0, 255, 255, 0.4),
    inset 0 0 6px rgba(0, 255, 255, 0.6);
  border-radius: 2px;
  animation: riftPulse 2s ease-in-out infinite, riftFlicker 3s ease-in-out infinite;
}

/* Rift Glow - Outer glow layer */
.rift-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 90%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 255, 255, 0.45) 0%,
    rgba(0, 140, 255, 0.3) 30%,
    transparent 70%
  );
  border-radius: 9px;
  filter: blur(6px);
  animation: riftPulse 2s ease-in-out infinite;
  pointer-events: none;
}

/* Rift Sparks - Animated particles */
.rift-sparks {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 10%, rgba(0, 255, 255, 0.75) 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(0, 140, 255, 0.65) 1px, transparent 1px),
    radial-gradient(circle at 50% 60%, rgba(0, 255, 255, 0.6) 1px, transparent 1px),
    radial-gradient(circle at 30% 80%, rgba(0, 140, 255, 0.65) 1px, transparent 1px),
    radial-gradient(circle at 70% 90%, rgba(0, 255, 255, 0.75) 1px, transparent 1px);
  background-size: 100% 100%;
  background-position: 0 0;
  animation: sparkFloat 4s ease-in-out infinite;
  pointer-events: none;
  filter: blur(0.5px);
}

/* Hover State - Brighter and wider */
.cyber-side-dot:hover {
  width: 24px !important;
  transform: none !important;
}

.cyber-side-dot:hover .rift-core {
  width: 4px;
  box-shadow: 
    0 0 16px rgba(0, 255, 255, 1),
    0 0 32px rgba(0, 140, 255, 0.9),
    0 0 48px rgba(0, 255, 255, 0.5),
    inset 0 0 8px rgba(0, 255, 255, 0.8);
}

.cyber-side-dot:hover .rift-glow {
  width: 22px;
  filter: blur(8px);
}

/* Open State - Intensified glow and arrow indicator */
body.sidebar-open .cyber-side-dot {
  width: 24px !important;
}

body.sidebar-open .cyber-side-dot .rift-core {
  width: 4px;
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 1),
    0 0 40px rgba(0, 140, 255, 0.95),
    0 0 60px rgba(0, 255, 255, 0.6),
    0 0 80px rgba(0, 140, 255, 0.3),
    inset 0 0 10px rgba(0, 255, 255, 0.9);
  animation: riftPulse 1.5s ease-in-out infinite, riftFlicker 2s ease-in-out infinite;
}

body.sidebar-open .cyber-side-dot .rift-glow {
  width: 26px;
  filter: blur(10px);
}

/* Inward Arrow Indicator when open */
body.sidebar-open .cyber-side-dot::after {
  content: '›';
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 255, 255, 0.9);
  font-size: 18px;
  font-weight: bold;
  text-shadow: 
    0 0 8px rgba(0, 255, 255, 0.8),
    0 0 16px rgba(0, 140, 255, 0.6);
  animation: arrowPulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

/* Focus State - Accessibility */
.cyber-side-dot:focus {
  outline: 2px solid rgba(0, 255, 255, 0.6);
  outline-offset: 4px;
}

.cyber-side-dot:focus:not(:focus-visible) {
  outline: none;
}

.cyber-side-dot:focus-visible {
  outline: 2px solid rgba(0, 255, 255, 0.8);
  outline-offset: 4px;
}

/* Active State */
.cyber-side-dot:active {
  transform: none !important;
  width: 22px !important;
}

/* Animations */
@keyframes riftPulse {
  0%, 100% {
    opacity: 0.9;
    filter: blur(0px);
  }
  50% {
    opacity: 1;
    filter: blur(0.5px);
  }
}

@keyframes riftFlicker {
  0%, 100% {
    opacity: 1;
  }
  15% {
    opacity: 0.85;
  }
  30% {
    opacity: 1;
  }
  45% {
    opacity: 0.9;
  }
  60% {
    opacity: 1;
  }
  75% {
    opacity: 0.88;
  }
  90% {
    opacity: 1;
  }
}

@keyframes sparkFloat {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    opacity: 0.6;
  }
  25% {
    background-position: 2px -10px, -2px 5px, 1px -5px, -1px 8px, 2px -12px;
    opacity: 0.8;
  }
  50% {
    background-position: -1px -20px, 2px 10px, -2px -10px, 1px 15px, -1px -25px;
    opacity: 1;
  }
  75% {
    background-position: 2px -30px, -1px 15px, 1px -15px, -2px 20px, 2px -35px;
    opacity: 0.8;
  }
  100% {
    background-position: 0 -40px, 0 20px, 0 -20px, 0 25px, 0 -45px;
    opacity: 0.6;
  }
}

@keyframes arrowPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(-50%) translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
  }
}

/* Responsive adjustments for energy rift */
@media (max-width: 900px) {
  .cyber-side-menu {
    top: 10px !important;
    left: 10px !important;
  }

  .cyber-side-dot {
    width: 18px !important;
    height: 100px !important;
  }

  .cyber-side-dot:hover,
  body.sidebar-open .cyber-side-dot {
    width: 22px !important;
  }
}

@media (max-width: 640px) {
  .cyber-side-menu {
    top: 8px !important;
    left: 8px !important;
  }

  .cyber-side-dot {
    width: 16px !important;
    height: 90px !important;
  }

  .cyber-side-dot:hover,
  body.sidebar-open .cyber-side-dot {
    width: 20px !important;
  }

  body.sidebar-open .cyber-side-dot::after {
    font-size: 16px;
    left: calc(100% + 6px);
  }
}

