/* 🌞 Light mode variables */
:root {
  --bg-color: #fdf6f6;
  --text-color: #2b2b2b;
  --accent-color: #d33682;
  --secondary-color: #e5bace;
  --link-color: #c72577;
}

/* 🌚 Dark mode variables */
body.dark {
  --bg-color: #1b1b2f;
  --text-color: #f8e9f9;
  --accent-color: #ff66b2;
  --secondary-color: #3a2b3f;
  --link-color: #ff88cc;
}

/* 🔤 Global styles */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 🧭 Navbar */
.navbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background-color: var(--accent-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.navbar a:hover {
  opacity: 0.8;
}

.navbar a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 🌗 Theme toggle button */
#theme-toggle {
  margin-left: auto;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  transition: all 0.3s ease;
}

#theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(20deg);
}

/* 📝 Content */
main {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  color: var(--accent-color);
}

a {
  color: var(--link-color);
}

a:hover {
  text-decoration: underline;
}

/* 📝 Points Popup */
#points-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--accent); /* Uses theme accent automatically */
  color: var(--fg);                /* Use text color from theme */
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pop animation for points number */
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.pop {
  animation: pop 0.3s ease-in-out;
}

/* Particle effect */
.point-particle {
  position: absolute;
  font-size: 1rem;
  color: var(--accent);
  pointer-events: none;
  animation: riseFade 1s forwards;
  user-select: none;
}

@keyframes riseFade {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  50%  { transform: translateY(-20px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-40px) scale(1); opacity: 0; }
}

