/* ==================== 公共页面基线 ====================
   作用：统一四个页面（about/help/list/submit）的容器宽度、Hero、卡片与标题风格
   依赖：全局变量来源于 assets/style.css（--card-bg / --border-color / --shadow-* 等）
   
   结构规范：
   <main class="page-container">
     <section class="hero">...</section>
     <div class="content-grid"> 或 <section class="content-card">
       <section class="content-card">...</section>
     </div>
   </main>
====================================================== */

/* 页面主容器：统一最大宽度与内边距 */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  width: 100%;
  box-sizing: border-box;
}
/* Hero 区域：页面顶部标题卡片 */
.hero {
  margin: 0 0 24px;
  padding: 28px 24px;
  border: none;
  border-radius: 16px;
  /* 统一为深色主题蓝，不需要渐变 */
  background: #0066fc;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
}
.hero .subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

/* 移动端 Hero 内边距优化 */
@media (max-width: 520px) {
  .hero {
    padding: 22px 16px;
  }
}

/* 暗色模式下的轻微对比微调（保留主题蓝） */
@media (prefers-color-scheme: dark) {
  .hero .subtitle {
    color: rgba(255, 255, 255, 0.9);
  }
}

/* 内容卡片：通用内容容器 */
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}
.content-card:hover {
  border-color: rgba(0, 102, 252, 0.25);
  box-shadow: 0 6px 20px rgba(0, 102, 252, 0.08);
}
.content-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}
.content-card p,
.content-card li {
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: 8px;
}
.content-card p:last-child,
.content-card li:last-child {
  margin-bottom: 0;
}

/* 两列栅格布局 */
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== About / Help 细节补充 ==================== */
.content-card ul {
  margin: 8px 0 0 18px;
}
.content-card details {
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
  margin-top: 8px;
}

/* ==================== List 列表页 ====================
   说明：表格式列表，粘性表头，chips 与复制提示
   结构：.content-card.list-card > .list-wrap > (.list-header + ul.list)
====================================================== */

/* 列表容器：零内边距的卡片包装 */
.list-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 16px;
}

/* 列表表格区域 */
.list-wrap {
  width: 100%;
  overflow-x: auto;
}

/* 粘性表头 */
.list-header {
  display: grid;
  grid-template-columns: 1fr 120px 120px 120px;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 800;
  letter-spacing: 0.3px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.list-header .col {
  white-space: nowrap;
  min-width: 0;
}
/* 列表主体 */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 列表行 */
.item {
  display: grid;
  grid-template-columns: 1fr 120px 120px 120px;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.12s ease, transform 0.12s ease;
  cursor: pointer;
}
.item:last-child {
  border-bottom: none;
}
.item:nth-child(even) {
  background: var(--bg-secondary);
}
.item:hover {
  background: var(--card-hover-bg);
  transform: translateX(2px);
}

/* 列内容 */
.item .col {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.item .domain {
  color: var(--text-primary);
  font-weight: 600;
}
.item .type,
.item .rating,
.item .badge {
  color: var(--text-secondary);
}

/* Chips 样式（类型与徽章） */
.list-wrap .chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid;
  white-space: nowrap;
}
.list-wrap .chip-type-gtld {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #bbdefb;
}
.list-wrap .chip-type-cctld {
  background: #fce4ec;
  color: #c2185b;
  border-color: #f8bbd0;
}
.list-wrap .chip-type-newtld {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffe0b2;
}
.list-wrap .chip-badge-featured {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}
.list-wrap .chip-badge-new {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #bbdefb;
}
.list-wrap .chip-badge-special {
  background: #f3e5f5;
  color: #7b1fa2;
  border-color: #e1bee7;
}
.list-wrap .chip-badge-flash {
  background: #fff8e1;
  color: #ef6c00;
  border-color: #ffe0b2;
}

/* 复制域名交互 */
.list-wrap .domain.copyable {
  cursor: copy;
  position: relative;
}
.list-wrap .domain.copyable[data-copied="1"]::after {
  content: "已复制";
  position: absolute;
  top: -6px;
  right: 0;
  transform: translateY(-100%);
  background: #0066fc;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

/* 列表响应式：中等屏幕 */
@media (max-width: 768px) and (min-width: 521px) {
  .list-header,
  .item {
    grid-template-columns: 1fr 96px 96px 96px;
    gap: 6px;
    padding: 10px 12px;
  }
}

/* 列表响应式：小屏幕 */
@media (max-width: 520px) {
  .list-header,
  .item {
    grid-template-columns: 1fr 64px 64px 64px;
    gap: 6px;
    padding: 10px 10px;
  }
  .list-header {
    font-size: 12px;
  }
  .item .col {
    font-size: 13px;
  }
}

/* ==================== Submit 提交页 ====================
   说明：表单布局、输入控件、验证码、消息提示
   结构：.content-card > form.submit-form
====================================================== */

/* 表单容器 */
.submit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 表单行 */
.submit-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.submit-form .form-row.inline-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* 标签 */
.submit-form label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  display: block;
}
.submit-form .required {
  color: #ef4444;
  margin-left: 2px;
}

/* 输入控件统一样式 */
.submit-form input[type="text"],
.submit-form input[type="email"],
.submit-form input[type="tel"],
.submit-form select,
.submit-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.submit-form input:focus,
.submit-form select:focus,
.submit-form textarea:focus {
  border-color: #0066fc;
  box-shadow: 0 0 0 3px rgba(0, 102, 252, 0.15);
}
.submit-form textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
}

/* 验证码行 */
.submit-form .captcha-row {
  display: grid;
  grid-template-columns: 1fr 120px 100px;
  gap: 8px;
  align-items: center;
}
.submit-form .captcha-row img {
  height: 40px;
  width: 120px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
}

/* 表单底部操作栏 */
.submit-form .form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  gap: 10px;
}

/* 按钮覆盖：避免全局 flex:1 */
.submit-form .btn {
  flex: none;
  min-width: 120px;
  height: 40px;
  padding: 0 24px;
}
.submit-form .btn-secondary {
  color: #0066fc;
  border-color: #0066fc;
}

/* 消息提示 */
.submit-form .message {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 14px;
}
.submit-form .message.success {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #16a34a;
}
.submit-form .message.error {
  border-color: #ef4444;
  background: #fef2f2;
  color: #ef4444;
}

/* 提交页响应式 */
@media (max-width: 768px) {
  .submit-form .form-row.inline-2 {
    grid-template-columns: 1fr;
  }
  .submit-form .captcha-row {
    grid-template-columns: 1fr 100px 80px;
  }
  .submit-form .captcha-row img {
    width: 100px;
  }
}
