/* 爱梦索（iDreamSeek）—— 门户共享样式 */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #3b82f6;
  --cyan: #06b6d4;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(37, 99, 235, 0.25);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 18px; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 9px;
  object-fit: contain; display: block;
  box-shadow: 0 6px 16px -8px rgba(37, 99, 235, 0.6);
}
.logo small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 8px 14px; border-radius: 8px; color: var(--text); font-size: 15px;
}
.nav a:hover { background: #eef2ff; color: var(--brand-dark); }
.nav a.active { color: var(--brand); font-weight: 600; }
.nav .btn-admin {
  margin-left: 8px; background: var(--brand); color: #fff !important; padding: 9px 16px; border-radius: 9px;
}
.nav .btn-admin:hover { background: var(--brand-dark); }

.menu-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--ink); cursor: pointer; }

/* 英雄区 */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(6, 182, 212, 0.45), transparent 60%),
    radial-gradient(900px 380px at 10% 0%, rgba(59, 130, 246, 0.45), transparent 55%),
    linear-gradient(135deg, #0b2a6b 0%, #1d4ed8 55%, #2563eb 100%);
  overflow: hidden;
}
.hero .inner { padding: 86px 20px 96px; text-align: center; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25);
}
.hero h1 { font-size: 44px; margin: 18px 0 12px; letter-spacing: 1px; }
.hero h1 .grad { background: linear-gradient(90deg, #a5f3fc, #bfdbfe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 640px; margin: 0 auto 28px; color: rgba(255, 255, 255, 0.88); font-size: 17px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; font-size: 15px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: var(--brand-dark); font-weight: 600; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5); }
.btn-primary:hover { color: var(--brand-dark); }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.2); }

/* 通用区块 */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: 28px; color: var(--ink); margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; }
.section-head .bar { width: 46px; height: 4px; border-radius: 3px; margin: 12px auto 0; background: linear-gradient(90deg, var(--brand), var(--cyan)); }

/* 工具卡片 */
.toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; font-size: 14px;
}
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe); color: var(--brand); margin-bottom: 14px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.card .tag { position: absolute; top: 16px; right: 16px; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.tag.ok { background: #dcfce7; color: var(--ok); }
.tag.soon { background: #fef3c7; color: var(--warn); }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; min-height: 42px; }
.card .go { color: var(--brand); font-weight: 600; font-size: 14px; }
.card.disabled { opacity: 0.72; }
.card.disabled .go { color: var(--muted); font-weight: 400; }

/* 特性/关于 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .n { font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: 2px; }
.feature h3 { margin: 8px 0 6px; color: var(--ink); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.site-footer .inner { display: flex; align-items: center; justify-content: space-between; padding: 26px 20px; color: var(--muted); font-size: 14px; flex-wrap: wrap; gap: 10px; }
.site-footer .links { display: flex; gap: 18px; }

/* 工具页布局 */
.tool-wrap { max-width: 860px; margin: 0 auto; padding: 32px 20px 60px; }
.breadcrumb { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.35); }
.panel h1 { margin: 0 0 6px; font-size: 24px; color: var(--ink); }
.panel .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--ink); margin-bottom: 6px; font-weight: 600; }
textarea, input[type="text"], input[type="number"], select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--text); resize: vertical;
}
textarea { min-height: 160px; font-family: "JetBrains Mono", Consolas, Menlo, monospace; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-solid { background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 10px; border: 0; cursor: pointer; font-size: 14px; }
.btn-solid:hover { background: var(--brand-dark); color: #fff; }
.btn-line { background: #fff; color: var(--text); border: 1px solid var(--line); padding: 10px 18px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.btn-line:hover { border-color: var(--brand-light); color: var(--brand); }
.output {
  margin-top: 14px; background: #0b1220; color: #e2e8f0; border-radius: 10px; padding: 14px 16px;
  font-family: "JetBrains Mono", Consolas, Menlo, monospace; font-size: 13px; white-space: pre-wrap; word-break: break-all; min-height: 44px;
}
.hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.msg { font-size: 13px; margin-top: 8px; }
.msg.ok { color: var(--ok); }
.msg.err { color: #dc2626; }

.switch { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px; gap: 4px; display: none;
  }
  .nav.open { display: flex; }
  .nav .btn-admin { margin: 6px 0 0; text-align: center; }
}
