@keyframes cw-hue-spin {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}

:root {
  --glass-bg:   linear-gradient(145deg, rgba(8,14,26,0.90), rgba(4,8,18,0.82));
  --glass-bdr:  rgba(255,255,255,0.07);
  --glass-blur: blur(18px) saturate(160%);
  --glass-shad: 0 12px 44px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.25),
                inset 0 1px 0 rgba(255,255,255,0.08);
  --panel-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ─── macOS-style top dock ─── */
#social-nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 5px;
  font-family: var(--panel-font);
  background: rgba(5,8,18,0.85);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 60px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

#social-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px; height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.18) 35%,
    rgba(255,255,255,0.18) 65%,
    transparent
  );
  pointer-events: none;
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.24s cubic-bezier(0.23,1,0.32,1);
}

.dock-item:hover { transform: translateY(-3px) scale(1.05); }

.dock-icon-wrap {
  width: 16px; height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

.dock-icon-svg {
  width: 16px; height: 16px;
  pointer-events: none;
  flex-shrink: 0;
}

[data-social="discord"]   .dock-icon-svg { fill: #5865f2; }
[data-social="steam"]     .dock-icon-svg { fill: #c7d5e0; }
[data-social="instagram"] .dock-icon-svg { fill: #c13584; }
[data-social="twitter"]   .dock-icon-svg { fill: #1da1f2; }

.dock-fa-icon {
  font-size: 16px;
  color: #8fbcbb;
  animation: cw-hue-spin 3s linear infinite;
  pointer-events: none;
  flex-shrink: 0;
}

.dock-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: nowrap;
}

[data-social="discord"]   .dock-label { background: linear-gradient(135deg,#7289da,#5865f2); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
[data-social="steam"]     .dock-label { background: linear-gradient(135deg,#c7d5e0,#66c0f4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
[data-social="instagram"] .dock-label { background: linear-gradient(45deg,#833ab4,#c13584,#f77737); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
[data-social="twitter"]   .dock-label { background: linear-gradient(135deg,#1da1f2,#0084ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
[data-social="comments"]  .dock-label { color: #8fbcbb; }

.dock-item:focus-visible { outline: 2px solid rgba(143,188,187,0.75); outline-offset: 3px; border-radius: 50px; }

@media (max-width: 768px) {
  #social-nav { transform: translateX(-50%) scale(1.05); gap: 2px; padding: 4px 6px; }
  .dock-label { display: none; }
  .dock-item  { padding: 8px 9px; }
}

/* ─── Bottom Panel Structure ─── */
/* desktop: anchored bottom-left */
#bottom-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(180deg, rgba(8,14,26,0.94), rgba(4,8,18,0.88));
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-bdr);
  border-radius: 24px;
  box-shadow: var(--glass-shad);
  overflow: visible;
  font-family: var(--panel-font);
  font-size: 12px;
  color: rgba(255,255,255,0.9);
}

#bottom-panel::before { display: none; }

/* Mobile: centre the panel and keep it within the viewport. These come AFTER
   the base #bottom-panel rule so they override its left:20px (source order). */
@media (max-width: 768px) {
  #bottom-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    transform-origin: bottom center;
    width: calc(100vw - 20px);
    max-width: 360px;
  }
}

/* Phones: shrink the whole Discord panel so it fits and isn't oversized */
@media (max-width: 480px) {
  #bottom-panel {
    bottom: 12px;
    width: calc(100vw - 16px);
    border-radius: 18px;
    font-size: 11px;
  }
  #bp-who { padding: 10px 14px 14px; }
  .avatar-container,
  .avatar          { width: 60px; height: 60px; }
  .avatar          { border-width: 4px; }
  .avatar-deco     { width: 80px; height: 80px; }
  .status-badge    { width: 18px; height: 18px; border-width: 4px; }
  #bottom-panel.has-banner .avatar-container { margin-top: -40px; }
  .display-name    { font-size: 1.2rem; }
  .username        { font-size: 0.82rem; }
  .status-text     { font-size: 0.68rem; }
  .user-info       { margin-top: 6px; }
  #banner-strip.expanded { height: 72px; }
}

#banner-strip {
  width: 100%; height: 0;
  flex-shrink: 0; overflow: hidden;
  border-radius: 24px 24px 0 0;
  transition: height 0.4s cubic-bezier(0.4,0,0.2,1);
}
#banner-strip.expanded { height: 96px; }
#banner-strip img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}

#bp-who {
  position: relative;
  padding: 12px 18px 18px;
}

#discord-watermark {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 1.15rem;
  color: #5865f2;
  opacity: 0.12;
  pointer-events: none;
  z-index: 1;
}

#bp-activities {
  width: 100%;
  padding: 8px 12px 10px;
  overflow: hidden;
  border-top: none;
  box-sizing: border-box;
  position: relative;
}

#bp-activities::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.10),
    transparent
  );
}

@media (prefers-reduced-motion: reduce) {
  #bottom-panel   { animation: none !important; }
  .dock-icon-wrap { transition: none !important; }
  .dock-icon-svg  { transition: none !important; }
  .dock-fa-icon   { transition: none !important; animation: none !important; }
}
