/* ================ CSS Variables ================ */
:root {
  /* Light Theme Colors - Anime Edition */
  --bg-primary: #f8f0ff;
  --bg-secondary: #f0e6ff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 245, 255, 0.88);
  
  --text-primary: #1a1040;
  --text-secondary: #5a4a7a;
  --text-muted: #8a7aaa;
  
  --accent-primary: #ff6b9d;
  --accent-secondary: #6a5af9;
  --accent-gradient: linear-gradient(135deg, #ff6b9d 0%, #6a5af9 100%);
  --accent-pink: #ff6b9d;
  --accent-cyan: #00d4ff;
  --accent-green: #10b981;
  --accent-orange: #ff8e53;
  --accent-gold: #ffd700;
  
  --border-color: #e8d8f0;
  --border-light: #f8f0ff;
  
  --shadow-sm: 0 2px 4px rgba(106, 90, 249, 0.08);
  --shadow-md: 0 4px 8px rgba(106, 90, 249, 0.12);
  --shadow-lg: 0 8px 24px rgba(106, 90, 249, 0.16);
  --shadow-xl: 0 16px 40px rgba(106, 90, 249, 0.2);
  --shadow-glow: 0 0 40px rgba(255, 107, 157, 0.35);
  
  /* Layout */
  --nav-height: 70px;
  --container-max: 1400px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-normal: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-slow: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Theme - Anime Edition */
[data-theme="dark"] {
  --bg-primary: #0f0c29;
  --bg-secondary: #1a1540;
  --bg-card: #1a1540;
  --bg-glass: rgba(26, 21, 64, 0.92);
  
  --text-primary: #f8f0ff;
  --text-secondary: #b8a8ff;
  --text-muted: #7a6aaa;
  
  --border-color: #3a3270;
  --border-light: #1a1540;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(106, 90, 249, 0.25);
  --shadow-lg: 0 8px 24px rgba(106, 90, 249, 0.3);
  --shadow-xl: 0 16px 40px rgba(106, 90, 249, 0.35);
  --shadow-glow: 0 0 60px rgba(255, 107, 157, 0.45);
}

/* ================ Reset & Base ================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ================ Typography ================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-secondary);
}

/* ================ Container ================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

/* ================ Loading Screen ================ */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.loader {
  text-align: center;
}

.loader-inner {
  position: relative;
}

.scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    transparent 50%,
    rgba(102, 126, 234, 0.05) 50%
  );
  background-size: 100% 4px;
  animation: scanline 0.1s linear infinite;
  pointer-events: none;
}

@keyframes scanline {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

.ascii-art {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-primary);
  line-height: 1.2;
  white-space: pre;
  animation: flicker 0.1s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.95; }
}

/* ================ Background Effects ================ */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

#particles-canvas {
  position: absolute;
  width: 100%;
  height: 100%;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-pink);
  bottom: -50px;
  left: -50px;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

/* ================ Navigation ================ */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.main-nav.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.logo-text .accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.nav-link i {
  font-size: 1rem;
}

.nav-link:hover,
.nav-link.router-link-active {
  color: var(--accent-primary);
  background: var(--bg-secondary);
}

.nav-link.router-link-exact-active {
  color: white;
  background: var(--accent-gradient);
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin: 0 0.5rem;
}

.theme-toggle,
.music-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover,
.music-toggle:hover {
  background: var(--accent-primary);
  color: white;
  transform: rotate(15deg);
}

.music-toggle.playing {
  background: var(--accent-primary);
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ================ Main Content ================ */
.main-content {
  min-height: 100vh;
  padding-top: var(--nav-height);
}

/* ================ Hero Section ================ */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  width: 100%;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.hero-badge i {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-title .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-typing {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--accent-cyan);
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-cyan);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-md), 0 0 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  transform: translateY(-2px);
}

.btn-tertiary {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn-tertiary:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

/* Hero visual styles moved to components.css */

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Floating Elements around Hero */
.hero-float-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.float-element {
  position: absolute;
  font-size: 2rem;
  animation: floatElement 6s ease-in-out infinite;
}

.float-element:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.float-element:nth-child(2) { top: 20%; right: 15%; animation-delay: -2s; }
.float-element:nth-child(3) { bottom: 30%; left: 5%; animation-delay: -4s; }
.float-element:nth-child(4) { bottom: 15%; right: 10%; animation-delay: -1s; }
.float-element:nth-child(5) { top: 40%; left: 20%; animation-delay: -3s; }

@keyframes floatElement {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* ================ Cards ================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ================ Section Headers ================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
}

/* ================ Grid Layouts ================ */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ================ Blog Cards ================ */
.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.blog-card-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

/* 图片加载失败时隐藏默认图标 */
.blog-card-image img[src=""],
.blog-card-image img:not([src]) {
  opacity: 0;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-overlay {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.blog-card-overlay-bottom {
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.read-time-overlay {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.read-time-overlay i {
  font-size: 0.75rem;
}

.blog-card-tag {
  padding: 0.2rem 0.6rem;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.blog-card-content {
  padding: 1.25rem;
}

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.read-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.read-time i {
  margin-right: 0.25rem;
}

/* ================ Project Cards ================ */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  transition: all var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.project-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

.project-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.project-link:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
}

.project-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.project-stats {
  display: flex;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.project-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.project-stat i {
  color: var(--text-secondary);
}

/* ================ Timeline ================ */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: calc(50% - 40px);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  background: var(--accent-gradient);
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  transform: translateX(-50%);
  z-index: 1;
}

/* ================ Tools Page ================ */
.tool-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.tool-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--accent-gradient);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  transition: all var(--transition-normal);
}

.tool-card:hover .tool-icon {
  transform: rotate(10deg) scale(1.1);
}

.tool-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tool-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.tool-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-green);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
}

.tool-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
}

/* ================ Forms ================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ================ Footer ================ */
.main-footer {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-card) 100%);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 0;
  margin-top: 6rem;
  position: relative;
  overflow: hidden;
}

/* 顶部渐变装饰线 */
.footer-glow-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--accent-primary) 20%, 
    var(--accent-cyan) 50%, 
    var(--accent-pink) 80%, 
    transparent 100%);
  opacity: 0.6;
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 3rem;
}

/* 品牌区域 */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.logo-text-main {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-bio {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-line {
  padding: 0.35rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* GitHub Stats 卡片 */
.github-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.github-stats:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-left,
.stat-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-left i,
.stat-right i {
  font-size: 1.25rem;
  color: var(--accent-primary);
}

.stat-left .stat-value,
.stat-right .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-left .stat-label,
.stat-right .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border-color);
}

/* 社交链接 */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1px solid var(--border-color);
  font-size: 1rem;
}

.social-link:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
}

.social-link.github:hover {
  background: #24292e;
  border-color: #24292e;
  color: white;
}

.social-link.bilibili:hover {
  background: linear-gradient(135deg, #fb7299, #fc9bcc);
  border-color: #fb7299;
  color: white;
}

.social-link.twitter:hover {
  background: #000;
  border-color: #000;
  color: white;
}

/* 导航区域 */
.footer-nav h4,
.footer-stats h4,
.footer-clock h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-nav h4 i,
.footer-stats h4 i,
.footer-clock h4 i {
  color: var(--accent-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.footer-links li a i {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links li a:hover {
  color: var(--accent-primary);
  transform: translateX(5px);
}

.footer-links li a:hover i {
  color: var(--accent-primary);
}

/* 站点统计 */
.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.stat-item i {
  font-size: 1.25rem;
  color: var(--accent-primary);
  width: 24px;
  text-align: center;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-content .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-content .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 时钟区域 */
.realtime-clock {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.clock-time {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.clock-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 底部区域 */
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  background: var(--bg-card);
}

.footer-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.badge-item i {
  color: var(--accent-primary);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.heart {
  color: #ef4444;
  animation: heartbeat 1s infinite;
  display: inline-block;
}

.code {
  color: var(--accent-primary);
  display: inline-block;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ================ Music Player ================ */
.music-player {
  position: fixed;
  z-index: 999;
}

.music-player:not(.expanded) {
  bottom: 1.5rem;
  right: 1.5rem;
}

.music-player.expanded {
  bottom: 0;
  right: 0;
  width: 350px;
  height: auto;
  max-height: 80vh;
}

.player-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 0.5rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.player-mini:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.player-cover {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.player-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.player-btn:hover {
  transform: scale(1.1);
}

/* Full Player */
.player-full {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.player-title-full {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.player-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.player-close:hover {
  background: var(--accent-primary);
  color: white;
}

.player-visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 40px;
  margin-bottom: 1.5rem;
}

.visualizer-bar {
  width: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: height 0.1s ease;
}

.player-cover-large {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.player-cover-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-details {
  text-align: center;
  margin-bottom: 1.5rem;
}

.player-song-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.player-song-artist {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.player-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.time-current,
.time-total {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.player-controls button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.player-controls button:hover {
  background: var(--accent-primary);
  color: white;
}

.player-controls .play-btn {
  width: 64px;
  height: 64px;
  background: var(--accent-gradient);
  color: white;
  font-size: 1.5rem;
}

.player-controls .play-btn:hover {
  transform: scale(1.1);
}

.player-playlist {
  max-height: 200px;
  overflow-y: auto;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.playlist-item:hover {
  background: var(--bg-secondary);
}

.playlist-item.active {
  background: rgba(102, 126, 234, 0.1);
}

.playlist-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 24px;
}

.playlist-item.active .playlist-num {
  color: var(--accent-primary);
}

.playlist-name {
  font-size: 0.95rem;
}

/* ================ Kanban Character ================ */
.kanban-wrapper {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 998;
  cursor: pointer;
}

.kanban-speech {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 250px;
  animation: speechBounce 0.3s ease;
}

.kanban-speech p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.speech-arrow {
  position: absolute;
  bottom: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bg-card);
}

@keyframes speechBounce {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.kanban-character {
  position: relative;
  width: 100px;
  height: auto;
  transition: all var(--transition-normal);
}

.kanban-character img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

.kanban-idle {
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 60px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.2) 0%, transparent 70%);
  transform: translateX(-50%);
  animation: idleBounce 2s ease-in-out infinite;
}

@keyframes idleBounce {
  0%, 100% { transform: translateX(-50%) scaleX(1); }
  50% { transform: translateX(-50%) scaleX(0.9); }
}

/* ================ Easter Egg ================ */
.easter-egg-trigger {
  position: fixed;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  z-index: 100;
  cursor: crosshair;
}

/* ================ Toast Notifications ================ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--accent-primary);
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left-color: var(--accent-green);
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.warning {
  border-left-color: var(--accent-orange);
}

.toast-icon {
  font-size: 1.25rem;
}

.toast.success .toast-icon { color: var(--accent-green); }
.toast.error .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: var(--accent-orange); }

.toast-message {
  font-size: 0.95rem;
  color: var(--text-primary);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-enter-active {
  animation: slideIn 0.3s ease;
}

.toast-leave-active {
  animation: slideOut 0.3s ease;
}

@keyframes slideOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ================ Page Transitions ================ */
.page-enter-active,
.page-leave-active {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-enter-from {
  opacity: 0;
  transform: translateY(20px);
}

.page-leave-to {
  opacity: 0;
  transform: translateY(-20px);
}

/* ================ Special Components ================ */

/* Terminal Window */
.terminal-window {
  background: #1e1e2e;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.terminal-header {
  background: #181825;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #f38ba8; }
.terminal-dot.yellow { background: #f9e2af; }
.terminal-dot.green { background: #a6e3a1; }

.terminal-title {
  flex: 1;
  text-align: center;
  color: #cdd6f4;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #cdd6f4;
  line-height: 1.8;
  min-height: 200px;
}

.terminal-prompt {
  color: #89b4fa;
}

.terminal-command {
  color: #f5c2e7;
}

.terminal-output {
  color: #cdd6f4;
}

/* Glass Card */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

/* Gradient Border */
.gradient-border {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: var(--accent-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* Selection */
::selection {
  background: rgba(102, 126, 234, 0.3);
  color: var(--text-primary);
}

/* Focus Outline */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Utility Classes */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden { display: none; }
.visible { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
