/* ============================================
   开户行查询 - 样式表
   参考 scanner2 紫蓝渐变风格
   ============================================ */

/* ---- 全局 ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1b1b1b;
  background: linear-gradient(135deg, #f6f7fb 0%, #f0f4f9 100%);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }

/* ---- 顶部导航 ---- */
.topbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 14px 0;
}

.topbar .content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  transition: color 0.2s ease;
  cursor: pointer;
}

.nav-links a:hover {
  color: white;
}

/* ---- 主容器 ---- */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 60px 16px;
}

.page-title {
  text-align: center;
  font-size: 1.4rem;
  color: #1b1b1b;
  margin: 28px 0 8px 0;
  font-weight: 600;
}

.page-subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* ---- 通用卡片 ---- */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin: 0 auto 16px auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 768px;
}

/* ---- 查询区头部 ---- */
.query-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.file-import-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.file-import-wrap input[type="file"] { display: none; }

.file-import-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  color: #667eea;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid rgba(102, 126, 234, 0.25);
  transition: all 0.3s ease;
}

.file-import-label:hover {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
  transform: translateY(-1px);
}

.link-group a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.link-group a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ---- 文本域 ---- */
textarea#text,
textarea#textResults {
  width: 100%;
  min-height: 180px;
  padding: 14px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  color: #1b1b1b;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  transition: all 0.3s ease;
}

textarea#text:focus,
textarea#textResults:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
  background: #ffffff;
}

textarea#textResults {
  background: #fafafa;
  font-size: 13px;
  color: #4f4f4f;
}

/* ---- 操作栏 ---- */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

.btn-query {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 48px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-query:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}

.btn-query:active {
  transform: translateY(0);
}

#process {
  margin-top: 14px;
  color: #667eea;
  font-size: 14px;
  min-height: 20px;
  text-align: center;
  font-weight: 600;
}

/* ---- 结果区 ---- */
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.result-head h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #1b1b1b;
}

.result-head a {
  font-size: 0.85rem;
  color: #667eea;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.result-head a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.query-example-link {
  font-size: 0.85rem;
  color: #667eea;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.query-example-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ---- 说明区 ---- */
.howto-section {
  margin-top: 24px;
  padding: 20px 0;
  width: 100%;
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
}

.howto-section h2 {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #1b1b1b;
  margin-bottom: 16px;
  position: relative;
  padding-top: 12px;
}

.howto-section h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 1px;
}

.howto-section p {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 10px;
}

/* 步骤列表（带数字序号） */
.howto-list {
  list-style: none;
  counter-reset: step-counter;
  padding: 0;
}

.howto-list.ordered li {
  counter-increment: step-counter;
  position: relative;
  padding: 14px 14px 14px 52px;
  margin-bottom: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-size: 14px;
  color: #4f4f4f;
  line-height: 1.5;
}

.howto-list.ordered li::before {
  content: counter(step-counter);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.howto-list.ordered li strong {
  color: #1b1b1b;
}

/* 普通列表（无序号） */
.howto-list.plain {
  padding-left: 20px;
  list-style: disc;
}

.howto-list.plain li {
  margin-bottom: 8px;
  color: #4f4f4f;
  font-size: 14px;
  line-height: 1.6;
}

.howto-list.plain li strong {
  color: #1b1b1b;
}

/* 问答列表 */
.howto-list.faq {
  list-style: none;
  padding: 0;
}

.howto-list.faq dt {
  color: #1b1b1b;
  font-weight: 600;
  margin-top: 12px;
  font-size: 14px;
}

.howto-list.faq dd {
  margin: 4px 0 12px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

/* 查询返回示例表格 */
.example-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  background: #fff;
}

.example-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #4f4f4f;
  min-width: 560px;
}

.example-table thead th {
  background: #eef2ff;
  color: #4c1d95;
  font-weight: 600;
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  border-bottom: 2px solid #667eea;
}

.example-table tbody td {
  padding: 10px 14px;
  border-top: 1px solid #eef0f4;
  white-space: nowrap;
}

.example-table tbody tr:nth-child(even) {
  background: #fafbff;
}

.example-table tbody tr:hover {
  background: rgba(102, 126, 234, 0.06);
}

/* ---- 弹窗 ---- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

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

.modal-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  width: 92%;
  max-width: 360px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover { color: #1b1b1b; }

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  color: #1b1b1b;
}

.modal-body p { text-align: center; font-size: 14px; margin-bottom: 10px; color: #4f4f4f; }
.modal-body img.gzh-img {
  width: 200px;
  margin: 0 auto;
  display: block;
  border-radius: 8px;
}
.modal-status { color: #999; font-size: 13px; }
.highlight-code {
  color: #667eea;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 2px;
}
.pay-info { font-size: 14px; color: #4f4f4f; margin-bottom: 8px; }
.pay-amount { color: #e53935; font-weight: 600; }
#payQrcodeImg { text-align: center; }
#payQrcodeImg img { display: inline-block; }
.modal-input {
  width: 100%;
  padding: 10px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  transition: all 0.3s ease;
}
.modal-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.modal-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}
.modal-btn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.contact-us { cursor: pointer; color: #999; font-size: 13px; text-decoration: underline; }

.footer {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 13px;
}

/* ---- 响应式 ---- */
@media (max-width: 767px) {
  .page-title { font-size: 1.2rem; }
  .page-subtitle { font-size: 0.85rem; }
  .topbar .content { padding: 0 12px; }
  .brand { font-size: 1.2rem; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.85rem; }
  main { padding: 0 12px 60px 12px; }
  .card { padding: 16px; }
  .btn-query { padding: 12px 36px; font-size: 0.95rem; }
  .howto-section h2 { font-size: 0.95rem; }
  .howto-list.ordered li { padding: 12px 12px 12px 48px; font-size: 13px; }
  .howto-list.ordered li::before { width: 26px; height: 26px; font-size: 12px; left: 10px; }
}
