/* Tailwind CSS CDN */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* 设计令牌 */
:root {
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --success: #10B981;
  --danger: #EF4444;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(37, 99, 235, 0.12);
  --shadow-lg: 0 16px 40px rgba(37, 99, 235, 0.18);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: linear-gradient(180deg, #EFF6FF 0%, var(--bg) 280px);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: 56px;
}

/* 顶部导航 */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-nav .brand .logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.site-nav .nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.site-nav .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

/* 容器 */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 64px 24px 48px;
}

.hero h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 12px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 560px;
}

/* 工具卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 8px 0 40px;
}

.tool-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.25);
}

.tool-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  font-size: 22px;
  margin-bottom: 14px;
}

.tool-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
}

.tool-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* 工具页面布局 */
.tool-wrap {
  padding: 32px 0 56px;
}

.tool-head {
  margin-bottom: 24px;
}

.tool-head h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px;
}

.tool-head p {
  color: var(--text-muted);
  margin: 0;
}

.panel {
  background: var(--bg-card);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.panel label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

textarea, input[type="text"], select {
  width: 100%;
  font-family: "SF Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 14px;
  color: var(--text);
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  resize: vertical;
}

textarea:focus, input[type="text"]:focus, select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea {
  min-height: 120px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.row > * {
  flex: 1;
  min-width: 160px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn.ghost {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.btn.ghost:hover {
  background: rgba(37, 99, 235, 0.14);
  box-shadow: none;
}

.hint {
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}

.hint.ok {
  color: var(--success);
}

.hint.err {
  color: var(--danger);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* 备案页脚 */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(30, 41, 59, 0.96);
  color: #CBD5E1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer .footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.site-footer .footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-footer a {
  color: #93C5FD;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .hero { padding: 44px 18px 32px; }
  .site-nav { padding: 12px 16px; }
  .container { padding: 0 16px; }
}
