*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --void-black: #0d0015;
  --deep-purple-1: #1a0a2e;
  --deep-purple-2: #2d1b69;
  --deep-purple-3: #4a1a6b;
  --ominous-magenta: #6b1a5e;
  --bright-magenta: #8b1a8b;
  --ghostly-lavender: #d4b8ff;
  --muted-silver: #9a8cb8;
  --eerie-teal: #2dd4bf;
  --dim-gold: #c9a84c;
  --card-bg: rgba(26, 10, 46, 0.55);
  --card-border: rgba(107, 26, 94, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--void-black);
  color: var(--ghostly-lavender);
  font-family: 'Cormorant Garant', serif;
  min-height: 100vh;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#root {
  position: relative;
  z-index: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--void-black);
}
::-webkit-scrollbar-thumb {
  background: var(--deep-purple-2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--deep-purple-3);
}

/* Animations */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(139, 26, 139, 0.4), 0 0 40px rgba(139, 26, 139, 0.2); }
  50% { box-shadow: 0 0 30px rgba(139, 26, 139, 0.7), 0 0 60px rgba(139, 26, 139, 0.35); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.4; box-shadow: 0 0 4px rgba(45, 212, 191, 0.3); }
  50% { opacity: 1; box-shadow: 0 0 10px rgba(45, 212, 191, 0.8); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rune-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes welcome-fade {
  0% { opacity: 0; transform: translateY(-10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

.avatar-ring {
  animation: pulse-glow 3s ease-in-out infinite;
}

.avatar-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 184, 255, 0.15) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

.status-orb {
  animation: status-pulse 2s ease-in-out infinite;
}

.float-anim {
  animation: float 4s ease-in-out infinite;
}

.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-hover::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  box-shadow: 0 0 25px rgba(139, 26, 139, 0.5), inset 0 0 25px rgba(139, 26, 139, 0.1);
  pointer-events: none;
  z-index: 0;
}

.card-hover:hover::before {
  opacity: 1;
}

.card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 26, 139, 0.7) !important;
  background: rgba(45, 27, 105, 0.45) !important;
}

.card-hover > * {
  position: relative;
  z-index: 1;
}

.social-icon {
  transition: all 0.35s ease;
  position: relative;
}

.social-icon:hover {
  transform: scale(1.2);
}

.social-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: rgba(26, 10, 46, 0.95);
  border: 1px solid rgba(139, 26, 139, 0.5);
  color: var(--ghostly-lavender);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'Cormorant Garant', serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 10;
}

.social-icon:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.fade-in-up {
  animation: fade-in-up 0.6s ease-out forwards;
  opacity: 0;
}

.welcome-banner {
  animation: welcome-fade 5s ease-in-out forwards;
}

.section-divider {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 26, 139, 0.5), transparent);
  margin: 28px 0;
}

.section-divider::after {
  content: '◆';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--void-black);
  color: var(--deep-purple-3);
  padding: 0 12px;
  font-size: 10px;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

/* Particle burst on hover */
.card-hover .particle-burst {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
}

.footer-flourish {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(107, 26, 94, 0.4), rgba(139, 26, 139, 0.6), rgba(107, 26, 94, 0.4), transparent);
}

a {
  text-decoration: none;
  color: inherit;
}