* {
  box-sizing: border-box;
}
:root {
  --bg: #0b1020;
  --panel: #121a35;
  --text: #e7ecff;
  --muted: #a7b3d0;
  --accent: #6be2ff;
  --accent-2: #7df9d4;
  --danger: #ff6b6b;
}

[data-theme="light"] {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #1a202c;
  --muted: #4a5568;
  --accent: #0088cc;
  --accent-2: #00b894;
  --danger: #e74c3c;
}

/* Ocean Blue Theme */
[data-theme="ocean"] {
  --bg: #0a1628;
  --panel: #132a47;
  --text: #e3f2fd;
  --muted: #90caf9;
  --accent: #00b4ff;
  --accent-2: #0096d6;
  --danger: #ff6b6b;
}

/* Forest Green Theme */
[data-theme="forest"] {
  --bg: #0d1f12;
  --panel: #1a3320;
  --text: #e8f5e9;
  --muted: #a5d6a7;
  --accent: #4caf50;
  --accent-2: #66bb6a;
  --danger: #ff5252;
}

/* Sunset Orange Theme */
[data-theme="sunset"] {
  --bg: #1a0f0a;
  --panel: #2d1810;
  --text: #fff3e0;
  --muted: #ffb74d;
  --accent: #ff6f00;
  --accent-2: #ff9800;
  --danger: #f44336;
}

/* Purple Galaxy Theme */
[data-theme="galaxy"] {
  --bg: #0f0a1f;
  --panel: #1a0f35;
  --text: #f3e5f5;
  --muted: #ce93d8;
  --accent: #9c27b0;
  --accent-2: #ba68c8;
  --danger: #e91e63;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth theme transitions */
html.theme-transitioning,
html.theme-transitioning * {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease !important;
}

/* Ensure all interactive elements transition smoothly */
.btn,
.card,
.stat-card,
.stats-card,
.badge,
.site-header,
.site-footer {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Remove underlines from all links across the site */
a,
a:hover,
a:focus,
a:visited {
  text-decoration: none;
}
.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}
.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(10, 16, 32, 0.9) 0%,
    rgba(10, 16, 32, 0.5) 100%
  );
  backdrop-filter: blur(8px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}
.site-header h1 {
  margin: 0;
  font-size: 1.7rem;
}
.tagline {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-weight: 500;
}
.actions {
  display: flex;
  gap: 0.6rem;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071220;
  font-weight: 700;
}

.theme-toggle {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(0, 0, 0, 0.1);
}

/* Theme Selector Dropdown */
.theme-selector-wrapper {
  position: relative;
  display: inline-block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.theme-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e7ecff' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
}

.theme-select:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.theme-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 226, 255, 0.1);
}

.theme-select option {
  background-color: var(--panel);
  color: var(--text);
  padding: 0.5rem;
}

/* Light theme adjustments */
[data-theme="light"] .theme-select {
  background-color: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #1a202c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a202c' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

[data-theme="light"] .theme-select:hover {
  background-color: #f5f5f5;
  border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .theme-select option {
  background-color: #ffffff;
  color: #1a202c;
}

/* Ocean theme adjustments */
[data-theme="ocean"] .theme-select {
  background-color: rgba(19, 42, 71, 0.6);
  color: #e3f2fd;
  border-color: rgba(0, 180, 255, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e3f2fd' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

[data-theme="ocean"] .theme-select:hover {
  background-color: rgba(19, 42, 71, 0.8);
  border-color: rgba(0, 180, 255, 0.4);
}

[data-theme="ocean"] .theme-select option {
  background-color: #132a47;
  color: #e3f2fd;
}

/* Forest theme adjustments */
[data-theme="forest"] .theme-select {
  background-color: rgba(26, 51, 32, 0.6);
  color: #e8f5e9;
  border-color: rgba(76, 175, 80, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e8f5e9' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

[data-theme="forest"] .theme-select:hover {
  background-color: rgba(26, 51, 32, 0.8);
  border-color: rgba(76, 175, 80, 0.4);
}

[data-theme="forest"] .theme-select option {
  background-color: #1a3320;
  color: #e8f5e9;
}

/* Sunset theme adjustments */
[data-theme="sunset"] .theme-select {
  background-color: rgba(45, 24, 16, 0.6);
  color: #fff3e0;
  border-color: rgba(255, 111, 0, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff3e0' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

[data-theme="sunset"] .theme-select:hover {
  background-color: rgba(45, 24, 16, 0.8);
  border-color: rgba(255, 111, 0, 0.4);
}

[data-theme="sunset"] .theme-select option {
  background-color: #2d1810;
  color: #fff3e0;
}

/* Galaxy theme adjustments */
[data-theme="galaxy"] .theme-select {
  background-color: rgba(26, 15, 53, 0.6);
  color: #f3e5f5;
  border-color: rgba(156, 39, 176, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f3e5f5' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

[data-theme="galaxy"] .theme-select:hover {
  background-color: rgba(26, 15, 53, 0.8);
  border-color: rgba(156, 39, 176, 0.4);
}

[data-theme="galaxy"] .theme-select option {
  background-color: #1a0f35;
  color: #f3e5f5;
}

main.container {
  padding: 2rem 0 3rem;
}
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.count {
  color: var(--muted);
}

.cards {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.card-container {
  perspective: 1200px;
  height: 100%;
  min-height: 300px;
  position: relative;
}

.card {
  list-style: none;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-front {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
}

.card-back {
  background: linear-gradient(
    135deg,
    rgba(107, 226, 255, 0.15),
    rgba(125, 249, 212, 0.1)
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: rotateY(180deg);
  padding: 20px;
  box-shadow: inset 0 0 20px rgba(107, 226, 255, 0.05);
}

.flip-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05)
  );
  backdrop-filter: blur(6px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.flip-icon:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.1)
  );
  transform: scale(1.05) rotate(10deg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.flip-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
}

.card-back .flip-icon {
  transform: rotateY(180deg);
}

.card-back .flip-icon svg {
  transform: rotateY(180deg);
}

.contributor-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.detail-value {
  font-size: 0.95rem;
  line-height: 1.5;
}

.join-date {
  font-weight: 600;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.join-date::before {
  content: "📅";
  font-size: 0.9rem;
}

.full-message {
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--accent-2);
}

.badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 226, 255, 0.3);
}

.github-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(107, 226, 255, 0.4);
}

.github-link svg {
  width: 18px;
  height: 18px;
}

/* Add subtle shine effect on hover */
.card-front::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.1) 30%,
    rgba(255, 255, 255, 0) 60%
  );
  transform: rotate(30deg) translate(-100%, -100%);
  transition: transform 0.6s;
  pointer-events: none;
}

.card:hover .card-front::after {
  transform: rotate(30deg) translate(100%, 100%);
}

/* Add subtle pulse to flip icon */
@keyframes pulse {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

.flip-icon {
  animation: pulse 2s infinite;
}

/* Add subtle glow to card back */
.card-back::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(107, 226, 255, 0.1) 0%,
    rgba(107, 226, 255, 0) 70%
  );
  pointer-events: none;
}
.card a {
  text-decoration: none;
  display: block;
}
.card .name {
  font-weight: 700;
  color: #7df9d4;
}
.card .username {
  color: var(--muted);
  font-size: 0.95rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.card .meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.card .top {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.loading {
  margin: 1rem 0;
  color: var(--muted);
}
.error {
  margin: 1rem 0;
  color: var(--danger);
}

#spotlight-section {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.spotlight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.spotlight-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.spotlight-content img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.spotlight-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.spotlight-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-2);
}

.spotlight-message {
  font-size: 0.95rem;
  color: var(--muted);
}

#show-another {
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
}

.howto {
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 0.5rem;
}
.howto code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer .container {
  padding: 1.2rem 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .site-header .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .actions {
    align-self: stretch;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .theme-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-width: 150px;
  }

  .cards {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .container {
    width: min(1100px, 88vw);
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .list-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .list-header h2 {
    text-align: center;
  }

  .search-container {
    margin: 0.5rem 0 0 0;
  }

  .howto {
    margin-top: 2rem;
    padding: 1rem;
  }

  .btn {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
}
.search-container {
  margin: 1.5rem 0;
}

#searchInput {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

#searchInput:focus {
  outline: none;
  border-color: var(--accent);
}

.stats-banner {
  display: flex;
  gap: 2rem;
  padding: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(107, 226, 255, 0.1),
    rgba(125, 249, 212, 0.1)
  );
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  color: var(--accent-2);
  font-size: 1.5rem;
  font-weight: 800;
}

@media (max-width: 720px) {
  .stats-banner {
    flex-direction: column;
    gap: 1rem;
  }
}
.new-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card {
  position: relative;
}

/* Update search-container to be part of controls */
.controls-container {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.search-container {
  flex: 1;
  min-width: 250px;
  margin: 0;
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.sort-select {
  padding: 0.75rem 1rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 150px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sort-select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.sort-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a7b3d0' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.sort-select option {
  background: var(--panel);
  color: var(--text);
}
.sort-select option:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 720px) {
  .controls-container {
    flex-direction: column;
  }

  .search-container {
    width: 100%;
  }

  .sort-container {
    width: 100%;
  }

  .sort-select {
    flex: 1;
  }
}

/* Fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animation for badges */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Baseline for contributor links inside .cards */
.cards > a {
  text-decoration: none;
  color: inherit;
  display: block;
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  will-change: transform, opacity;
}

/* Animated state applied by JS */
.contributor-link {
  animation-name: fadeInUp, scaleIn;
  animation-duration: 0.45s, 0.36s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1),
    cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-fill-mode: forwards, forwards;
  animation-delay: calc(var(--card-index, 0) * 0.06s),
    calc(var(--card-index, 0) * 0.06s + 0.02s);
  transition: opacity 0.45s ease, transform 0.28s ease, box-shadow 0.28s ease;
  opacity: 1;
}

/* Hover effects for the animated links */
.contributor-link:hover {
  transform: translateY(-4px) scaleY(1.03);
  transform-origin: center;
}

.contributor-link:hover .card {
  box-shadow: 0 8px 24px rgba(107, 226, 255, 0.15);
  border-color: rgba(107, 226, 255, 0.3);
}

/* Smooth transitions for card elements */
.card {
  transition: all 0.3s ease;
}

.card img {
  transition: transform 0.3s ease;
}

.contributor-link:hover .card img {
  transform: scale(1.05) rotate(0deg) scaleY(1.02);
}

/* Pulse animation for NEW badge */
.new-badge {
  animation: pulse 2s ease-in-out infinite;
}

/* Smooth color transitions */
.card .name,
.card .username,
.card .meta {
  transition: color 0.2s ease;
}

/* Loading animation */
.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.card img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.contributor-link:hover .card img {
  transform: scale(1.05) rotate(2deg) scaleY(1.04);
  filter: brightness(1.1);
}
@media (prefers-reduced-motion: reduce) {
  .cards > a {
    animation: none;
    opacity: 1;
  }

  .cards > a:hover {
    transform: none;
  }

  .card img,
  .card,
  .new-badge {
    animation: none;
    transition: none;
  }
}

/* ===== STATS PAGE SPECIFIC STYLES ===== */

.stats-container {
  padding: 2.5rem 0 4rem;
}

.stats-section .section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.stats-section .title-group h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}

/* Overview Stats Grid */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.stat-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-2);
  margin-bottom: 0.25rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* Stat card variants */
.stat-card-primary {
  background: linear-gradient(
    135deg,
    rgba(107, 226, 255, 0.08),
    rgba(107, 226, 255, 0.02)
  );
}

.stat-card-secondary {
  background: linear-gradient(
    135deg,
    rgba(125, 249, 212, 0.08),
    rgba(125, 249, 212, 0.02)
  );
}

.stat-card-tertiary {
  background: linear-gradient(
    135deg,
    rgba(255, 180, 107, 0.08),
    rgba(255, 180, 107, 0.02)
  );
}

.stat-card-accent {
  background: linear-gradient(
    135deg,
    rgba(186, 107, 255, 0.08),
    rgba(186, 107, 255, 0.02)
  );
}

/* Two Column Layout */
.stats-two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Stats Cards (larger content blocks) */
.stats-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
}

.stats-card-large {
  min-height: 400px;
  max-height: 500px;
}

.stats-card-highlight {
  background: linear-gradient(
    135deg,
    rgba(107, 226, 255, 0.06),
    rgba(125, 249, 212, 0.04)
  );
  border-color: rgba(107, 226, 255, 0.15);
}

.stats-card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.stats-card-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.stats-card-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

/* Badge Distribution Styles */
.badge-distribution {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.5rem;
}

.badge-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.badge-stat-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(4px);
}

.badge-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.badge-icon {
  font-size: 1.5rem;
  width: 32px;
  text-align: center;
}

.badge-name {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
}

.badge-count {
  font-size: 0.9rem;
  color: var(--accent-2);
  font-weight: 700;
}

.badge-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.badge-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Growth Chart Styles */
.growth-chart {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem 0;
  position: relative;
  overflow: hidden;
}

.scroll-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.5rem;
  font-style: italic;
  transition: opacity 0.3s ease;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
  flex: 1;
  min-height: 0;
  gap: 0.75rem;
  padding: 1rem 0.5rem 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255, 255, 255, 0.05);
}

.bar-chart::-webkit-scrollbar {
  height: 6px;
}

.bar-chart::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.bar-chart::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.bar-chart::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

.bar-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 50px;
  max-width: 80px;
}

.bar-container {
  width: 100%;
  height: 200px;
  max-height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0.25rem;
  flex-shrink: 0;
}

.bar {
  width: 100%;
  min-width: 30px;
  max-width: 50px;
  min-height: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 6px 6px 0 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -2px 12px rgba(107, 226, 255, 0.25);
  position: relative;
  cursor: pointer;
}

.bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 6px 6px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bar-item:hover .bar {
  filter: brightness(1.3);
  box-shadow: 0 -4px 16px rgba(107, 226, 255, 0.4);
}

.bar-item:hover .bar::after {
  opacity: 1;
}

.bar-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.2;
  word-break: break-word;
}

.bar-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-2);
  order: -1;
  background: rgba(107, 226, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  min-width: 20px;
  text-align: center;
}

/* Name Statistics Styles */
.name-stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.name-stat-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border-left: 3px solid var(--accent-2);
  transition: all 0.2s ease;
}

.name-stat-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(4px);
  border-left-color: var(--accent);
}

.name-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.name-stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

/* Fun Facts Styles */
.fun-facts {
  height: 100%;
}

.fun-facts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fun-facts-list li {
  position: relative;
  padding-left: 2rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  padding: 1rem 1rem 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.fun-facts-list li::before {
  content: "🎉";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
}

.fun-facts-list li:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(4px);
}

/* Loading State */
.stats-card .loading,
.stat-card .loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--muted);
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .stats-overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .bar-chart {
    gap: 0.3rem;
  }

  .bar {
    max-width: 40px;
  }
}

@media (max-width: 768px) {
  .stats-container {
    padding: 1.5rem 0 3rem;
  }

  .stats-section .title-group h2 {
    font-size: 2rem;
  }

  .stats-subtitle {
    font-size: 0.95rem;
  }

  .stats-overview-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1.25rem 1rem;
    gap: 1rem;
  }

  .stat-icon {
    font-size: 2rem;
  }

  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  .stats-two-column {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stats-card {
    padding: 1.5rem;
  }

  .stats-card-large {
    min-height: 350px;
  }

  .bar-container {
    height: 180px;
  }

  .bar-chart {
    gap: 0.5rem;
    padding: 0.75rem 0.25rem 0.5rem;
  }

  .bar-item {
    min-width: 45px;
    max-width: 70px;
  }

  .bar {
    min-width: 28px;
    max-width: 45px;
  }

  .bar-label {
    font-size: 0.6rem;
  }

  .bar-value {
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
  }

  .badge-info {
    gap: 0.5rem;
  }

  .badge-icon {
    font-size: 1.25rem;
    width: 28px;
  }

  .badge-name {
    font-size: 0.85rem;
  }

  .badge-count {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .stats-section .title-group h2 {
    font-size: 1.75rem;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .stat-icon {
    font-size: 2.5rem;
  }

  .bar-chart {
    padding: 0.5rem 0.15rem 0.5rem;
    gap: 0.35rem;
  }

  .bar-container {
    height: 160px;
  }

  .bar-item {
    min-width: 40px;
    max-width: 60px;
  }

  .bar {
    min-width: 24px;
    max-width: 35px;
  }

  .bar-label {
    font-size: 0.55rem;
  }

  .bar-value {
    font-size: 0.65rem;
    padding: 0.1rem 0.25rem;
  }

  .fun-facts-list li {
    font-size: 0.9rem;
    padding: 0.75rem 0.75rem 0.75rem 2rem;
  }

  .fun-facts-list li::before {
    font-size: 1rem;
    left: 0.5rem;
  }
}

/* Animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes growBar {
  from {
    height: 0;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.stat-card,
.stats-card {
  animation: fadeInScale 0.4s ease-out backwards;
}

.stat-card:nth-child(1) {
  animation-delay: 0.05s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.1s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.15s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.2s;
}

.bar {
  animation: growBar 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .stats-card,
  .bar {
    animation: none;
  }
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem; /* Increased from 0.35rem for more spacing */
  margin-bottom: 0.75rem; /* Slightly increased for better separation */
  justify-content: flex-start; /* Align badges to the start */
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem; /* Slightly larger padding for better appearance */
  border-radius: 8px; /* Smoother, more modern border radius */
  font-size: 0.75rem; /* Slightly larger font for readability */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; /* Added transitions */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Hover effect for badges */
.badge:hover {
  transform: scale(1.05); /* Slight scale-up on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}

/* Badge type colors */
.badge-first {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #1a202c;
}

.badge-core {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.badge-top {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
}

.badge-helper {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #1a202c;
}

.badge-early {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  color: #1a202c;
}

.badge-milestone {
  background: linear-gradient(135deg, #fa709a, #fee140);
  color: #1a202c;
}

.badge-custom {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Add icon support */
.badge::before {
  content: "";
  display: inline-block;
  width: 12px; /* Slightly larger for better visibility */
  height: 12px;
}

.badge-first::before {
  content: "🥇";
  width: auto;
}

.badge-core::before {
  content: "⭐";
  width: auto;
}

.badge-top::before {
  content: "🏆";
  width: auto;
}

.badge-helper::before {
  content: "🤝";
  width: auto;
}

.badge-early::before {
  content: "";
  width: auto;
}

.badge-milestone::before {
  content: "🎯";
  width: auto;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(107, 226, 255, 0.3);
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 20px rgba(107, 226, 255, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(1.02);
}

.scroll-to-top:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
}

/* Mobile adjustments */
@media (max-width: 720px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }

  .scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* Respect safe areas on iOS */
@media (max-width: 720px) {
  .scroll-to-top {
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    right: calc(1.5rem + env(safe-area-inset-right));
  }
}

/* Animation for button pulse (optional) */
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(107, 226, 255, 0.3);
  }
  50% {
    box-shadow: 0 4px 20px rgba(107, 226, 255, 0.5);
  }
}

.scroll-to-top.visible {
  animation: pulse-glow 2s ease-in-out infinite;
}

.scroll-to-top:hover {
  animation: none; /* Stop pulse on hover */
}

#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px; /* thickness of the line */
  background: var(--accent-color, #4e9af1); /* fallback color */
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

:root[data-theme="light"] {
  --accent-color: #0078ff;
}

:root[data-theme="dark"] {
  --accent-color: #00e0ff;
}
/* --- HEADER REWORK --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(
    135deg,
    rgba(10, 16, 32, 0.95),
    rgba(18, 26, 53, 0.95)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 2rem;
}

.branding {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 400px;
}

/* Action buttons */
.actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071220;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(107, 226, 255, 0.35);
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 16px rgba(107, 226, 255, 0.5);
}

.theme-toggle {
  font-size: 1.25rem;
  padding: 0.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(8deg);
}

/* Mobile */
@media (max-width: 768px) {
  .header-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .branding {
    align-items: center;
  }

  .tagline {
    max-width: none;
    font-size: 0.9rem;
  }

  .actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}
/* --- CONTRIBUTORS SECTION --- */
.contributors-section {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.title-group h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-group .count {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.controls-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-container input {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--panel);
  color: var(--text);
  font-size: 1rem;
  transition: 0.25s all;
}

.search-container input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-container label {
  font-weight: 600;
  color: var(--muted);
}

.sort-container select {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a7b3d0' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* Stats cards */
.stats-cards {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

/* Badge filters */
.badge-filters-container {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}

.badge-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-filter {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-filter:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.badge-filter.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
  border-color: transparent;
  font-weight: 600;
}

.filter-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .badge-filters {
    justify-content: center;
  }

  .badge-filter {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

.stat-card {
  flex: 1 1 180px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-2);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* --- HOW TO CONTRIBUTE --- */
.howto {
  margin-top: 3rem;
  background: var(--panel);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.howto-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.howto-header .subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.howto-list {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.howto-list li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.howto-note {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .stats-cards {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Appreciation Bar Styles */
.appreciation-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
  margin-top: 0.5rem;
}

.appreciation-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.appreciation-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.appreciation-btn.sent {
  background: rgba(67, 233, 123, 0.2);
  border-color: rgba(67, 233, 123, 0.5);
}

.appreciation-btn .emoji {
  font-size: 1rem;
  display: inline-block;
}

.appreciation-btn .count {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted);
}

.appreciation-btn.sent .count {
  color: var(--accent-2);
}

@keyframes bounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

.appreciation-btn.animating .emoji {
  animation: bounce 0.4s ease;
}

.total-appreciation {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: auto;
  font-weight: 500;
}

@media (max-width: 768px) {
  .appreciation-bar {
    justify-content: center;
  }

  .total-appreciation {
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-top: 0.25rem;
  }
}
