/* Navbar 3.0 - Sidebar Styles */
/* This CSS styles the sidebar for the Starship Navbar 3.0, including hover effects */
/* and responsive behavior. It features a collapsible design with smooth transitions. */

:root {
  --sidebar-bg: rgba(255, 255, 255, 0.1);
  --sidebar-accent: #8a2be2;
  --sidebar-text: #f1f1f1;
  --sidebar-width: 250px;
  --sidebar-collapsed: 64px;
}

.starship-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  box-shadow: 0 0 24px #8a2be244;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  z-index: 10000;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(100px);
  overflow: hidden;
}

/* Sidebar Logo Section */
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  margin-bottom: 24px;
  position: relative;
}

.sidebar-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transform: translateX(2px);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    filter 0.3s ease;
  object-fit: cover;
}

.sidebar-logo:hover img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

/* Sidebar links */
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 16px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    border-left 0.3s ease;
}

.sidebar-links a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--sidebar-accent);
  transform: scale(1.05) translateX(4px);
}

.link-text {
  transition: opacity 1.5s ease !important;
  white-space: nowrap;
}

/* Sidebar Socials */
.sidebar-socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 16px;
  margin-top: auto;
  margin-bottom: 8px;
}

.sidebar-socials a {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    border-left 0.3s ease;
}

.sidebar-socials a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--sidebar-accent);
  transform: scale(1.05) translateX(4px);
}

/* Profile container */
.sidebar-profile {
  display: flex;
  align-items: center;
  padding-left: 16px;
  height: 60px;
  margin-bottom: 14px;
  overflow: hidden;
}

.sidebar-profile a {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  color: var(--sidebar-text);
  transition: gap 0.3s ease;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  border: 2px solid var(--sidebar-accent);
  object-fit: cover;
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.sidebar-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #8a2be277;
}

.sidebar-username {
  margin-left: 12px;
  font-weight: 500;
  font-size: 1rem;
  white-space: nowrap;
  line-height: 36px;
  user-select: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  opacity: 1;
}

.starship-sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.starship-sidebar.collapsed .link-text,
.starship-sidebar.collapsed .sidebar-username {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateX(-10px);
}

.starship-sidebar.collapsed:hover {
  width: var(--sidebar-width);
}

.starship-sidebar.collapsed:hover .link-text,
.starship-sidebar.collapsed:hover .sidebar-username {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(0);
}
.starship-sidebar {
  overflow-y: auto;
}
@media (max-height: 800px) {
  .sidebar-socials {
    display: none;
  }
  .sidebar-profile {
    padding-top: 100px;
  }
}
/* Default state - no padding (sidebar overlays at full width) */
body {
  transition: padding-left 0.3s ease;
  padding-left: 0;
}

@media (min-width: 769px) {
  /* Push the page by collapsed width only when sidebar is collapsed */
  .starship-sidebar.collapsed ~ body,
  body:has(.starship-sidebar.collapsed) {
    padding-left: var(--sidebar-collapsed);
  }
}


/* === Mobile Navbar Overlay === */
.mobile-nav-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10001;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid #a855f7;
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(138, 43, 226, 0.2);
  transition: background 0.3s ease, transform 0.2s ease;
  display: none;
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.mobile-nav-toggle i {
  font-size: 22px;
  pointer-events: none;
}

/* === Fullscreen Overlay === */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0a0a12 0%, #1c1c2b 100%);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.mobile-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* === Overlay Menu Content === */
.mobile-overlay-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.mobile-overlay-content a {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-overlay-content a:hover {
  color: #a855f7;
  transform: translateY(-2px);
}

/* === Responsive Rules === */
@media (max-width: 768px) {
  .starship-sidebar {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}


#dynamicIsland.dynamic-island {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.5rem;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.85), rgba(75, 0, 130, 0.85));
  box-shadow:
    0 0 25px rgba(138, 43, 226, 0.5),
    0 0 10px rgba(255, 255, 255, 0.1) inset,
    0 0 2px rgba(255, 255, 255, 0.25) inset;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  user-select: none;
  cursor: default;
  width: max-content;
  max-width: 90vw;
  transition: all 0.3s ease;
  z-index: 9999;
}

/* Add some glowing pulse on hover */
#dynamicIsland.dynamic-island:hover {
  box-shadow:
    0 0 40px rgba(138, 43, 226, 0.8),
    0 0 12px rgba(255, 255, 255, 0.15) inset,
    0 0 4px rgba(255, 255, 255, 0.35) inset;
  transform: translateX(-50%) scale(1.03);
}

/* Optional: neon flicker animation */
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 24%, 55% {
    opacity: 0.85;
  }
}
#dynamicIsland.dynamic-island.flicker {
  animation: flicker 3s infinite;
}



.starship-sidebar:hover ~ #dynamicIsland.dynamic-island {
  margin-left: calc(var(--sidebar-width) - (48px));
}


#dynamicIsland.hidden {
  display: none;
}

/* Avatar */
#dynamicIslandIcon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
  object-fit: cover;
  flex-shrink: 0;
  display: none; /* default hidden, shown only on greeting */
}

/* Show avatar */
#dynamicIsland.show-avatar #dynamicIslandIcon {
  display: block;
}

/* Text container */
.dynamic-island-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Hide on mobile (max-width 600px, adjust as needed) */
@media (max-width: 769px) {
  #dynamicIsland.dynamic-island {
    display: none !important;
  }
}
