/* tools.html */
/* ===== 全局重置与基础 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  color: #333;
  line-height: 1.6;
  background: #fff;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 导航 ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: #e8341a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
}
.logo-text { line-height: 1.3; }
.logo-text .name { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; }
.logo-text .eng { font-size: 0.72rem; color: #888; letter-spacing: 1px; }
.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}
.nav-links li { position: relative; }
.nav-links a {
  display: block;
  padding: 8px 16px;
  font-size: 0.95rem;
  color: #333;
  border-radius: 4px;
  transition: color 0.2s;
}
.nav-links a:hover { color: #e8341a; }
.nav-links .dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s;
  z-index: 100;
}
.nav-links li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-links .dropdown a { padding: 10px 20px; font-size: 0.9rem; border-radius: 0; }
.nav-links .dropdown a:hover { background: #fff5f3; color: #e8341a; }
.nav-phone {
  font-weight: 700;
  color: #e8341a;
  font-size: 1rem;
  white-space: nowrap;
}
.nav-phone span { font-size: 0.8rem; color: #888; font-weight: 400; display: block; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: #333; display: block; transition: all 0.3s; }

/* ===== 页面标题区 ===== */
.page-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  color: #fff;
  padding: 60px 0 40px;
  text-align: center;
}
.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.page-hero h1 em { color: #e8341a; font-style: normal; }
.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== 工具主体 ===== */
.tools-section {
  padding: 60px 0 80px;
  background: #f9f9f9;
}

/* 标签页 */
.tabs {
  display: flex;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 30px;
  overflow: hidden;
}
.tab {
  flex: 1;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  color: #666;
  transition: all 0.3s;
  background: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
}
.tab:hover { background: #fff5f3; color: #e8341a; }
.tab.active {
  background: #e8341a;
  color: #fff;
}

/* 内容卡片 */
.tab-content {
  display: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 40px;
}
.tab-content.active { display: block; }

/* 区块 */
.section {
  margin-bottom: 30px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
}
.section h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #e8341a;
}

/* 表单 */
.input-group {
  margin-bottom: 16px;
}
.input-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #555;
  font-size: 0.9rem;
}
.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
  background: #fff;
}
.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #e8341a;
}
.input-row {
  display: flex;
  gap: 16px;
}
.input-row .input-group { flex: 1; }
.info-text {
  font-size: 0.82rem;
  color: #888;
  margin-top: 4px;
}

/* 按钮 */
.button-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}
.button-primary {
  background: #e8341a;
  color: #fff;
}
.button-primary:hover { background: #c42a14; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,52,26,0.3); }
.button-secondary {
  background: #eee;
  color: #333;
}
.button-secondary:hover { background: #ddd; }
.button-danger {
  background: #e74c3c;
  color: #fff;
}

/* 结果表格 */
.table-container { overflow-x: auto; margin-top: 16px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
th {
  background: #e8341a;
  color: #fff;
  padding: 14px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}
td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}
tr:hover td { background: #fff5f3; }

/* 结果展示 */
.result-item {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 16px;
  border-left: 4px solid #e8341a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: center;
}
.result-item h4 {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 8px;
  font-weight: 400;
}
.result-item .value {
  font-size: 2.4rem;
  font-weight: 800;
  color: #e8341a;
}
.result-item .unit {
  font-size: 1rem;
  color: #999;
  margin-left: 4px;
}

/* 纸板结构 */
.paper-structure {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #eee;
}
.paper-structure h3 {
  font-size: 1rem;
  color: #1a1a2e;
  margin-bottom: 12px;
}
.layer-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #e8341a;
}
.layer-item:last-child { margin-bottom: 0; }
.layer-name { font-weight: 600; color: #333; min-width: 70px; }
.layer-paper { flex: 1; color: #555; }
.layer-detail { font-size: 0.82rem; color: #888; margin-top: 4px; }
.paper-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}
.paper-type-liner { background: #e3f2fd; color: #1976d2; }
.paper-type-flute { background: #fff3e0; color: #f57c00; }

/* 纸质卡片 */
.paper-card {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #eee;
}
.paper-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.paper-card-header h4 { font-size: 0.95rem; color: #333; }
.paper-card-body { font-size: 0.82rem; color: #666; line-height: 1.8; }

/* 设置面板 */
.settings-preview {
  background: #f0f8f7;
  padding: 14px 18px;
  border-radius: 8px;
  margin-top: 12px;
}
.settings-preview p { margin: 4px 0; font-size: 0.85rem; color: #555; }
.settings-toggle {
  background: none;
  border: none;
  color: #e8341a;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 8px;
  font-family: inherit;
}
.settings-panel {
  display: none;
  margin-top: 20px;
  padding: 24px;
  background: #fff;
  border: 2px solid #e8341a;
  border-radius: 12px;
}
.settings-panel.show { display: block; }
.add-paper-form {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 2px dashed #e8341a;
}

.error-message {
  color: #e74c3c;
  background: #fee;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #e74c3c;
  margin-top: 12px;
  font-size: 0.9rem;
}

/* CTA横幅 */
.tools-cta {
  background: linear-gradient(135deg, #e8341a, #c42a14);
  color: #fff;
  padding: 50px 0;
  text-align: center;
  margin-top: 60px;
  border-radius: 12px;
}
.tools-cta h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; }
.tools-cta p { font-size: 1rem; opacity: 0.9; margin-bottom: 24px; }
.tools-cta .btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  color: #e8341a;
  background: #fff;
  transition: all 0.3s;
}
.tools-cta .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* SEO文案区 */
.tools-seo {
  padding: 60px 0;
  background: #fff;
}
.seo-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: #555;
  line-height: 2;
}
.seo-content h2 {
  font-size: 1.5rem;
  color: #1a1a2e;
  margin-bottom: 16px;
  font-weight: 700;
}
.seo-content h3 {
  font-size: 1.15rem;
  color: #1a1a2e;
  margin: 24px 0 12px;
  font-weight: 700;
}
.seo-content p { margin-bottom: 12px; }

/* ===== Footer ===== */
footer {
  background: #111;
  color: rgba(255,255,255,0.6);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}
.footer-col p, .footer-col a {
  font-size: 0.85rem;
  line-height: 2;
  display: block;
  transition: color 0.2s;
}
.footer-col a:hover { color: #e8341a; }
.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.78rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #e8341a; }

/* 悬浮联系 */
.float-contact {
  position: fixed;
  right: 24px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}
.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e8341a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(232,52,26,0.4);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.float-btn:hover { background: #c42a14; transform: scale(1.1); }
.float-btn .tooltip {
  position: absolute;
  right: 62px;
  background: #333;
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.float-btn:hover .tooltip { opacity: 1; }
.back-top {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #555;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.back-top:hover { background: #e8341a; }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: 16px;
    z-index: 999;
  }
  .page-hero h1 { font-size: 1.6rem; }
  .tab-content { padding: 20px; }
  .input-row { flex-direction: column; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .tab { font-size: 0.88rem; padding: 14px 8px; }
}
