/* ===== Astralzero 工具站 · 全站共享样式 ===== */
:root {
  --bg: #0b0e14;
  --bg-soft: #11151f;
  --card: #151a26;
  --border: #232a3a;
  --text: #e8ecf4;
  --text-dim: #8b93a7;
  --accent: #4f8cff;
  --accent2: #7c5cff;
  --radius: 14px;
}

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

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #1a2440 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { width: min(1080px, 92%); margin: 0 auto; }

/* ===== 顶栏 ===== */
.site-header { padding: 12px 0; border-bottom: 1px solid var(--border); background: rgba(11,14,20,.75); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.logo { font-size: 20px; font-weight: 700; letter-spacing: .5px; display: inline-flex; align-items: center; gap: 10px; }
.logo-img { height: 44px; width: 44px; display: block; vertical-align: middle; position: relative; top: 3px; }
.logo-text { display: inline-block; }
.header-left { display: flex; align-items: center; gap: 10px; }
.header-left .logo-img { height: 44px; width: 44px; vertical-align: middle; position: relative; top: 3px; }
.logo b { color: var(--accent); }
.back-link { color: var(--text-dim); text-decoration: none; font-size: 14px; transition: color .2s; }
.back-link:hover { color: var(--accent); }

/* 语言切换 */
.lang-switch { display: flex; gap: 6px; }
.lang-switch button {
  background: var(--card); color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; transition: all .2s;
}
.lang-switch button:hover { color: var(--text); border-color: var(--accent); }
.lang-switch button.active { color: #fff; background: var(--accent); border-color: var(--accent); }

/* ===== Hero ===== */
.hero { text-align: center; padding: 64px 0 48px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-dim); margin-top: 14px; font-size: 16px; }
.hero-media { margin-top: 36px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.hero-media img { width: 100%; height: auto; display: block; }

/* ===== 分区与卡片 ===== */
main { flex: 1; padding-bottom: 48px; }
.section { margin-top: 44px; }
.section-title { font-size: 20px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent2)); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text); transition: transform .2s, border-color .2s, background .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--bg-soft); }
.card-icon {
  flex: none; width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(79,140,255,.18), rgba(124,92,255,.18));
  border: 1px solid var(--border); font-size: 20px;
}
.card-icon svg { width: 22px; height: 22px; }
.card-icon img { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
.card-title { font-weight: 600; font-size: 15px; }
.card-desc { color: var(--text-dim); font-size: 12.5px; margin-top: 3px; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0; text-align: center; color: var(--text-dim); font-size: 13px; }
.site-footer a { color: var(--text-dim); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--accent); }
.site-footer img.beian-icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* ===== 文档页（隐私/条款） ===== */
.doc { max-width: 760px; padding-top: 40px; }
.doc h1 { font-size: 26px; }
.doc .date { color: var(--text-dim); font-size: 13px; margin: 6px 0 28px; }
.doc h2 { font-size: 17px; margin: 26px 0 8px; }
.doc p { font-size: 14px; line-height: 1.8; color: var(--text-dim); }

/* ===== 工具页通用 ===== */
.tool-main { padding-top: 40px; max-width: 720px; }
.tool-main h1 { font-size: 26px; margin-bottom: 6px; }
.tool-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

/* ===== 二维码工具 ===== */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; color: var(--text-dim);
  transition: border-color .2s, background .2s; cursor: pointer;
}
.dropzone.active, .dropzone:hover { border-color: var(--accent); background: rgba(79,140,255,.06); }
.dropzone .big { font-size: 15px; color: var(--text); }
.dropzone .hint { font-size: 13px; margin-top: 8px; }
.dropzone .or { font-size: 12px; margin: 14px 0; opacity: .7; }

.btn {
  display: inline-block; margin-top: 16px; padding: 9px 22px; font-size: 14px;
  background: var(--accent); color: #fff; border: none; border-radius: 8px; cursor: pointer;
  text-decoration: none; transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--accent); }

.result { margin-top: 28px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.result h3 { font-size: 15px; margin-bottom: 10px; color: var(--text-dim); font-weight: 600; }
.result-text { font-size: 14px; word-break: break-all; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; max-height: 160px; overflow-y: auto; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result-actions .btn { margin-top: 14px; }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .hero { padding: 40px 0 32px; }
  .grid { grid-template-columns: 1fr; }
  .dropzone { padding: 32px 16px; }
}

/* ===== 网络检测工具 ===== */
.net-rows { display: flex; flex-direction: column; gap: 10px; }
.net-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px; font-size: 14px; }
.net-row span { color: var(--text-dim); flex: none; }
.net-row b { font-weight: 600; word-break: break-all; text-align: right; }
.result .hint { color: var(--text-dim); font-size: 12.5px; line-height: 1.6; margin-top: 10px; }

/* 进度条 */
.progress { height: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .2s linear; }
.btn:disabled { opacity: .6; cursor: default; }
