@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #1f2937;
  --muted: #8b96a8;
  --line: #e7ebf0;
  --primary: #5d5bd6;
  --primary-soft: #efefff;
  --green: #34a987;
  --shadow: 0 14px 38px rgba(48, 60, 90, .06);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Manrope, "Microsoft YaHei", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; padding: 31px 20px 24px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px 44px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--primary); font-size: 21px; box-shadow: 0 6px 16px rgba(93, 91, 214, .25); }
.brand strong { display: block; font-size: 16px; letter-spacing: -.03em; }
.brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { border: 0; border-radius: 9px; color: #7d8798; background: transparent; padding: 11px 13px; display: flex; align-items: center; gap: 12px; text-align: left; font-size: 12px; transition: .2s ease; }
.nav-item span { width: 17px; color: #a2adbb; font-family: "DM Mono", monospace; font-size: 13px; text-align: center; }
.nav-item em { margin-left: auto; color: #b4bdc9; font-size: 10px; font-style: normal; }
.nav-item:hover { background: var(--panel-soft); color: var(--text); }
.nav-item.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.nav-item.active span { color: var(--primary); }
.sidebar-note { display: flex; gap: 9px; margin: auto 5px 16px; padding: 14px 10px; border-radius: 10px; background: #f4f9f8; color: var(--green); }
.note-icon { font-size: 17px; }
.sidebar-note strong { display: block; color: #3b8c76; font-size: 10px; }
.sidebar-note p { margin: 5px 0 0; color: #9bb6af; font-size: 9px; line-height: 1.6; }
.sidebar-footer { padding: 0 10px; color: #b8c0ca; font: 10px "DM Mono", monospace; }

.main-content { width: min(100%, 1200px); min-width: 0; flex: 1; padding: 0 54px 30px; margin: 0 auto; }
.topbar { height: 93px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.breadcrumb { min-width: 0; overflow: hidden; color: #b1b8c4; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb b { padding: 0 9px; color: #d2d7df; font-weight: 400; }
.breadcrumb strong { color: #667286; font-weight: 600; }
.topbar-actions { min-width: 0; display: flex; align-items: center; gap: 18px; }
.search-box { width: 218px; max-width: 218px; flex: 1 1 150px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: #edf0f4; color: #9ca7b6; }
.search-box:focus-within { border-color: #cccaff; background: white; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search-box kbd { color: #aeb6c2; font: 9px "DM Mono", monospace; }
.icon-button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; color: #8b96a8; background: white; font-size: 15px; }
.hero { min-height: 205px; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.eyebrow { margin: 0 0 14px; color: var(--primary); font: 10px "DM Mono", monospace; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.22; letter-spacing: -.06em; font-weight: 800; }
h1 span { color: var(--primary); }
.hero-copy { margin: 13px 0 0; color: #9aa4b3; font-size: 12px; }
.hero-orbit { width: 128px; height: 128px; margin-right: 14%; position: relative; border: 1px solid #e1e4fb; border-radius: 50%; opacity: .9; }
.hero-orbit:before, .hero-orbit:after { content: ""; position: absolute; inset: 16px; border: 1px solid #e7e8fb; border-radius: 50%; }
.hero-orbit:after { inset: 39px; border-color: #d9d9fb; }
.hero-orbit span { position: absolute; top: 51px; left: 57px; color: var(--primary); font-size: 17px; }
.hero-orbit i, .hero-orbit b { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #a7e0d1; }
.hero-orbit i { top: 10px; right: 31px; }.hero-orbit b { bottom: 24px; left: 9px; background: #f3c68d; }
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-title span { display: block; font-size: 13px; font-weight: 700; }.section-title small { display: block; margin-top: 5px; color: #adb5c1; font-size: 10px; }
.filter-chips { display: flex; gap: 7px; flex-wrap: wrap; }.chip { border: 0; border-radius: 7px; padding: 7px 12px; color: #99a4b3; background: transparent; font-size: 10px; }.chip:hover { color: var(--primary); }.chip.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.tool-card { min-height: 162px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); box-shadow: var(--shadow); cursor: pointer; transition: transform .2s, box-shadow .2s; }.tool-card:hover, .tool-card:focus-visible { transform: translateY(-3px); box-shadow: 0 17px 34px rgba(48, 60, 90, .11); outline: 2px solid #cbc9f8; outline-offset: 2px; }
.tool-card-head { display: flex; align-items: flex-start; justify-content: space-between; }.tool-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); font: 12px "DM Mono", monospace; }.tool-tag { padding: 4px 7px; border-radius: 5px; color: #9ca7b5; background: #f4f6f8; font-size: 9px; }.tool-card h2 { margin: 16px 0 5px; font-size: 13px; letter-spacing: -.02em; }.tool-card p { margin: 0; color: #a1aab7; font-size: 10px; line-height: 1.6; }
.empty-state { padding: 50px; color: var(--muted); text-align: center; font-size: 12px; }
.main-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 34px; color: #b1b9c5; font-size: 9px; }.main-footer a { color: #9ba5b3; text-decoration: none; }.main-footer a:hover { color: var(--primary); }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(31, 41, 55, .28); backdrop-filter: blur(5px); }.modal { width: min(650px, 100%); max-height: 90vh; overflow: auto; padding: 25px; border-radius: 15px; background: var(--panel); box-shadow: 0 25px 80px rgba(31, 41, 55, .25); }.modal-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 20px; }.modal-head h2 { margin: 0 0 5px; font-size: 19px; }.modal-head p { margin: 0; color: var(--muted); font-size: 11px; }.close-modal { border: 0; color: var(--muted); background: transparent; font-size: 22px; }.tool-form { display: grid; gap: 13px; }.tool-form label { color: #788497; font-size: 11px; font-weight: 700; }.tool-form textarea, .tool-form input[type="text"], .tool-form input[type="datetime-local"] { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--text); background: var(--panel-soft); font: 12px "DM Mono", monospace; resize: vertical; }.tool-form textarea:focus, .tool-form input:focus { border-color: #b7b5f2; background: white; }.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }.primary-button, .secondary-button { border: 0; border-radius: 7px; padding: 9px 14px; font-size: 11px; font-weight: 700; }.primary-button { color: white; background: var(--primary); }.secondary-button { color: #788497; background: #eef1f5; }.result-box { position: relative; }.result-box textarea { min-height: 120px; }.copy-button { position: absolute; top: 14px; right: 8px; border: 0; border-radius: 5px; padding: 5px 7px; color: var(--primary); background: var(--primary-soft); font-size: 9px; }.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.range-line { display: flex; align-items: center; gap: 12px; }.range-line input { flex: 1; accent-color: var(--primary); }.range-line output { width: 28px; color: var(--primary); font: 11px "DM Mono", monospace; }
.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; padding: 10px 14px; border-radius: 7px; color: white; background: #293449; box-shadow: 0 10px 25px rgba(31,41,55,.2); font-size: 11px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .25s; }.toast.show { opacity: 1; transform: translateY(0); }
.tool-form select { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--text); background: var(--panel-soft); font: 12px "DM Mono", monospace; }.tool-form select:focus { border-color: #b7b5f2; background: white; }
body.dark { --bg: #171a23; --panel: #202530; --panel-soft: #262c38; --text: #e6e9f0; --muted: #8993a5; --line: #303746; --primary-soft: #302f58; --shadow: 0 14px 38px rgba(0,0,0,.16); }.dark .search-box, .dark .tool-tag, .dark .secondary-button { background: #2b3140; }.dark .icon-button { color: #c3cad6; background: #202530; }.dark .tool-form textarea, .dark .tool-form input, .dark .tool-form select { color: var(--text); background: #262c38; }.dark .tool-form textarea:focus, .dark .tool-form input:focus, .dark .tool-form select:focus { background: #202530; }.dark .sidebar-note { background: #1e332f; }
@media (max-width: 900px) { .sidebar { width: 205px; }.main-content { padding: 0 28px 25px; }.tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.hero-orbit { margin-right: 5%; } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { width: 100%; padding: 18px 15px 10px; border-right: 0; border-bottom: 1px solid var(--line); }.brand { padding: 0 4px 15px; }.nav-list { display: flex; overflow-x: auto; gap: 5px; scrollbar-width: none; }.nav-list::-webkit-scrollbar { display: none; }.nav-item { flex: 0 0 auto; padding: 8px 10px; }.nav-item em, .sidebar-note, .sidebar-footer { display: none; }.main-content { width: 100%; padding: 0 15px 20px; }.topbar { height: 67px; gap: 10px; }.topbar-actions { flex: 1; justify-content: flex-end; }.search-box { width: 145px; max-width: 145px; }.search-box kbd { display: none; }.hero { min-height: 180px; }.hero-orbit { position: absolute; right: -28px; opacity: .55; }.toolbar { align-items: flex-start; flex-direction: column; }.filter-chips { width: 100%; }.tool-grid { grid-template-columns: 1fr; }.main-footer { flex-direction: column; }.inline-fields { grid-template-columns: 1fr; } }
@media (max-width: 390px) { .topbar-actions { gap: 7px; }.search-box { width: 120px; max-width: 120px; }.icon-button { flex: 0 0 31px; }.hero { min-height: 165px; }.hero-copy { max-width: 235px; line-height: 1.7; } }
