@font-face {
  font-family: 'MinecraftAE';
  src: url('MinecraftAE.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #3b82f6;
  --secondary-color: #64748b;
  --background-color: #ffffff;
  --surface-color: #f8fafc;
  --text-color: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --green: #10b981;
  --red: #ef4444;
  --pink: #ec4899;
  --orange: #f97316;
  --purple: #8b5cf6;
  --indigo: #6366f1;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.dark {
  --primary-color: #60a5fa;
  --secondary-color: #94a3b8;
  --background-color: #0f172a;
  --surface-color: #1e293b;
  --text-color: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

.dark .navbar {
  background: rgba(30, 41, 59, 0.4);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.dark .card,
.dark .project-card {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

body {
  font-family: 'MinecraftAE', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  transition: all 0.3s ease;
  position: relative;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.nav-logo .logo-text:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.github-link {
  background: var(--primary-color);
  color: white !important;
}

.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: scale(1.05) rotate(-5deg);
}


.intro-section {
  padding: 120px 0 80px;
  background: var(--background-color);
  transition: all 0.3s ease;
}

.intro-content {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.intro-section .card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 30px;
  text-align: left;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dark .intro-section .card {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.avatar-container {
  margin-bottom: 30px;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.name {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-color);
}

.signature {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 50px;
}

.intro-section .cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 50px;
  width: 100%;
  justify-content: center;
}

.intro-section .cards-container .card {
  width: 350px;
  flex-grow: 0;
  flex-shrink: 0;
  margin: 0;
}

@media (max-width: 1200px) {
  .intro-section .cards-container .card {
    width: calc(50% - 10px);
    flex-grow: 0;
  }
}

@media (max-width: 768px) {
  .intro-section .cards-container .card {
    width: 100%;
    margin-bottom: 20px;
  }
}

.card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.7);
}

.dark .card:hover {
  border-color: rgba(51, 65, 85, 0.8);
}

.docs-card {
  position: relative;
  overflow: hidden;
}

.docs-features {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.docs-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.docs-feature:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.docs-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 15px;
}

.docs-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.location {
  margin-top: 15px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.languages-chart {
  space-y: 15px;
}

.language-item {
  margin-bottom: 15px;
}

.language-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.language-name {
  font-weight: 500;
  color: var(--text-color);
}

.language-percentage {
  color: var(--text-secondary);
}

.language-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.language-progress {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}


.starmap-section {
  position: relative;
  padding: 80px 0;
  background: var(--surface-color);
  transition: all 0.3s ease;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  color: var(--text-color);
}

.starmap-container {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, #f1f5f9 0%, #e2e8f0 100%);
  overflow: hidden;
  background-size: 200% 200%;
}

.dark .starmap-container {
  background: radial-gradient(ellipse at center, #334155 0%, #0f172a 100%);
  background-size: 200% 200%;
}

.starmap {
  width: 100%;
  height: 300px;
  transition: all 0.3s ease;
  cursor: grab;
}

.starmap:active {
  cursor: grabbing;
}

.project-star,
.center-star {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  filter: drop-shadow(0 0 4px currentColor);
  transform-origin: center;
}

.center-star {
  filter: drop-shadow(0 0 8px currentColor);
  animation: pulse-center 3s infinite ease-in-out;
}

@keyframes pulse-center {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.center-star:hover,
.project-star:hover {
  filter: drop-shadow(0 0 15px currentColor) brightness(1.2);

}

.github-center {
  fill: #6366f1;
}

.personal-center {
  fill: #ec4899;
}

.personal-center:hover {
  fill: #db2777;
  filter: drop-shadow(0 0 20px #ec4899);
}

.bilibili-center {
  fill: #00a1d6;
}

.bilibili-center:hover {
  fill: #0891b2;
  filter: drop-shadow(0 0 20px #00a1d6);
}

.language-node {
  fill: #f97316;
}

.connection-line {
  stroke: rgba(100, 116, 139, 0.3);
  stroke-width: 1.5px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  fill: none;
  filter: drop-shadow(0 0 2px rgba(100, 116, 139, 0.1));
  stroke-dasharray: 0;
}

.links-group path[d*="center"] {
  stroke: rgba(99, 102, 241, 0.4);
  stroke-width: 2px;
  filter: drop-shadow(0 0 3px rgba(99, 102, 241, 0.2));
}

.connection-line:hover {
  stroke: rgba(100, 116, 139, 0.9);
  stroke-width: 3px;
  filter: drop-shadow(0 0 6px rgba(100, 116, 139, 0.4));
}

.star-label {
  fill: #e5e7eb;
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
  opacity: 0.9;
}

.star-sublabel {
  fill: #94a3b8;
  font-size: 8px;
  pointer-events: none;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
}

.project-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.95);
  color: white;
  padding: 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  max-width: 280px;
  z-index: 1000;
  pointer-events: none;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: tooltipSlideIn 0.2s ease-out;
}

@keyframes tooltipSlideIn {
  0% {
    opacity: 0;
    transform: translate(10px, -50%) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translate(15px, -50%) scale(1);
  }
}

.projects-section {
  padding: 80px 0;
  background: var(--background-color);
  transition: all 0.3s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.project-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
}

.project-stats {
  display: flex;
  align-items: center;
  gap: 15px;
}

.project-stats .stars,
.project-stats .forks {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.project-stats .stars i {
  color: #fbbf24;
}

.language {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.language.java {
  background: #f89820;
  color: white;
}

.language.javascript {
  background: #f7df1e;
  color: black;
}

.language.html {
  background: #e34c26;
  color: white;
}

.language.css {
  background: #1572b6;
  color: white;
}

.language.python {
  background: #3776ab;
  color: white;
}

.project-fullname {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-weight: 500;
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 20px;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-status.stable {
  background: #10b981;
  color: white;
}

.project-status.development {
  background: #f59e0b;
  color: white;
}

.project-status.maintenance {
  background: #6366f1;
  color: white;
}

.project-status.template {
  background: #8b5cf6;
  color: white;
}

.project-status.beta {
  background: #ef4444;
  color: white;
}

.more-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 2px dashed var(--border-color);
  background: transparent;
}

.more-card:hover {
  border-color: var(--primary-color);
  background: var(--surface-color);
}

.more-content {
  text-align: center;
}

.more-content i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.more-content h3 {
  color: var(--text-color);
  margin-bottom: 10px;
}

.more-content p {
  color: var(--text-secondary);
}

.about-section {
  padding: 80px 0;
  background: transparent;
  transition: all 0.3s ease;
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-link:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.contact-link.bilibili {
  background: #00a1d6;
}

.contact-link.bilibili:hover {
  background: #0891b2;
}

.contact-link.minebbs {
  background: #f97316;
}

.contact-link.minebbs:hover {
  background: #ea580c;
}

.loading-overlay,
.error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: all 0.3s ease;
}

.loading-overlay.dark,
.error-overlay.dark {
  background: rgba(15, 23, 42, 0.9);
}

.loading-content,
.error-content {
  background: var(--surface-color);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  max-width: 400px;
  margin: 0 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.error-content i {
  font-size: 3rem;
  color: #ef4444;
  margin-bottom: 20px;
}

.error-content h3 {
  color: var(--text-color);
  margin-bottom: 15px;
}

.error-content p {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.retry-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.loading-languages,
.loading-projects {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-secondary);
  padding: 20px;
}

.loading-languages i,
.loading-projects i {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .nav-links {
    gap: 15px;
  }

  .nav-link span {
    display: none;
  }

  .name {
    font-size: 2rem;
  }

  .cards-container {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .starmap-container {
    padding: 20px;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .nav-container {
    padding: 0 15px;
  }

  .intro-section {
    padding: 100px 0 60px;
  }

  .section-title {
    font-size: 2rem;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }
}

.bilibili-section {
  position: relative;
  padding: 80px 0;
  background: var(--surface-color);
  transition: all 0.3s ease;
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.dashboard-header {
  margin-bottom: 40px;
  text-align: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px 40px;
  box-shadow: var(--shadow-hover);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.header-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.header-text h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-text p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  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;
  width: 100%;
  height: 4px;
  background: var(--gradient-tertiary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stat-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover .stat-logo {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  width: fit-content;
  backdrop-filter: blur(10px);
}

.stat-change.positive {
  color: var(--green);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-change.negative {
  color: var(--red);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.change-label {
  color: var(--text-muted);
  margin-left: 4px;
  font-weight: 500;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  align-items: stretch;
}

.chart-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.chart-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-secondary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.chart-card:hover::before {
  transform: scaleX(1);
}

.chart-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-title {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.legend-item:hover {
  background: var(--bg-primary);
  transform: translateY(-1px);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-dot.blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.legend-dot.teal {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.legend-dot.orange {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.legend-dot.pink {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.follower-count {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: auto;
}

.expand-btn {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
}

.expand-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-tertiary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.expand-btn:hover::before {
  opacity: 0.1;
}

.expand-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-hover);
  border-color: var(--blue);
  color: var(--blue);
}

.chart-container {
  height: 300px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.chart-container canvas {
  border-radius: 12px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  position: relative;
}

.modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.modal-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--red);
  color: white;
  border-color: var(--red);
  transform: scale(1.1);
}

.modal-body {
  padding: 24px;
  height: 400px;
}

#modalChart {
  width: 100% !important;
  height: 100% !important;
  border-radius: 12px;
}

.video-performance-section {
  background-color: var(--bg-secondary);
  padding: 24px;
  border-radius: 20px;
  margin-top: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.video-performance-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}

.video-performance-section h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

#video-performance-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-perf-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.video-perf-item:hover {
  background: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.video-perf-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-perf-bar-container {
  width: 150px;
  height: 20px;
  background-color: var(--border-color);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.video-perf-bar {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #fdba74);
  border-radius: 10px;
  transition: width 0.5s ease-out;
  position: relative;
}

.video-perf-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.video-perf-rate {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.video-perf-extra {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  min-width: 60px;
}

#danmaku-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.danmaku {
  position: absolute;
  right: -500px;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  animation-name: danmaku-scroll;
  animation-timing-function: linear;
  animation-iteration-count: 1;
  transition: transform 0.2s ease-in-out;
  pointer-events: auto;
}

.danmaku:hover {
  animation-play-state: paused;
  transform: scale(1.1);
  z-index: 10;
}

@keyframes danmaku-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-2000px);
  }
}

.zhuzhan-icon {
  color: #00a1d6;
}

@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .follower-count {
    margin-left: 0;
    margin-top: 8px;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 20px 16px;
  }

  .header-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 24px;
  }

  .header-text h1 {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
    height: 300px;
  }

  .video-perf-bar-container {
    width: 120px;
  }
}

@media (max-width: 480px) {
  .header-text h1 {
    font-size: 1.75rem;
  }

  .stat-value {
    font-size: 1.875rem;
  }

  .chart-container {
    height: 250px;
  }

  .modal-body {
    height: 250px;
  }

  .video-perf-bar-container {
    width: 100px;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.98);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.02);
    opacity: 1;
  }

  100% {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

.stat-card {
  animation: fadeInUp 0.6s ease-out;
}

.chart-card {
  animation: slideInRight 0.8s ease-out;
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
  animation-delay: 0.4s;
}

.chart-card:nth-child(1) {
  animation-delay: 0.5s;
}

.chart-card:nth-child(2) {
  animation-delay: 0.6s;
}

.loading {
  animation: pulse 2s infinite;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}


body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, hsl(210, 80%, 92%), hsl(300, 80%, 92%), hsl(180, 80%, 90%));
  z-index: -1;
  animation: animated-gradient 20s ease infinite;
  background-size: 400% 400%;
}

body.dark::before {
  background: linear-gradient(120deg, hsl(222, 47%, 15%), hsl(260, 40%, 15%), hsl(222, 47%, 10%));
}

@keyframes animated-gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.comments-section {
  padding: 80px 0;
  background: var(--surface-color);
  transition: all 0.3s ease;
}

.giscus-container {
  margin-top: 50px;
}