/* ============================
   联系作者页面样式
   ============================ */

:root {
  --primary: #4f46e5;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 40px rgba(79,70,229,.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --wechat: #07c160;
  --qq: #12b7f5;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==================== Header ==================== */

.site-header {
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
  text-decoration: none;
  background: #f1f5f9;
}

.nav-link i { font-size: 15px; }

.nav-link:hover { background: #eef2ff; color: var(--primary); }
.nav-link.active { background: #eef2ff; color: var(--primary); }

/* ==================== Main ==================== */

.contact-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  text-align: center;
}

/* ==================== Hero ==================== */

.contact-hero {
  margin-bottom: 48px;
}

.author-avatar-wrap {
  width: 150px;
  height: 150px;
  margin: 0 auto 24px;
  border-radius: 50%;
  padding: 4px;
  background: var(--primary-gradient);
  box-shadow: 0 8px 32px rgba(79,70,229,.25);
}

.author-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  background: #f1f5f9;
}

.author-name {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.author-bio {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto;
  white-space: pre-line;
}

/* ==================== Contact Cards ==================== */

.contact-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  cursor: pointer;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.contact-card.wechat:hover { box-shadow: 0 16px 32px rgba(7,193,96,.15); }
.contact-card.qq:hover { box-shadow: 0 16px 32px rgba(18,183,245,.15); }

.cc-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  flex-shrink: 0;
}

.contact-card.wechat .cc-icon { background: linear-gradient(135deg, #07c160, #06ad56); }
.contact-card.qq .cc-icon { background: linear-gradient(135deg, #12b7f5, #0d9dd9); }

.cc-body {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.cc-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.cc-value {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-qr-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
}

.cc-qr-hint i { font-size: 20px; }

/* ==================== QR Overlay ==================== */

.qr-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.qr-overlay.active { display: flex; }

.qr-dialog {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
  animation: qrIn .3s ease;
  max-width: 340px;
  width: 90vw;
}

@keyframes qrIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.qr-dialog h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text);
}

.qr-img-wrap {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 8px;
  background: #fff;
}

.qr-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-tip {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ==================== Button ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  font-family: var(--font);
}

.btn-outline {
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ==================== Footer ==================== */

.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* ==================== Action Buttons ==================== */

.action-buttons {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 48px;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
}

.action-btn i { font-size: 30px; margin-bottom: 4px; }

.action-btn .ab-title { font-size: 17px; font-weight: 700; }
.action-btn .ab-sub { font-size: 13px; color: var(--text-muted); }

.custom-btn {
  background: linear-gradient(135deg, #ecfeff 0%, #f0f9ff 100%);
  border-color: #cffafe;
  color: #0891b2;
}

.custom-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(6,182,212,.18);
  border-color: #06b6d4;
}

/* ==================== Modal ==================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-dialog {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 440px;
  max-width: 92vw;
  box-shadow: 0 25px 60px rgba(0,0,0,.2);
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-dialog h3 {
  font-size: 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.modal-dialog h3 i { color: var(--primary); }

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
  background: var(--card-bg);
  color: var(--text);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ==================== Button ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,70,229,.4); }

.btn-outline {
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ==================== Toast ==================== */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  animation: toastIn .3s ease, toastOut .3s ease 2.7s forwards;
  max-width: 360px;
}

.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ==================== Responsive ==================== */

@media (max-width: 640px) {
  .contact-main { padding: 40px 20px 64px; }
  .author-avatar-wrap { width: 120px; height: 120px; }
  .author-name { font-size: 22px; }
  .author-bio { font-size: 14px; }
  .contact-methods { grid-template-columns: 1fr; }
  .contact-card { padding: 16px 20px; }
  .cc-icon { width: 44px; height: 44px; font-size: 22px; }
  .action-btn { padding: 22px 32px; }
  .header-inner { padding: 0 16px; }
  .brand-text h1 { font-size: 16px; }
}
