/* ---------- 错误页面通用组件 ---------- */
.error-container {
  min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.error-content {
  max-width: 700px; padding: 3rem 2rem; width: 100%; background: var(--bg-card);
  border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.error-image-container {
  position: relative; margin-bottom: 2rem; display: inline-block;
  animation: float 6s ease-in-out infinite; overflow: visible;
}
.image-background {
  position: absolute; inset: 0; background: var(--bg-card); border-radius: 16px;
  z-index: 1; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}
.error-image-container img {
  position: relative; z-index: 2; width: 100%; max-width: 320px; height: auto;
  border-radius: 16px; transition: transform 0.3s ease, filter 0.3s ease;
  display: block; background: transparent; mix-blend-mode: normal;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.03);
}
.error-image-container::after {
  content: ''; position: absolute; top: 10px; left: 10px; right: -10px; bottom: -10px;
  background: linear-gradient(135deg, rgba(74,108,247,0.1) 0%, rgba(102,126,234,0.05) 100%);
  border-radius: 20px; z-index: 0; opacity: 0.7;
}
.error-image-container img:hover {
  transform: scale(1.02) translateY(-5px);
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}
.error-text { margin-bottom: 2.5rem; }
.error-text h2 {
  font-size: 2.2rem; margin: 0 0 1rem 0; font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), #667eea);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.error-text p { font-size: 1.15rem; color: var(--text-secondary); margin: 0 auto 1rem; max-width: 500px; line-height: 1.7; }
.error-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem;
}
.fallback-content { margin-bottom: 2rem; animation: fadeInUp 0.6s ease-out; }
.fallback-content h1 { font-size: 6rem; color: var(--primary-color); margin: 0; line-height: 1; opacity: 0.15; font-weight: 800; }
.fallback-content h2 { font-size: 2rem; color: var(--text-primary); margin: 0.5rem 0 0; }

/* 错误页响应式 */
@media (max-width: 768px) {
  .error-container { min-height: 60vh; padding: 1rem; }
  .error-content { padding: 2rem 1.5rem; border-radius: 16px; }
  .error-image-container img { max-width: 280px; }
  .error-image-container::after { top: 8px; left: 8px; right: -8px; bottom: -8px; }
  .error-text h2 { font-size: 1.8rem; }
  .error-text p { font-size: 1.05rem; }
  .fallback-content h1 { font-size: 4rem; }
  .fallback-content h2 { font-size: 1.5rem; }
  .error-actions { flex-direction: column; align-items: center; gap: 0.75rem; }
  .btn { width: 100%; max-width: 280px; padding: 0.75rem 1.5rem; }
}
@media (max-width: 480px) {
  .error-content { padding: 1.5rem 1rem; border-radius: 12px; }
  .error-image-container img { max-width: 240px; }
  .error-image-container::after { top: 6px; left: 6px; right: -6px; bottom: -6px; }
  .error-text h2 { font-size: 1.5rem; }
  .error-text p { font-size: 1rem; }
  .fallback-content h1 { font-size: 3rem; }
  .btn { padding: 0.7rem 1.25rem; }
}

/* ---------- 500 专属组件 (红色主题) ---------- */
.error-container .btn-primary {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}
.error-container .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}
.error-container .btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.error-container .btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: #dc3545;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* 错误详情 */
.error-details {
  margin: 1.5rem auto;
  max-width: 600px;
  text-align: left;
}
.error-details details {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border-color);
}
.error-details summary {
  font-weight: 600;
  color: #dc3545;
  cursor: pointer;
  padding: 0.5rem;
  list-style: none;
  user-select: none;
}
.error-details summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}
.error-details[open] summary::before {
  transform: rotate(90deg);
}
.error-details pre {
  white-space: pre-wrap; word-wrap: break-word;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem; color: var(--text-secondary);
  margin: 1rem 0 0; padding: 1rem;
  background: rgba(220, 53, 69, 0.05);
  border-radius: 8px;
  border-left: 3px solid #dc3545;
  overflow-x: auto; max-height: 300px; overflow-y: auto;
}

/* 500 备用文字颜色 */
.fallback-content h1 { color: #dc3545; }

/* 联系信息卡片 */
.contact-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  margin: 0 auto;
}
.contact-card h3 { color: var(--text-primary); margin: 0 0 1rem 0; font-size: 1.3rem; }
.contact-card p { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.6; }
.contact-card ul { list-style: none; padding: 0; margin: 0 0 1.5rem 0; text-align: left; }
.contact-card li { padding: 0.5rem 0; color: var(--text-primary); display: flex; align-items: center; gap: 0.75rem; }
.contact-card a { color: #dc3545; text-decoration: none; font-weight: 500; }
.contact-card a:hover { text-decoration: underline; }
.btn-tertiary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-tertiary:hover { background: var(--border-color); }


