/* ==========================================================================
   Badge Quest — Pixel-Accurate GitHub Achievement Tracker Stylesheet
   Color Palette: Deep Black/Charcoal, Emerald & Lime Green, Sunshine Yellow, Soft Light Pink
   ========================================================================== */

:root {
  --bg-main: #080c0a;
  --bg-card: rgba(18, 24, 20, 0.75);
  --bg-card-hover: rgba(24, 32, 26, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(74, 222, 128, 0.35);

  /* Primary Accent: Emerald & Lime Green */
  --green-lime: #bbf452;
  --green-bright: #4ade80;
  --green-emerald: #22c55e;
  --green-deep: #15803d;

  /* Secondary Accent: Sunshine Yellow */
  --yellow-sun: #facc15;
  --yellow-light: #fef08a;

  /* Tertiary Accent: Soft Light Pink */
  --pink-soft: #f472b6;
  --pink-light: #fbcfe8;

  /* Text Colors */
  --text-white: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-dark: #0a110d;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(ellipse 45% 35% at 8% 18%, rgba(74, 222, 128, 0.16) 0%, transparent 70%),
    radial-gradient(circle 35% at 94% 22%, rgba(187, 244, 82, 0.12) 0%, transparent 65%),
    radial-gradient(circle 38% at 0% 95%, rgba(250, 204, 21, 0.15) 0%, transparent 60%),
    radial-gradient(circle 38% at 100% 95%, rgba(244, 114, 182, 0.14) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient Sparkles Background Layer */
.ambient-sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 12%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 85% 15%, rgba(250, 204, 21, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 92% 38%, rgba(74, 222, 128, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 6% 65%, rgba(250, 204, 21, 0.7), transparent),
    radial-gradient(2px 2px at 94% 80%, rgba(244, 114, 182, 0.9), transparent),
    radial-gradient(1px 1px at 30% 85%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 70% 90%, rgba(74, 222, 128, 0.7), transparent);
  z-index: 0;
}

/* Container */
.container {
  width: min(1280px, 100% - 48px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   A. Top Navigation Bar
   ========================================================================== */

.site-navbar {
  position: sticky;
  top: 10px;
  z-index: 50;
  margin: 10px auto 14px;
  background: rgba(14, 20, 16, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-full);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-white);
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 100%;
  height: 100%;
  fill: #ffffff;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-star {
  color: var(--yellow-sun);
  font-size: 0.95rem;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.18s ease;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.is-active {
  background: var(--green-lime);
  color: var(--text-dark);
  font-weight: 800;
  box-shadow: 0 0 16px rgba(187, 244, 82, 0.35);
}

.nav-item.is-active svg {
  fill: var(--text-dark);
}

.nav-action .btn-star {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-action .btn-star:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.nav-action .star-icon {
  color: var(--yellow-sun);
}

/* ==========================================================================
   B. Hero Section
   ========================================================================== */

.hero-section {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  align-items: center;
  gap: 20px;
  padding: 16px 0 20px;
  position: relative;
}

/* Left Hero: Mascot */
.hero-mascot-col {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mascot-wrap {
  width: 250px;
  max-width: 100%;
  aspect-ratio: 384 / 312;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatMascot 4.5s ease-in-out infinite;
}

.mascot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(74, 222, 128, 0.25));
}

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

/* Center Hero: Main Copy & Search Bar */
.hero-center-col {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: rgba(26, 32, 22, 0.7);
  border: 1px solid rgba(250, 204, 21, 0.35);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-tag .tag-star {
  color: var(--yellow-sun);
  font-size: 0.85rem;
}

.hero-title {
  font-size: clamp(2.2rem, 3.8vw, 3.1rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-white);
  margin-top: -2px;
}

.hero-title .highlight-tracker {
  color: var(--green-bright);
  text-shadow: 0 0 24px rgba(74, 222, 128, 0.45);
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.5;
  margin-top: -4px;
}

/* Big Input Bar */
.search-form {
  width: 100%;
  max-width: 540px;
  margin: 6px auto 0;
}

.search-bar {
  display: flex;
  align-items: center;
  padding: 6px 8px 6px 20px;
  background: rgba(18, 26, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--green-bright);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2), 0 14px 34px rgba(0, 0, 0, 0.6);
}

.search-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-icon svg {
  width: 100%;
  height: 100%;
  fill: #ffffff;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
}

.search-input::placeholder {
  color: #64748b;
}

.btn-analyze {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--green-lime);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(187, 244, 82, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-analyze:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(187, 244, 82, 0.65);
}

.btn-analyze:active {
  transform: translateY(1px);
}

.btn-analyze svg {
  width: 17px;
  height: 17px;
  fill: var(--text-dark);
}

/* Feature Badges below Input */
.feature-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
}

.feature-pill .icon {
  font-size: 0.85rem;
}

/* Right Hero: Floating Orbit */
.hero-orbit-col {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.orbit-system {
  width: 220px;
  height: 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Glowing Elliptical Orbit Track */
.orbit-track {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid rgba(187, 244, 82, 0.45);
  box-shadow: 0 0 20px rgba(187, 244, 82, 0.25), inset 0 0 16px rgba(187, 244, 82, 0.15);
  transform: rotate(-24deg) scaleY(0.7);
  pointer-events: none;
}

.orbit-track-glow {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 1px solid rgba(250, 204, 21, 0.35);
  transform: rotate(-24deg) scaleY(0.7);
  filter: blur(2px);
  pointer-events: none;
}

/* Floating Badge Pods in Orbit */
.orbit-badge {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 24, 20, 0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
}

.orbit-badge img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.orbit-badge:hover {
  transform: scale(1.15) !important;
  z-index: 10;
}

.badge-pos-1 { /* Starstruck: top-left */
  top: 15px;
  left: 20px;
  border: 2px solid rgba(250, 204, 21, 0.6);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.35);
  animation: floatPod1 4s ease-in-out infinite;
}

.badge-pos-2 { /* Open Sourcerer: top-right */
  top: 25px;
  right: 15px;
  border: 2px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  animation: floatPod2 4.2s ease-in-out infinite 0.5s;
}

.badge-pos-3 { /* Pair Extraordinaire: bottom-left */
  bottom: 25px;
  left: 15px;
  border: 2px solid rgba(74, 222, 128, 0.6);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.35);
  animation: floatPod1 4.5s ease-in-out infinite 1s;
}

.badge-pos-4 { /* Pull Shark: bottom-right */
  bottom: 15px;
  right: 20px;
  border: 2px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  animation: floatPod2 4.8s ease-in-out infinite 1.5s;
}

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

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

/* ==========================================================================
   C, D, E. Middle Section (3 Cards Row)
   ========================================================================== */

.dashboard-row {
  display: grid;
  grid-template-columns: 1.15fr 1.7fr 1.15fr;
  gap: 20px;
  margin-bottom: 28px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

/* Card 1: Profile Card */
.profile-card {
  border-color: rgba(74, 222, 128, 0.3);
  box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(74, 222, 128, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid rgba(74, 222, 128, 0.5);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.25);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-wrap .default-avatar-svg {
  width: 36px;
  height: 36px;
  fill: #ffffff;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-username {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-username:hover {
  color: var(--green-bright);
}

.profile-username svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.badge-example {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--green-lime);
  color: var(--text-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.profile-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats Row */
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.stat-icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  fill: var(--text-muted);
  flex-shrink: 0;
}

.stat-values {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-white);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-view-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #a3e635 0%, #4ade80 100%);
  color: var(--text-dark);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(74, 222, 128, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-view-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(74, 222, 128, 0.5);
}

.btn-view-profile svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* Card 2: Achievement Overview Card */
.overview-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.overview-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trophy-icon {
  font-size: 1.35rem;
}

.overview-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
}

.overview-ratio {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-white);
}

/* Multi-Color Gradient Progress Bar */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.progress-track {
  flex: 1;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
}

.progress-fill-gradient {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #4ade80 0%, #a3e635 30%, #facc15 65%, #f472b6 90%);
  box-shadow: 0 0 12px rgba(187, 244, 82, 0.5);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-pct-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* 3 Metric Sub-Cards */
.metric-subcards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-box {
  background: rgba(14, 20, 16, 0.8);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.15s ease;
}

.metric-box:hover {
  transform: translateY(-2px);
}

.metric-box.is-earned {
  border: 1.5px solid rgba(74, 222, 128, 0.45);
  box-shadow: inset 0 0 16px rgba(74, 222, 128, 0.08);
}

.metric-box.is-remaining {
  border: 1.5px solid rgba(244, 114, 182, 0.45);
  box-shadow: inset 0 0 16px rgba(244, 114, 182, 0.08);
}

.metric-box.is-collection {
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  box-shadow: inset 0 0 16px rgba(250, 204, 21, 0.08);
}

.metric-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.is-earned .metric-badge-icon {
  background: rgba(74, 222, 128, 0.2);
  color: var(--green-bright);
}

.is-remaining .metric-badge-icon {
  background: rgba(244, 114, 182, 0.2);
  color: var(--pink-soft);
}

.is-collection .metric-badge-icon {
  background: rgba(250, 204, 21, 0.2);
  color: var(--yellow-sun);
}

.metric-content {
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-white);
}

.metric-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}

/* Card 3: Next Up Card */
.next-up-card {
  border-color: rgba(244, 114, 182, 0.35);
  box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(244, 114, 182, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.next-up-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-white);
}

.next-up-header .dart-icon {
  font-size: 1.1rem;
}

.next-up-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 16px;
}

.next-up-badge-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.15);
  border: 2px solid rgba(74, 222, 128, 0.5);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.next-up-badge-wrap img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}

.next-up-details {
  flex: 1;
  min-width: 0;
}

.next-up-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.next-up-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 3px 0 8px;
  line-height: 1.35;
}

/* Mini Progress inside Next Up */
.mini-progress-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--green-bright);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  transition: width 0.4s ease;
}

.mini-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

.btn-view-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-full);
  background: var(--green-lime);
  color: var(--text-dark);
  font-weight: 800;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(187, 244, 82, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-view-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(187, 244, 82, 0.5);
}

/* ==========================================================================
   F. All GitHub Achievements Section
   ========================================================================== */

.achievements-section {
  margin: 20px 0 36px;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grid-icon {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.015em;
  color: var(--text-white);
}

/* Filter Buttons */
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.filter-btn.is-active {
  background: var(--green-lime);
  color: var(--text-dark);
  font-weight: 800;
  border-color: var(--green-lime);
  box-shadow: 0 0 16px rgba(187, 244, 82, 0.35);
}

/* 9 Achievement Cards Row / Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 14px;
}

.achievement-card {
  background: rgba(18, 24, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  min-height: 195px;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.achievement-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.6);
}

.card-badge-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.card-badge-category {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

/* Circular Pedestal for Badge Image */
.badge-pedestal {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.4));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}

.badge-pedestal img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.card-badge-name {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-white);
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

/* Status Pill & Tier Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.is-earned {
  background: var(--green-lime);
  color: var(--text-dark);
  box-shadow: 0 0 12px rgba(187, 244, 82, 0.35);
}

.status-pill.is-tier-gold {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #000000;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.status-pill.is-tier-silver {
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  color: #0f172a;
  box-shadow: 0 0 12px rgba(203, 213, 225, 0.35);
}

.status-pill.is-tier-bronze {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.35);
}

.status-pill.is-tier-default {
  background: var(--green-lime);
  color: var(--text-dark);
  box-shadow: 0 0 12px rgba(187, 244, 82, 0.35);
}

.status-pill.is-in-progress {
  background: var(--yellow-sun);
  color: var(--text-dark);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.status-pill.is-locked {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-pill.is-retired {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.status-pill.is-disabled {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.status-pill.is-internal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Micro progress on card */
.card-micro-progress {
  width: 100%;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.micro-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.micro-progress-fill {
  height: 100%;
  background: var(--green-bright);
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

.micro-progress-text {
  font-size: 0.66rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sample Test Profiles Bar */
.sample-profiles-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  max-width: 820px;
}

.sample-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--yellow-sun);
}

.sample-pills-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.sample-pill {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sample-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.sample-pill.is-active {
  background: rgba(187, 244, 82, 0.18);
  border-color: var(--green-lime);
  color: var(--green-lime);
  box-shadow: 0 0 10px rgba(187, 244, 82, 0.25);
}

/* Profile & Program Badges Section */
.profile-badges-section {
  margin: 36px 0 50px;
  padding: 24px;
  background: rgba(14, 20, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.profile-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.program-badge-card {
  background: rgba(18, 24, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.program-badge-card:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 222, 128, 0.3);
}

.program-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.program-badge-icon {
  font-size: 1.4rem;
}

.program-badge-pill {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  color: var(--yellow-light);
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.program-badge-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.25;
}

.program-badge-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
}

.program-badge-howto {
  font-size: 0.72rem;
  color: var(--green-bright);
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  margin-top: 6px;
}

/* ==========================================================================
   Modal System (Badge Details, Leaderboard, About)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 5, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(16, 22, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: scale(1.05);
}

/* ==========================================================================
   Badge Detail Modal — Reference-Accurate 2-Column Dashboard Modal
   ========================================================================== */

.modal-detail-card {
  width: min(860px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(155deg, rgba(16, 25, 21, 0.98) 0%, rgba(9, 14, 12, 0.98) 100%);
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 24px;
  padding: 32px 36px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9), 0 0 50px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 222, 128, 0.3) rgba(0, 0, 0, 0.2);
}

.modal-detail-card::-webkit-scrollbar {
  width: 6px;
}
.modal-detail-card::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
}
.modal-detail-card::-webkit-scrollbar-thumb {
  background: rgba(74, 222, 128, 0.3);
  border-radius: 9999px;
}
.modal-detail-card::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 222, 128, 0.5);
}

/* Header */
.modal-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  padding-right: 48px;
}

.modal-badge-avatar {
  width: 86px;
  height: 86px;
  min-width: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.75));
  border: 2px solid rgba(74, 222, 128, 0.45);
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-badge-avatar img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.modal-header-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-header-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.modal-header-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Tier/Status Pills */
.modal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  width: fit-content;
}

.modal-status-pill.tier-default {
  background: rgba(74, 222, 128, 0.12);
  border: 1.5px solid #4ade80;
  color: #4ade80;
}

.modal-status-pill.tier-bronze {
  background: rgba(217, 119, 6, 0.14);
  border: 1.5px solid #d97706;
  color: #f59e0b;
}

.modal-status-pill.tier-silver {
  background: rgba(226, 232, 240, 0.12);
  border: 1.5px solid #cbd5e1;
  color: #f1f5f9;
}

.modal-status-pill.tier-gold {
  background: rgba(234, 179, 8, 0.15);
  border: 1.5px solid #eab308;
  color: #fde047;
}

.modal-status-pill.status-earned {
  background: rgba(74, 222, 128, 0.12);
  border: 1.5px solid #4ade80;
  color: #4ade80;
}

.modal-status-pill.status-progress {
  background: rgba(250, 204, 21, 0.12);
  border: 1.5px solid #facc15;
  color: #facc15;
}

.modal-status-pill.status-locked {
  background: rgba(148, 163, 184, 0.1);
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

.modal-status-pill.status-disabled {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.modal-status-pill.status-retired {
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.modal-status-pill.status-internal {
  background: rgba(45, 212, 191, 0.12);
  border: 1.5px solid rgba(45, 212, 191, 0.35);
  color: #2dd4bf;
}

/* 2-Column Body Layout */
.modal-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 22px;
  margin-top: 22px;
  min-width: 0;
}

.modal-left-column,
.modal-right-column {
  min-width: 0;
}

/* Left Column Panels */
.modal-panel {
  background: rgba(13, 19, 16, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.modal-panel:last-child {
  margin-bottom: 0;
}

.modal-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-panel-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-panel-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Big Counter */
.progress-big-counter {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.progress-big-counter .current-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: #00e676;
  line-height: 1;
}

.progress-big-counter .divider-num {
  font-size: 1.65rem;
  font-weight: 600;
  color: #64748b;
}

.progress-big-counter .target-num {
  font-size: 1.65rem;
  font-weight: 700;
  color: #94a3b8;
}

.progress-activity-label {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-bottom: 14px;
}

.progress-track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-progress-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.modal-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #10b981 0%, #00e676 100%);
  transition: width 0.4s ease;
}

.modal-progress-pct {
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.progress-remaining-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.progress-remaining-line strong {
  color: #ffd700;
}

/* Tier Milestones (4-card Grid) */
.tier-milestones-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.tier-milestone-card {
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.15s ease;
}

.tier-milestone-card:hover {
  transform: translateY(-2px);
}

/* 1. Passed Tier (Green) */
.tier-milestone-card.is-passed {
  background: rgba(74, 222, 128, 0.06);
  border: 1.5px solid rgba(74, 222, 128, 0.45);
}
.tier-milestone-card.is-passed .tier-top-pill {
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 700;
}
.tier-milestone-card.is-passed .tier-thresh-num {
  color: #4ade80;
  font-size: 1.25rem;
  font-weight: 800;
}
.tier-milestone-card.is-passed .tier-name-label {
  color: #94a3b8;
  font-size: 0.75rem;
}

/* 2. Current Tier (Metallic: Bronze, Silver, Gold, Default) */
.tier-milestone-card.is-current.is-bronze {
  background: rgba(217, 119, 6, 0.12);
  border: 1.5px solid #d97706;
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.25);
}
.tier-milestone-card.is-current.is-bronze .tier-top-pill {
  color: #f59e0b;
  font-size: 0.75rem;
  font-weight: 700;
}
.tier-milestone-card.is-current.is-bronze .tier-thresh-num {
  color: #f59e0b;
  font-size: 1.25rem;
  font-weight: 800;
}
.tier-milestone-card.is-current.is-bronze .tier-name-label {
  color: #f59e0b;
  font-size: 0.75rem;
  font-weight: 600;
}

.tier-milestone-card.is-current.is-silver {
  background: rgba(226, 232, 240, 0.12);
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 0 16px rgba(226, 232, 240, 0.2);
}
.tier-milestone-card.is-current.is-silver .tier-top-pill {
  color: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
}
.tier-milestone-card.is-current.is-silver .tier-thresh-num {
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 800;
}
.tier-milestone-card.is-current.is-silver .tier-name-label {
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
}

.tier-milestone-card.is-current.is-gold {
  background: rgba(234, 179, 8, 0.15);
  border: 1.5px solid #eab308;
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.3);
}
.tier-milestone-card.is-current.is-gold .tier-top-pill {
  color: #fde047;
  font-size: 0.75rem;
  font-weight: 700;
}
.tier-milestone-card.is-current.is-gold .tier-thresh-num {
  color: #fde047;
  font-size: 1.25rem;
  font-weight: 800;
}
.tier-milestone-card.is-current.is-gold .tier-name-label {
  color: #fde047;
  font-size: 0.75rem;
  font-weight: 600;
}

.tier-milestone-card.is-current.is-default {
  background: rgba(74, 222, 128, 0.12);
  border: 1.5px solid #4ade80;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.25);
}
.tier-milestone-card.is-current.is-default .tier-top-pill {
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 700;
}
.tier-milestone-card.is-current.is-default .tier-thresh-num {
  color: #4ade80;
  font-size: 1.25rem;
  font-weight: 800;
}
.tier-milestone-card.is-current.is-default .tier-name-label {
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 600;
}

/* 3. Next Target Tier */
.tier-milestone-card.is-next {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(226, 232, 240, 0.4);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.04);
}
.tier-milestone-card.is-next .tier-top-pill {
  color: #94a3b8;
  font-size: 0.75rem;
}
.tier-milestone-card.is-next .tier-thresh-num {
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 800;
}
.tier-milestone-card.is-next .tier-name-label {
  color: #94a3b8;
  font-size: 0.75rem;
}

/* 4. Locked Future Tiers */
.tier-milestone-card.is-locked {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.65;
}
.tier-milestone-card.is-locked .tier-top-pill {
  color: #64748b;
  font-size: 0.75rem;
}
.tier-milestone-card.is-locked .tier-thresh-num {
  color: #94a3b8;
  font-size: 1.25rem;
  font-weight: 700;
}
.tier-milestone-card.is-locked .tier-name-label {
  color: #64748b;
  font-size: 0.75rem;
}

/* Single-Tier Panel */
.single-tier-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.single-tier-status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}
.single-tier-status-box.is-earned {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.06);
}
.single-tier-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}
.single-tier-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-top: 4px;
  line-height: 1.45;
}

/* Milestone History */
.milestone-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.milestone-history-item {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.milestone-history-item:hover {
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(74, 222, 128, 0.3);
}

.milestone-history-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.milestone-history-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
  flex-shrink: 0;
}

.milestone-history-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.milestone-history-link {
  color: #4ade80;
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.milestone-history-link:hover {
  text-decoration: underline;
}

.milestone-history-label {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 2px;
}

.milestone-history-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.milestone-empty {
  color: #64748b;
  font-size: 0.82rem;
  font-style: italic;
  padding: 8px 0;
}

/* Right Column */
.modal-info-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-info-section h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
}

.modal-info-section p {
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

/* Tips Checklist */
.tips-checklist {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tips-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.tip-check-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #4ade80;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* Note Callout Card */
.modal-note-card {
  background: rgba(234, 179, 8, 0.05);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 4px;
}

.note-icon {
  color: #facc15;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.note-text {
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.note-text strong {
  color: #facc15;
}

/* Footer */
.modal-detail-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 22px;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-top-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: #94a3b8;
}

.footer-source-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-separator {
  color: #475569;
}

.footer-disclosure-text {
  font-size: 0.72rem;
  color: #64748b;
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .modal-backdrop {
    padding: 12px 10px;
  }
  .modal-detail-card {
    width: 100%;
    padding: 20px 14px;
    max-height: 94vh;
  }
  .modal-detail-header {
    gap: 12px;
    padding-bottom: 14px;
    padding-right: 36px;
  }
  .modal-badge-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
  }
  .modal-header-title {
    font-size: 1.3rem;
  }
  .modal-detail-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 14px;
  }
  .modal-panel {
    padding: 14px 14px;
  }
  .tier-milestones-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .milestone-history-item {
    padding: 10px 10px;
    gap: 8px;
  }
}

/* Notification Toast */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(18, 26, 20, 0.95);
  border: 1.5px solid var(--green-bright);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 150;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-notice.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  padding: 30px 0 50px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer a {
  color: var(--green-bright);
  text-decoration: none;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1100px) {
  .achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .dashboard-row {
    grid-template-columns: 1fr 1fr;
  }

  .next-up-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .container {
    width: min(100%, 100% - 32px);
  }

  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
    padding: 20px 0 28px;
  }

  .hero-mascot-col {
    order: -1;
  }

  .mascot-wrap {
    width: 180px;
    height: auto;
    aspect-ratio: 384 / 312;
  }

  .hero-orbit-col {
    display: none;
  }

  .dashboard-row {
    grid-template-columns: 1fr;
  }

  .site-navbar {
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media (max-width: 600px) {
  .container {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .search-form {
    width: 100%;
    max-width: 100%;
  }

  .search-bar {
    padding: 6px 8px;
    flex-wrap: wrap;
    gap: 8px;
    border-radius: var(--radius-md);
  }

  .search-input {
    font-size: 0.88rem;
    min-width: 140px;
    flex: 1 1 160px;
  }

  .btn-analyze {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .btn-refresh {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .search-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
  }

  .metric-subcards {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .metric-box {
    padding: 10px 8px;
    gap: 6px;
  }

  .metric-badge-icon {
    width: 26px;
    height: 26px;
    font-size: 0.9rem;
  }

  .metric-val {
    font-size: 1.1rem;
  }

  .metric-name {
    font-size: 0.7rem;
  }

  .achievements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .nav-item {
    padding: 5px 12px;
    font-size: 0.82rem;
  }

  .modal-card {
    padding: 20px 16px;
  }
}

@media (max-width: 400px) {
  .metric-subcards {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   H. Live Production Tracker Controls & States
   ========================================================================== */

/* Rate Limit Pill */
.rate-limit-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(18, 24, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.rate-limit-pill:hover {
  border-color: rgba(74, 222, 128, 0.3);
  color: var(--text-white);
}

.rate-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-emerald);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  animation: pulseDot 2s infinite ease-in-out;
}

.rate-dot.is-warning {
  background: var(--yellow-sun);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

.rate-dot.is-exhausted {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Refresh Button */
.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh:hover:not(:disabled) {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--green-lime);
  transform: translateY(-1px);
}

.btn-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-refresh svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 0.4s ease;
}

.btn-refresh:hover svg {
  transform: rotate(180deg);
}

/* Welcome / Initial Empty State Card */
.welcome-card {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 44px 32px;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 24px -6px rgba(74, 222, 128, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.4s ease;
}

.welcome-icon {
  font-size: 2.5rem;
  margin-bottom: 4px;
}

.welcome-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
}

.welcome-title .highlight {
  color: var(--green-lime);
  text-shadow: 0 0 16px rgba(187, 244, 82, 0.4);
}

.welcome-desc {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.welcome-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.suggestion-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

.suggestion-btn {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: var(--green-bright);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-btn:hover {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--text-white);
  transform: translateY(-1px);
}

/* Error Banner */
.error-banner {
  grid-column: 1 / -1;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  animation: fadeIn 0.3s ease;
}

.error-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.error-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 6px;
}

.error-content p {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(10, 17, 13, 0.3);
  border-top-color: #0a110d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Live timestamp on profile card */
.profile-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.badge-cors-notice {
  display: inline-block;
  font-size: 0.68rem;
  color: #38bdf8;
  margin-top: 4px;
  text-decoration: underline;
  cursor: pointer;
}


/* =========================================================================
   Phase 4: Live Activity Counters & Milestone History Styles
   ========================================================================= */

.confidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.confidence-verified {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green-bright);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.confidence-verified_minimum {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.confidence-unavailable {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.confidence-not_applicable {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.modal-milestones-box {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.modal-milestones-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.modal-milestone-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-milestone-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-primary);
  flex-wrap: wrap;
}

.modal-milestone-item a {
  color: var(--green-lime);
  text-decoration: none;
  font-weight: 600;
}

.modal-milestone-item a:hover {
  text-decoration: underline;
}

.modal-milestone-item span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.modal-disclosure {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 8px;
  font-style: italic;
}
