:root {
  --shell-glass-bg: rgba(0, 0, 0, 0.55);
  --shell-glass-border: rgba(255, 255, 255, 0.08);
  --shell-accent-blue: #00a2ff;
  --shell-premium-gold: #ffcc00;
  --shell-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
  --shell-glass-bg: rgba(0, 0, 0, 0.8);
}

.sidebar {
  position: fixed;
  left: 20px;
  top: 20px;
  bottom: 20px;
  width: 75px;
  border-radius: 26px;
  background: var(--shell-glass-bg);
  backdrop-filter: blur(35px);
  border: 1px solid var(--shell-glass-border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  transition: width 0.35s var(--shell-smooth);
  overflow: hidden;
  z-index: 1100;
}

.sidebar:hover {
  width: 240px;
}

.nav-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 16px 22px;
  transition: 0.25s var(--shell-smooth);
  white-space: nowrap;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.bottom {
  margin-top: auto;
  margin-bottom: 8px;
}

.sidebar-png {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-right: 28px;
  flex-shrink: 0;
}

.white-icon {
  filter: brightness(0) invert(1);
}

.label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar:hover .label {
  opacity: 1;
}

.separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 12px 16px;
}

.user-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  border-radius: 50px;
  background: var(--shell-glass-bg);
  border: 1px solid var(--shell-glass-border);
  backdrop-filter: blur(20px);
  z-index: 1200;
  cursor: pointer;
  transition: transform 0.25s var(--shell-smooth), background 0.25s var(--shell-smooth), border-color 0.25s var(--shell-smooth), box-shadow 0.25s var(--shell-smooth);
}

.user-bar:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.avatar-container {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--shell-accent-blue);
  background: #333;
  flex-shrink: 0;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.username-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff;
}

.status-pill {
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--shell-accent-blue);
}

.theme-switch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--shell-glass-border);
  background: var(--shell-glass-bg);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  cursor: pointer;
  transition: transform 0.25s var(--shell-smooth), background 0.25s var(--shell-smooth), border-color 0.25s var(--shell-smooth), box-shadow 0.25s var(--shell-smooth);
}

.theme-switch:hover {
  transform: translateY(-2px) scale(1.06);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.theme-switch img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
  transition: transform 0.25s var(--shell-smooth);
}

.theme-switch:hover img {
  transform: rotate(12deg);
}

.shell-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1400;
}

.shell-modal-overlay.active {
  display: flex;
}

.shell-profile-modal {
  width: min(92vw, 320px);
  border-radius: 24px;
  border: 1px solid var(--shell-glass-border);
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(22px);
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.shell-modal-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 14px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: #444;
}

.shell-modal-name {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.shell-login-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 11px 12px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.2s var(--shell-smooth), background 0.2s var(--shell-smooth), border-color 0.2s var(--shell-smooth);
}

.shell-login-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.mobile-nav-container {
  display: none;
}

@media (max-width: 768px) {
  .sidebar,
  .user-bar {
    display: none !important;
  }

  .mobile-nav-container {
    position: fixed;
    top: 14px;
    left: 14px;
    right: 14px;
    height: 60px;
    border-radius: 50px;
    border: 1px solid var(--shell-glass-border);
    background: var(--shell-glass-bg);
    backdrop-filter: blur(20px);
    z-index: 1250;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
  }

  .mobile-menu-trigger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
  }

  .mobile-menu-trigger span {
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: #fff;
  }

  .mobile-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
  }

  .theme-switch {
    right: 14px;
    bottom: 14px;
  }
}

body.app-embedded .sidebar,
body.app-embedded .user-bar,
body.app-embedded .theme-switch,
body.app-embedded .mobile-nav-container,
body.app-embedded .mobile-dropdown {
  display: none !important;
}
