/* 优化后的简历网站样式 - 性能优化版 */
:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --bg-blob-1: #c084fc;
  --bg-blob-2: #6366f1;
  --bg-blob-3: #38bdf8;
  --font-stack: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  --blur-amt: 20px;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #4b5563;
  --bg-primary: #f3f4f6;
  --bg-secondary: #f0f2f5;
  --border-light: rgba(0,0,0,0.05);
  --shadow-light: rgba(0,0,0,0.05);
  --shadow-medium: rgba(0,0,0,0.1);
}

/* 暗色模式变量 */
[data-theme="dark"] {
  --primary: #818cf8;
  --primary-light: #a5b4fc;
  --accent: #22d3ee;
  --bg-blob-1: #7c3aed;
  --bg-blob-2: #4f46e5;
  --bg-blob-3: #0891b2;
  --glass-bg: rgba(31, 41, 55, 0.75);
  --glass-border: rgba(75, 85, 99, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --border-light: rgba(255,255,255,0.05);
  --shadow-light: rgba(0,0,0,0.2);
  --shadow-medium: rgba(0,0,0,0.3);
}

/* 全局重置和优化 */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  line-height: 1.6;
  color: var(--text-primary);
  min-height: 100vh;
  padding: 20px;
  background-color: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-display: swap;
}

/* 动态背景 - 性能优化 */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-secondary);
  contain: layout style paint;
}

.shape {
  position: absolute;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 10s infinite ease-in-out;
  border-radius: 50%;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.shape-1 {
  top: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: var(--bg-blob-1);
  animation-delay: 0s;
}

.shape-2 {
  bottom: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: var(--bg-blob-2);
  animation-delay: -2s;
}

.shape-3 {
  top: 40%;
  left: 40%;
  width: 300px;
  height: 300px;
  background: var(--bg-blob-3);
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { 
    transform: translate(0, 0) scale(1) rotate(0deg); 
  }
  25% { 
    transform: translate(20px, -30px) scale(1.05) rotate(2deg); 
  }
  50% { 
    transform: translate(-15px, 15px) scale(0.95) rotate(-1deg); 
  }
  75% { 
    transform: translate(10px, 20px) scale(1.02) rotate(1deg); 
  }
}

/* 毛玻璃容器 - 增强版 */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amt));
  -webkit-backdrop-filter: blur(var(--blur-amt));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.15);
  transform: translateY(-2px);
}

.resume-container {
  max-width: 1000px;
  margin: 20px auto;
  overflow: hidden;
  position: relative;
  animation: containerFadeIn 0.8s ease-out;
}

@keyframes containerFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 头部样式 - 优化 */
.header {
  padding: 60px 40px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
  text-align: center;
  position: relative;
}

[data-theme="dark"] .header {
  background: linear-gradient(180deg, rgba(55, 65, 81, 0.5) 0%, rgba(55, 65, 81, 0) 100%);
}

.profile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.profile-img {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  background: #f0f0f0;
}

[data-theme="dark"] .profile-img {
  border-color: rgba(75, 85, 99, 0.8);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.profile-img:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  filter: none;
  transition: opacity 0.3s ease;
}

.name {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  letter-spacing: 1px;
  animation: nameSlideIn 1s ease-out 0.3s both;
}

@keyframes nameSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  animation: tagsFadeIn 1s ease-out 0.6s both;
}

@keyframes tagsFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tag {
  padding: 6px 16px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(79, 70, 229, 0.2);
  transition: all 0.3s ease;
  cursor: default;
}

.tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

/* 内容区域 */
.content {
  padding: 0 40px 40px;
}

.section {
  margin-bottom: 40px;
  animation: sectionFadeIn 0.8s ease-out;
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 10px;
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.section-header .icon {
  font-size: 1.8rem;
  margin-right: 15px;
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.section-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 700;
  transition: color 0.3s ease;
}

/* 基本信息卡片网格 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.info-card {
  background: rgba(255,255,255,0.5);
  padding: 15px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.6);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: cardSlideIn 0.6s ease-out;
  animation-fill-mode: both;
}

[data-theme="dark"] .info-card {
  background: rgba(55, 65, 81, 0.5);
  border-color: rgba(75, 85, 99, 0.6);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }
.info-card:nth-child(4) { animation-delay: 0.4s; }
.info-card:nth-child(5) { animation-delay: 0.5s; }
.info-card:nth-child(6) { animation-delay: 0.6s; }
.info-card:nth-child(7) { animation-delay: 0.7s; }
.info-card:nth-child(8) { animation-delay: 0.8s; }

.info-card:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px var(--shadow-light);
  border-color: var(--primary-light);
}

[data-theme="dark"] .info-card:hover {
  background: rgba(75, 85, 99, 0.7);
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.info-card:hover::before {
  left: 100%;
}

.info-card .label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-card .value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  transition: color 0.3s ease;
}


/* 荣誉区域 */
.honor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.category-title {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.category-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.honor-list {
  list-style: none;
}

.honor-item {
  background: rgba(255,255,255,0.4);
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-tertiary);
  border-left: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: zoom-in;
  animation: honorSlideIn 0.5s ease-out;
  animation-fill-mode: both;
}

[data-theme="dark"] .honor-item {
  background: rgba(55, 65, 81, 0.4);
  color: var(--text-secondary);
}

.honor-item:nth-child(1) { animation-delay: 0.1s; }
.honor-item:nth-child(2) { animation-delay: 0.15s; }
.honor-item:nth-child(3) { animation-delay: 0.2s; }
.honor-item:nth-child(4) { animation-delay: 0.25s; }
.honor-item:nth-child(5) { animation-delay: 0.3s; }
.honor-item:nth-child(6) { animation-delay: 0.35s; }
.honor-item:nth-child(7) { animation-delay: 0.4s; }
.honor-item:nth-child(8) { animation-delay: 0.45s; }
.honor-item:nth-child(9) { animation-delay: 0.5s; }

@keyframes honorSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.honor-item:hover {
  background: white;
  border-left-color: var(--accent);
  padding-left: 20px;
  box-shadow: 0 8px 20px var(--shadow-light);
  transform: translateX(5px);
}

[data-theme="dark"] .honor-item:hover {
  background: #374151;
}


/* 底部 & 备案 */
.footer {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  animation: footerFadeIn 0.8s ease-out 0.5s both;
}

@keyframes footerFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.beian-info {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.4);
  padding: 8px 20px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

[data-theme="dark"] .beian-info {
  background: rgba(55, 65, 81, 0.4);
}

.beian-info:hover {
  background: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

[data-theme="dark"] .beian-info:hover {
  background: rgba(75, 85, 99, 0.6);
}

.beian-info a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.beian-info a:hover {
  color: var(--primary);
}

.beian-info img {
  height: 16px;
  width: 16px;
}

.divider {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* 动画 & 模态框 */
.fade-in-up {
  animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(40px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 通知样式 */
.glass-notice {
  position: fixed;
  top: -60px;
  left: 50%;
  margin-left: -150px;
  width: 300px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 12px 30px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  color: var(--primary);
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid white;
  will-change: top, opacity;
  transition: none;
  text-align: center;
}

.glass-notice.show {
  animation: noticeSlideDown 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes noticeSlideDown {
  0% { 
    opacity: 0; 
    top: -60px;
  }
  50% {
    opacity: 0.8;
  }
  100% { 
    opacity: 1; 
    top: 30px;
  }
}

.glass-notice.fade-out {
  animation: noticeSlideUp 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes noticeSlideUp {
  0% { 
    opacity: 1; 
    top: 30px;
  }
  100% { 
    opacity: 0; 
    top: -60px;
  }
}

/* 模态框 */
.photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.modal-content {
  background: white;
  padding: 10px;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.9);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  will-change: transform;
}

@keyframes popIn {
  to { transform: scale(1); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* 加载状态样式 */
.image-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-secondary);
  z-index: 10;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 8px;
}

.loading-text {
  font-size: 0.75rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.profile-img img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* 模态框加载状态 */
.modal-content.loading {
  min-width: 200px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.modal-content.loading .spinner {
  width: 32px;
  height: 32px;
  margin: 0;
}

.modal-content.loading div:last-child {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 键盘导航样式 */
.keyboard-nav *:focus {
  outline: 2px solid var(--primary) !important;
  outline-offset: 2px;
}

/* 优化动画性能 */
.shape,
.info-card,
.tag,
.honor-item,
.profile-img,
.scroll-reveal,
.glass-notice,
.modal-content,
.skill-progress,
.project-card {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 响应式适配 */
@media (max-width: 1024px) {
  .honor-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .header { 
    padding: 40px 20px; 
  }
  
  .profile-img { 
    width: 120px; 
    height: 120px; 
  }
  
  .name { 
    font-size: 2rem; 
  }
  
  .content { 
    padding: 0 20px 30px; 
  }
  
  .info-grid { 
    grid-template-columns: 1fr 1fr; 
    gap: 10px;
  }
  
  .info-card {
    padding: 12px 15px;
  }
  
  .section-header {
    margin-bottom: 20px;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .project-card {
    padding: 20px;
  }
  
  .contact-form {
    padding: 20px;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .info-grid { 
    grid-template-columns: 1fr; 
  }
  
  .title {
    gap: 8px;
  }
  
  .tag {
    padding: 4px 12px;
    font-size: 0.85rem;
  }
  
  .project-tags {
    gap: 6px;
  }
  
  .project-tag {
    padding: 3px 10px;
    font-size: 0.8rem;
  }
  
  .honor-container {
    gap: 20px;
  }
  
  .honor-item {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.3);
  }
  
  [data-theme="dark"] {
    --glass-bg: rgba(0, 0, 0, 0.9);
    --glass-border: rgba(255, 255, 255, 0.3);
  }
}

/* 打印样式 */
@media print {
  .ambient-bg,
  .theme-toggle,
  .back-to-top,
  .glass-notice,
  .photo-modal {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .glass-panel {
    background: white !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* 关键CSS内联 - 首屏渲染优化 */
:root{--primary:#4f46e5;--primary-light:#818cf8;--glass-bg:rgba(255,255,255,0.65);--glass-border:rgba(255,255,255,0.4)}
body{margin:0;font-family:"PingFang SC","Microsoft YaHei",sans-serif;background:#f3f4f6}
.resume-container{max-width:1000px;margin:20px auto;padding:20px}
.glass-panel{background:var(--glass-bg);backdrop-filter:blur(20px);border:1px solid var(--glass-border);border-radius:24px;box-shadow:0 8px 32px rgba(31,38,135,0.1)}

/* 暗色模式变量 */
[data-theme="dark"] {
  --primary: #818cf8;
  --primary-light: #a5b4fc;
  --accent: #22d3ee;
  --bg-blob-1: #7c3aed;
  --bg-blob-2: #4f46e5;
  --bg-blob-3: #0891b2;
  --glass-bg: rgba(31, 41, 55, 0.75);
  --glass-border: rgba(75, 85, 99, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] body {
  background-color: #111827;
  color: #f9fafb;
}

[data-theme="dark"] .name {
  background: linear-gradient(135deg, #e0e7ff 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .section-title {
  color: #f3f4f6;
}

[data-theme="dark"] .info-card {
  background: rgba(55, 65, 81, 0.5);
  border-color: rgba(75, 85, 99, 0.6);
}

[data-theme="dark"] .info-card .value {
  color: #f9fafb;
}

[data-theme="dark"] .honor-item {
  background: rgba(55, 65, 81, 0.4);
  color: #d1d5db;
}

[data-theme="dark"] .glass-notice {
  background: rgba(31, 41, 55, 0.9);
  color: #a5b4fc;
}

[data-theme="dark"] .modal-content {
  background: #1f2937;
  color: #f9fafb;
}

/* 暗色模式切换按钮 */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}


/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* 优化响应式 */
@media (max-width: 768px) {
  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .contact-form {
    padding: 20px;
  }
  
  .project-card {
    padding: 20px;
  }
}
