/* 马卡龙浅色系配色方案 */
:root {
  --bg: #e7f3ff;
  --text: #444444;
  --text-light: #666666;
  --muted: #999999;
  --primary: #ffd6e7;      /* 马卡龙粉 */
  --secondary: #e7f3ff;    /* 马卡龙蓝 */
  --accent: #fff6cc;       /* 马卡龙黄 */
  --green: #e8f5e8;        /* 马卡龙绿 */
  --purple: #f0e6ff;       /* 马卡龙紫 */
  --pink: #ffe6f0;         /* 浅粉 */
  --border: #e9e9e9;
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.8;
  font-size: 15px;
}

/* 粒子特效画布 */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.9; /* 稍微降低透明度，让特效更自然 */
}

.container {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 20px;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 20px;
  align-items: flex-start;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pdf-download-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pdf-options {
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.pdf-download-group:hover .pdf-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.btn {
  border: 2px solid var(--border);
  background: white;
  color: var(--text);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn.btn-print { 
  background: var(--green);
  border-color: #d4edda;
}
.btn.btn-download { 
  background: var(--accent);
  border-color: #ffe699;
}
.btn.btn-text { 
  background: var(--primary);
  border-color: #ffcce0;
}
.btn.btn-edit { 
  background: var(--purple);
  border-color: #e0d4f7;
}

.btn.btn-pdf-option {
  background: var(--secondary);
  border-color: var(--border);
  font-size: 12px;
  padding: 4px 8px;
  min-width: 50px;
  transition: all 0.2s ease;
}

.btn.btn-pdf-option:hover {
  background: var(--accent);
  border-color: #ffe699;
  transform: translateY(-1px);
}

.btn.btn-pdf-option.active {
  background: var(--accent);
  border-color: #ffe699;
  font-weight: 500;
}

/* 电子简历链接 */
.online-resume-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--secondary);
  border: 2px solid #cce5ff;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.online-resume-link:hover {
  background: #dae9ff;
  border-color: #99ccff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* PDF控制指示器 */
.pdf-control-indicator {
  margin-left: 8px;
  font-size: 12px;
  opacity: 0;
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
}

/* 编辑模式下显示PDF控制指示器 */
.edit-mode .pdf-control-indicator {
  opacity: 0.6;
}

.edit-mode .pdf-control-indicator:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* PDF不可见状态 */
[data-pdf-visible="false"] .pdf-control-indicator {
  opacity: 0.3;
  filter: grayscale(100%);
}

[data-pdf-visible="false"] .pdf-control-indicator::after {
  content: "❌";
  margin-left: 4px;
}

[data-pdf-visible="true"] .pdf-control-indicator::after {
  content: "✅";
  margin-left: 4px;
}

.online-resume-link .link-label {
  font-weight: 500;
  color: var(--text-light);
  font-size: 13px;
}

.online-resume-link a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.online-resume-link a:hover {
  color: #0052a3;
}

/* 备用链接样式 */
.backup-resume-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent);
  border: 2px solid #ffe699;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.backup-resume-link:hover {
  background: #fff0b3;
  border-color: #ffd966;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.backup-resume-link .link-label {
  font-weight: 500;
  color: var(--text-light);
  font-size: 13px;
}

.backup-resume-link a {
  color: #cc5500;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.backup-resume-link a:hover {
  color: #993d00;
}

.resume {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.6s ease-out;
  position: relative;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 头部 */
.resume-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 3px solid var(--primary);
  position: relative;
}
/* 姓名和求职意向区域 */
.name-section {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.name {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

/* 简历链接容器 */
.resume-links {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.job-intention {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  /* 默认隐藏求职意向 */
  display: none;
  padding: 6px 16px;
  background: var(--secondary);
  border-radius: 20px;
  border: 2px solid #cce5ff;
}

/* 当求职意向有内容且不为空时显示 */
.job-intention.has-content {
  display: inline-flex;
  align-items: center;
}

/* 编辑模式下始终显示求职意向，方便编辑 */
.edit-mode .job-intention {
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

/* 编辑模式下如果内容为空，显示占位符样式 */
.edit-mode .job-intention-content:empty::after {
  content: "请填写求职意向";
  color: #999;
  font-style: italic;
}

.job-intention-label {
  color: var(--text-light);
  font-size: 14px;
}

.job-intention-content {
  display: inline;
  min-width: 100px;
  color: #ff69b4;
  font-weight: 700;
}

.job-intention-content[contenteditable="true"] {
  background: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 120px;
}

.basic-info {
  margin-top: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.basic-info .gender-age,
.basic-info .certifications {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
}

.contact-info {
  margin-top: 4px;
}

.contact-item {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-item span {
  display: block;
}

.icon { font-size: 16px; }

/* 照片容器 - 按原始图像3:4比例 */
.photo-container {
  width: 120px;
  height: 160px;
  flex-shrink: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid var(--border);
}

.photo-container:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.photo-container.edit-mode {
  cursor: pointer;
}

.photo-container.edit-mode:hover .photo-upload-overlay {
  opacity: 1;
}

.photo-upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  pointer-events: none;
}

.photo-container.edit-mode .photo-upload-overlay {
  pointer-events: auto;
}



.photo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* 区块通用 */
.resume-section { 
  margin-top: 32px;
  animation: fadeIn 0.5s ease-out backwards;
}

.resume-section:nth-child(2) { animation-delay: 0.1s; }
.resume-section:nth-child(3) { animation-delay: 0.2s; }
.resume-section:nth-child(4) { animation-delay: 0.3s; }
.resume-section:nth-child(5) { animation-delay: 0.4s; }
.resume-section:nth-child(6) { animation-delay: 0.5s; }
.resume-section:nth-child(7) { animation-delay: 0.6s; }

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  padding: 8px 16px;
  background: var(--secondary);
  border: 2px solid #b3d9ff;
  border-radius: 10px;
  margin: 0 0 20px 0;
  color: var(--text);
}

.section-title .icon {
  font-size: 20px;
  color: #ff69b4;
}

/* 教育经历 */
.education-item {
  background: white;
  border: 2px solid var(--secondary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.education-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: #99ccff;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.school-info {
  flex: 1;
}

.school-info h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.education-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.education-right .ranking {
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.education-right .time-period {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.education-details p {
  margin: 12px 0 0 0;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

/* 项目经验 */
.project-item {
  background: white;
  border: 2px solid var(--green);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.project-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: #bfe6bf;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.project-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.project-details p {
  margin: 12px 0 0 0;
  line-height: 1.7;
  color: var(--text-light);
  font-size: 14px;
}

.project-link {
  font-size: 12px !important;
  margin-top: 8px !important;
}

.project-link a {
  color: #0066cc !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.project-link a:hover {
  text-decoration: underline !important;
}

/* 组织经历 */
.experience-item {
  background: white;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.experience-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: #ffe699;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.company-info h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.position {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.experience-details p {
  margin: 12px 0 0 0;
  line-height: 1.7;
  color: var(--text-light);
  font-size: 14px;
}

.experience-details ul {
  margin: 8px 0 0 18px;
}

/* 证书 */
.certificates { 
  display: grid; 
  gap: 12px; 
}

.certificate-item { 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  gap: 16px; 
  background: white;
  border: 2px solid var(--purple);
  border-radius: 12px; 
  padding: 16px 20px;
  transition: all 0.3s ease;
}

.certificate-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: #d4c5f9;
}

.cert-name { 
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.cert-time { 
  color: var(--muted); 
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}

/* 技能工具标签 */
.skills-container {
  display: block;
}

.skills-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.skill-tag {
  background: var(--secondary);
  border: 2px solid #b3d9ff;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag:hover {
  background: #cce5ff;
  border: 2px solid #99ccff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* 自我评价 */
.self-evaluation {
  background: white;
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 20px;
}

.self-evaluation p { 
  margin: 0;
  text-align: justify;
  line-height: 1.8;
  color: var(--text-light);
  font-size: 14px;
}

/* 打印优化 - 确保A4尺寸和样式一致性 */
@media print {
  @page {
    size: A4;
    margin: 1cm 1.2cm;
  }

  .action-buttons {
    display: none !important;
  }

  body {
    background: #e7f3ff !important;
    font-size: 11px;
    line-height: 1.4;
  }

  .container {
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .online-resume-link {
    padding: 4px 10px !important;
    font-size: 10px !important;
    background: #e7f3ff !important;
    border: 2px solid #cce5ff !important;
    border-radius: 15px !important;
    display: inline-flex !important;
  }
  
  .online-resume-link .link-label {
    font-size: 11px !important;
  }
  
  .online-resume-link a {
    font-size: 11px !important;
  }
  
  .backup-resume-link {
    padding: 4px 10px !important;
    font-size: 10px !important;
    background: #fff6cc !important;
    border: 2px solid #ffe699 !important;
    border-radius: 15px !important;
    display: inline-flex !important;
  }
  
  .backup-resume-link .link-label {
    font-size: 11px !important;
  }
  
  .backup-resume-link a {
    font-size: 11px !important;
  }
  
  .resume-links {
    gap: 6px !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    margin-top: 4px !important;
  }

  .resume {
    box-shadow: none !important;
    border: 2px solid #e9e9e9 !important;
    padding: 16px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    background: white !important;
  }

  /* 确保头部样式在打印时保持 */
  .resume-header {
    border-bottom: 3px solid #ffd6e7 !important;
    padding-bottom: 10px !important;
    margin-bottom: 14px !important;
    gap: 18px !important;
    display: flex !important;
    justify-content: space-between !important;
  }

  .name {
    font-size: 20px !important;
    margin-bottom: 4px !important;
  }

  .basic-info {
    font-size: 11px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
  }
  
  .contact-info {
    font-size: 11px !important;
    margin-top: 2px !important;
  }
  
  .contact-item {
    font-size: 11px !important;
  }

  .photo-container {
    width: 80px !important;
    height: 107px !important;
    border: 2px solid #e9e9e9 !important;
    border-radius: 8px !important;
  }

  /* 章节标题 */
  .section-title {
    font-size: 14px !important;
    margin-bottom: 10px !important;
    padding: 5px 12px !important;
    background: #e7f3ff !important;
    border: 2px solid #b3d9ff !important;
    border-radius: 8px !important;
    display: inline-flex !important;
  }
  
  .section-title .icon {
    color: #ff69b4 !important;
  }

  /* 教育背景 */
  .education-item {
    background: white !important;
    border: 2px solid #e7f3ff !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin-bottom: 8px !important;
    page-break-inside: avoid;
  }
  
  .education-header h3,
  .project-header h3,
  .company-info h3 {
    font-size: 12px !important;
  }
  
  .education-details p,
  .project-details p,
  .experience-details p {
    font-size: 10px !important;
    line-height: 1.4 !important;
    margin: 4px 0 0 0 !important;
  }
  
  .time-period {
    font-size: 10px !important;
  }
  
  .ranking {
    font-size: 10px !important;
  }

  /* 项目经验 */
  .project-item {
    background: white !important;
    border: 2px solid #e8f5e8 !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin-bottom: 8px !important;
    page-break-inside: avoid;
  }
  
  .project-link {
    font-size: 9px !important;
    margin-top: 4px !important;
  }
  
  .project-link a {
    font-size: 9px !important;
  }
  
  /* 经历项目 */
  .experience-item {
    background: white !important;
    border: 2px solid #fff6cc !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin-bottom: 8px !important;
    page-break-inside: avoid;
  }

  /* 获奖经历 */
  .certificates {
    gap: 6px !important;
  }

  .certificate-item {
    background: white !important;
    border: 2px solid #f0e6ff !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    margin-bottom: 6px !important;
  }
  
  .cert-name {
    font-size: 11px !important;
  }
  
  .cert-time {
    font-size: 10px !important;
  }

  /* 技能标签 */
  .skills-container {
    padding: 0 !important;
  }

  .skill-tag {
    background: #e7f3ff !important;
    border: 2px solid #b3d9ff !important;
    padding: 4px 10px !important;
    margin: 2px 4px 2px 0 !important;
    border-radius: 15px !important;
    font-size: 9px !important;
    font-weight: 500 !important;
  }

  /* 个人总结 */
  .self-evaluation {
    background: white !important;
    border: 2px solid #ffd6e7 !important;
    border-radius: 8px !important;
    padding: 10px !important;
  }

  .self-evaluation p {
    font-size: 10px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  /* 防止分页断裂 */
  .resume-section {
    page-break-inside: avoid;
    margin: 10px 0 !important;
  }
  
  .name-section {
    margin-bottom: 4px !important;
  }
  
  .job-intention {
    font-size: 11px !important;
    padding: 3px 10px !important;
  }

  /* 确保文字清晰 */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  border: 2px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid var(--border);
  background: var(--secondary);
  border-radius: 10px 10px 0 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

.close {
  color: var(--muted);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close:hover {
  color: var(--text);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #f8f9fa;
  border-radius: 0 0 10px 10px;
}

.btn.btn-copy {
  background: var(--green);
  border-color: #bfe6bf;
}

.btn.btn-close {
  background: var(--muted);
  border-color: #999;
  color: #fff;
}

#textContent {
  font-family: 'Noto Sans SC', sans-serif;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-line;
  font-size: 14px;
}

/* 响应式设计 - 平板设备 */
@media screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .container {
    margin: 16px auto;
    padding: 0 12px;
  }

  .resume {
    padding: 20px;
    border-radius: 16px;
  }

  .resume-header {
    flex-direction: column-reverse;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .photo-container {
    width: 100px;
    height: 133px;
    align-self: center;
  }

  .name {
    font-size: 28px;
  }

  .section-title {
    font-size: 18px;
    padding: 6px 12px;
  }

  .education-item,
  .project-item,
  .experience-item,
  .certificate-item {
    padding: 14px;
  }

  .action-buttons {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .resume-section {
    margin-top: 20px;
  }

  .education-header,
  .experience-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .education-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .resume-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .online-resume-link,
  .backup-resume-link {
    font-size: 12px;
    padding: 5px 12px;
    width: 100%;
    justify-content: flex-start;
  }

  .online-resume-link .link-label,
  .backup-resume-link .link-label {
    font-size: 12px;
  }

  .online-resume-link a,
  .backup-resume-link a {
    font-size: 12px;
    word-break: break-all;
  }

  .contact-item span {
    font-size: 13px;
    word-break: break-word;
  }

  .basic-info .gender-age {
    font-size: 14px;
  }

  .name-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .job-intention {
    font-size: 14px;
    padding: 5px 14px;
  }

  .skill-tag {
    font-size: 12px;
    padding: 6px 12px;
  }

  .certificate-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cert-name {
    font-size: 14px;
  }

  .cert-time {
    font-size: 13px;
  }
}

/* 响应式设计 - 手机设备 */
@media screen and (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .container {
    margin: 12px auto;
    padding: 0 10px;
  }

  .resume {
    padding: 16px;
    border-radius: 12px;
  }

  .resume-header {
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  .photo-container {
    width: 90px;
    height: 120px;
  }

  .name {
    font-size: 24px;
    text-align: center;
  }

  .section-title {
    font-size: 16px;
    padding: 5px 10px;
    gap: 8px;
  }

  .section-title .icon {
    font-size: 16px;
  }

  .education-item,
  .project-item,
  .experience-item {
    padding: 12px;
    margin-bottom: 12px;
  }

  .certificate-item {
    padding: 10px;
  }

  .action-buttons {
    gap: 6px;
    margin-bottom: 16px;
  }

  /* 隐藏PDF下载选项悬浮菜单，在移动端不实用 */
  .pdf-download-group:hover .pdf-options {
    opacity: 0;
    pointer-events: none;
  }

  /* 简化按钮文字 */
  .btn {
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 16px;
  }

  .btn.btn-pdf-option {
    padding: 4px 6px;
    font-size: 11px;
    min-width: 40px;
  }

  .resume-section {
    margin-top: 16px;
  }

  .online-resume-link,
  .backup-resume-link {
    font-size: 11px;
    padding: 4px 10px;
  }

  .online-resume-link .link-label,
  .backup-resume-link .link-label {
    font-size: 11px;
  }

  .online-resume-link a,
  .backup-resume-link a {
    font-size: 11px;
  }

  .contact-item span {
    font-size: 12px;
  }

  .basic-info .gender-age {
    font-size: 13px;
  }

  .job-intention {
    font-size: 13px;
    padding: 4px 12px;
  }

  .job-intention-label {
    font-size: 12px;
  }

  .school-info h3,
  .project-header h3,
  .company-info h3 {
    font-size: 15px;
  }

  .education-details p,
  .project-details p,
  .experience-details p,
  .self-evaluation p {
    font-size: 13px;
    line-height: 1.7;
  }

  .time-period,
  .ranking {
    font-size: 12px;
  }

  .skill-tag {
    font-size: 11px;
    padding: 5px 10px;
  }

  .cert-name {
    font-size: 13px;
  }

  .cert-time {
    font-size: 12px;
  }

  .project-link {
    font-size: 11px !important;
  }

  .project-link a {
    font-size: 11px !important;
  }

  .project-link .link-label {
    font-size: 11px !important;
  }

  /* 模态框在移动端的优化 */
  .modal-content {
    width: 95%;
    margin: 10% auto;
    max-height: 85vh;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  #textContent {
    font-size: 13px;
  }
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 选择文本样式 */
::selection {
  background: var(--primary);
  color: var(--text);
}

/* 打印时确保背景为白色 */
@media print {
  body {
    background: white !important;
  }
}
