:root {
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --surface-2: #f1eee7;
  --ink: #152022;
  --muted: #718080;
  --line: #e5e0d8;
  --orange: #e7622e;
  --orange-soft: #fff0e7;
  --green-soft: #e2f0e8;
  --navy: #132225;
  --shadow: 0 18px 50px rgba(31, 49, 46, 0.08);
  --mono: "DM Mono", monospace;
  --sans: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  transition: background .3s, color .3s;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }

.app-shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 246px;
  background: var(--navy);
  color: #dce7e3;
  padding: 27px 18px 24px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 11px 35px; }
.brand-mark {
  width: 35px; height: 35px; border: 1px solid #7ca99c; border-radius: 50%;
  display: grid; place-items: center; color: #f2a16e; font-family: Georgia, serif;
  font-size: 24px; position: relative;
}
.brand-mark:after {
  content: ""; position: absolute; width: 7px; height: 7px; background: var(--orange);
  border-radius: 50%; right: -2px; top: 3px;
}
.brand strong { display: block; font-size: 16px; letter-spacing: -.5px; }
.brand small { display: block; color: #78908b; font-size: 9px; letter-spacing: 1px; margin-top: 3px; }
.side-label { font-family: var(--mono); color: #708683; font-size: 9px; letter-spacing: 1.5px; padding: 0 13px 12px; margin-top: 5px; }
.side-nav { display: grid; gap: 5px; margin-bottom: 30px; }
.nav-item {
  height: 43px; border-radius: 8px; color: #91aaa4; text-align: left; padding: 0 13px;
  display: flex; align-items: center; gap: 12px; font-size: 13px; transition: .2s;
}
.nav-item:hover { background: #203437; color: #e9f2ef; }
.nav-item.active { background: #25403d; color: #f4fbf7; box-shadow: inset 3px 0 var(--orange); }
.nav-icon { font-size: 18px; width: 18px; text-align: center; opacity: .8; }
.nav-item em { font-style: normal; margin-left: auto; font-family: var(--mono); font-size: 10px; color: #738e87; }
.progress-card { margin: 0 7px 25px; padding: 16px; background: #1c3234; border: 1px solid #2d4847; border-radius: 9px; }
.progress-head { display: flex; justify-content: space-between; color: #abc1bb; font-size: 11px; }
.progress-head b { color: #fff; font-family: var(--mono); font-weight: 400; }
.progress-bar { height: 5px; background: #304a49; border-radius: 3px; margin: 13px 0 11px; overflow: hidden; }
.progress-bar i { height: 100%; width: 60%; display: block; background: var(--orange); border-radius: 3px; }
.progress-card p { margin: 0; color: #76908b; font-size: 10px; line-height: 1.5; }
.sidebar-bottom { margin-top: auto; padding: 0 10px; }
.mini-status { font-size: 10px; color: #8ea9a2; display: flex; align-items: center; gap: 7px; margin-bottom: 22px; }
.status-dot, .ready-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #65c59e;
  box-shadow: 0 0 0 3px rgba(101, 197, 158, .12);
}
.side-footer { font-family: var(--mono); font-size: 8px; color: #58716c; display: flex; gap: 6px; }

.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 78px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; padding: 0 4.5%; background: rgba(247, 244, 238, .86);
  backdrop-filter: blur(10px); flex-shrink: 0; z-index: 5;
}
.breadcrumb { display: flex; gap: 10px; align-items: center; font-size: 11px; color: #a2aaa5; }
.breadcrumb strong { color: #293736; font-weight: 600; }
.breadcrumb b { font-weight: 400; color: #c1beb7; }
.top-actions { display: flex; align-items: center; gap: 15px; }
.icon-btn { color: #71807d; font-size: 21px; width: 28px; height: 30px; position: relative; }
.notification i { position: absolute; right: 1px; top: 3px; width: 5px; height: 5px; background: var(--orange); border-radius: 50%; }
.avatar { width: 30px; height: 30px; background: #d7e7dc; color: #34634e; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 700; }
.mobile-menu { display: none; }

.page-wrap { flex: 1; min-height: 0; overflow-y: auto; max-width: 1400px; width: 100%; margin: 0 auto; padding: 50px 5.2% 80px; }
.page { display: none; }
.active-page { display: block; }
.eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: #8a9a96; font-weight: 500; }

.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 5%; align-items: center; min-height: 390px; }
.hero-copy h1 { font-size: 58px; line-height: 1.1; letter-spacing: -3px; margin: 18px 0 20px; font-weight: 800; }
.hero-copy h1 span { color: var(--orange); }
.hero-copy > p { font-size: 15px; line-height: 1.9; color: var(--muted); margin: 0 0 27px; }
.pulse { display: inline-block; width: 6px; height: 6px; background: var(--orange); border-radius: 50%; margin: 0 7px 1px 0; }
.hero-actions { display: flex; align-items: center; gap: 22px; }
.primary-btn {
  background: var(--orange); color: #fff; border-radius: 6px; padding: 13px 18px;
  font-weight: 700; font-size: 12px; box-shadow: 0 8px 18px rgba(231, 98, 46, .2); transition: .2s;
}
.primary-btn:hover { background: #d95321; transform: translateY(-1px); }
.primary-btn span { font-size: 18px; vertical-align: -1px; margin-left: 16px; }
.text-btn, .link-btn { color: var(--ink); font-weight: 700; font-size: 12px; }
.text-btn span, .link-btn span { color: var(--orange); font-size: 17px; margin-left: 7px; }
.hero-meta { display: flex; gap: 12px; align-items: center; margin-top: 47px; color: #89928f; font-size: 10px; }
.hero-meta b { font-family: var(--mono); font-size: 14px; color: var(--ink); font-weight: 500; }
.meta-divider { height: 14px; width: 1px; background: var(--line); }

.hero-visual { height: 370px; position: relative; display: grid; place-items: center; }
.visual-orbit { position: absolute; border: 1px solid #d6ddd4; border-radius: 50%; transform: rotate(-18deg); }
.orbit-one { width: 470px; height: 200px; }
.orbit-two { width: 420px; height: 270px; transform: rotate(62deg); }
.code-window { width: min(465px, 90%); background: #172b2d; border-radius: 8px; box-shadow: 0 28px 50px rgba(31, 51, 48, .19); z-index: 1; overflow: hidden; transform: rotate(-2deg); }
.window-bar { height: 37px; background: #203738; display: flex; align-items: center; padding: 0 14px; color: #75908a; font-family: var(--mono); font-size: 9px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 6px; height: 6px; background: #506764; border-radius: 50%; }
.dots i:first-child { background: #d87956; }
.window-name { margin: auto; }
.window-kebab { letter-spacing: 2px; }
.code-window pre { padding: 22px 15px 18px; margin: 0; color: #cfdbd3; font: 11px/2 var(--mono); overflow: auto; }
.line-num { color: #526d67; display: inline-block; width: 22px; }
.sql-key { color: #df9b73; }
.sql-field { color: #f4d08a; }
.sql-fn { color: #8cc0ab; }
.sql-table { color: #a5caad; }
.sql-op { color: #e4a374; }
.run-line { height: 43px; border-top: 1px solid #2d4543; padding: 0 15px; display: flex; align-items: center; gap: 8px; color: #87a19b; font: 9px var(--mono); }
.run-line .tiny-run { margin-left: auto; background: #2c4b43; color: #b6ddc6; border-radius: 4px; padding: 6px 10px; font: 9px var(--mono); }
.result-badge { position: absolute; z-index: 2; right: 1%; bottom: 17px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: 7px; padding: 12px 15px; display: flex; align-items: center; gap: 10px; }
.check { background: var(--green-soft); color: #418565; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.result-badge strong { display: block; font: 12px var(--mono); }
.result-badge small { color: #899591; font-size: 9px; }
.float-tag { position: absolute; background: var(--surface); border: 1px solid var(--line); padding: 9px 12px; border-radius: 5px; box-shadow: 0 8px 20px rgba(31, 49, 46, .06); font-size: 10px; color: #647570; z-index: 2; }
.float-tag span { color: var(--orange); margin-right: 6px; }
.tag-left { left: 0; top: 55px; }
.tag-right { right: 0; top: 105px; }

.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 73px 0 21px; }
.section-heading h2 { font-size: 23px; letter-spacing: -1px; margin: 8px 0 0; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.category-card { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 18px; min-height: 120px; transition: .2s; cursor: pointer; }
.category-card:hover { border-color: #d7a58c; transform: translateY(-3px); box-shadow: var(--shadow); }
.category-card .cat-icon { font-size: 21px; color: var(--orange); margin-bottom: 15px; }
.category-card h3 { font-size: 13px; margin: 0 0 8px; }
.category-card p { font-size: 10px; color: #8b9792; margin: 0; }
.category-card .count { float: right; color: #bdc3be; font: 10px var(--mono); }
.bottom-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; margin-top: 52px; }
.feature-panel, .daily-panel { padding: 26px 29px; border-radius: 8px; }
.feature-panel { background: #e9f0e9; }
.feature-panel h3, .daily-panel h3 { margin: 10px 0 8px; font-size: 22px; letter-spacing: -1px; }
.feature-panel p, .daily-panel p { font-size: 12px; line-height: 1.75; color: #71817b; max-width: 510px; }
.feature-points { display: flex; gap: 20px; flex-wrap: wrap; color: #58746a; font-size: 10px; margin-top: 23px; }
.daily-panel { background: #fff1e8; }
.daily-top, .daily-footer { display: flex; justify-content: space-between; align-items: start; }
.daily-footer { align-items: center; margin-top: 25px; color: #8d9189; font: 9px var(--mono); }
.round-arrow { width: 30px; height: 30px; border: 1px solid #dfc3b2; border-radius: 50%; color: var(--orange); font-size: 17px; }

.difficulty, .soft-tag, .time-tag { border-radius: 3px; padding: 4px 7px; font: 9px var(--mono); display: inline-block; }
.difficulty.easy { background: #e2f0e7; color: #418266; }
.difficulty.medium { background: #fff0df; color: #b56d35; }
.difficulty.hard { background: #f9e2e0; color: #bf5a55; }
.soft-tag { background: var(--surface-2); color: #75817d; }
.time-tag { color: #8c9893; }

.page-intro { display: flex; justify-content: space-between; align-items: end; margin-bottom: 38px; }
.page-intro h1 { font-size: 37px; letter-spacing: -2px; margin: 11px 0 6px; }
.page-intro p { color: #85918c; margin: 0; font-size: 13px; }
.library-layout { display: grid; grid-template-columns: 205px 1fr; gap: 52px; }
.category-sidebar { border-right: 1px solid var(--line); padding-right: 28px; }
.category-sidebar h4 { font-size: 12px; margin: 0 0 18px; }
.category-sidebar button { width: 100%; display: flex; justify-content: space-between; padding: 10px 8px; color: #84918c; font-size: 11px; border-radius: 4px; text-align: left; }
.category-sidebar button:hover, .category-sidebar button.active { background: var(--orange-soft); color: var(--orange); font-weight: 700; }
.category-sidebar button span { font: 9px var(--mono); color: #b6bdb7; }
.library-tip { border-top: 1px solid var(--line); margin-top: 25px; padding-top: 17px; display: flex; gap: 8px; }
.library-tip > span { color: var(--orange); }
.library-tip p { font-size: 9px; line-height: 1.6; color: #929c97; margin: 0; }
.library-tip b { color: #66746f; }
.toolbar { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 24px; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 0 12px; width: 260px; }
.search-box span { font-size: 20px; color: #9ca5a0; }
.search-box input { background: transparent; border: 0; outline: 0; width: 100%; font-size: 11px; color: var(--ink); }
.filters { display: flex; gap: 7px; }
.filter-btn, .sort-btn { border: 1px solid var(--line); border-radius: 4px; padding: 8px 11px; color: #86918d; font-size: 10px; }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.list-summary { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 13px; font: 10px var(--mono); color: #929c97; }
.sort-btn { border: 0; padding: 0; }
.question-item { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; margin-top: 10px; padding: 17px 18px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: .2s; }
.question-item:hover { border-color: #dca98e; box-shadow: var(--shadow); transform: translateX(2px); }
.question-index { font: 11px var(--mono); color: #b2bbb6; width: 25px; }
.question-main { flex: 1; }
.question-main h3 { font-size: 13px; margin: 0 0 9px; }
.question-main p { font-size: 10px; color: #89938e; margin: 0; }
.question-tags { display: flex; gap: 7px; align-items: center; }
.question-arrow { color: #c3cac5; font-size: 21px; margin-left: 8px; }

.question-header { display: flex; align-items: flex-start; gap: 25px; margin-bottom: 32px; }
.back-btn { color: #8b9893; font-size: 11px; margin-top: 6px; }
.question-head-main { flex: 1; }
.question-head-main h1 { font-size: 32px; letter-spacing: -1.5px; margin: 13px 0; }
.tag-row { display: flex; gap: 8px; align-items: center; }
.bookmark-btn { border: 1px solid var(--line); padding: 9px 13px; border-radius: 4px; font-size: 10px; color: #82908b; }
.question-layout { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 22px; }
.question-content { display: grid; gap: 14px; }
.problem-card, .editor-card, .output-card, .answer-sidebar > div { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.problem-card { padding: 23px 25px; }
.card-kicker { font: 10px var(--mono); letter-spacing: 1px; color: #9aa39e; text-transform: uppercase; }
.problem-card > p { font-size: 13px; line-height: 1.8; margin: 14px 0 21px; }
.expected { background: #f6f3ee; border-radius: 5px; padding: 14px; }
.expected > div:first-child { display: flex; justify-content: space-between; color: #9aa09b; font-size: 10px; margin-bottom: 11px; }
.expected b { font: 10px var(--mono); color: #687670; font-weight: 400; display: block; line-height: 1.8; }
.fake-result span { font: 8px var(--mono); color: #b0b7b1; display: inline-block; width: 30%; }
.editor-card { overflow: hidden; }
.editor-top, .output-top, .play-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.editor-hint { font: 9px var(--mono); color: #b1b9b4; margin-left: 13px; }
.editor-clear { font-size: 10px; color: #9aa39e; }
.editor-card textarea, .play-editor-card textarea { width: 100%; height: 205px; resize: vertical; border: 0; outline: 0; background: #172b2d; color: #d2ded6; padding: 21px 20px; font: 12px/1.8 var(--mono); }
.editor-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; color: #899791; font: 9px var(--mono); }
.editor-footer .ready-dot { margin-right: 7px; }
.execute-btn { background: var(--orange); color: #fff; border-radius: 4px; padding: 9px 13px; font-size: 10px; font-weight: 700; }
.output-card { min-height: 112px; }
.output-state { font: 9px var(--mono); color: #9aa49f; }
.empty-output { padding: 19px; color: #a0aaa5; font-size: 11px; overflow-x: auto; }
.result-table-wrap { overflow-x: auto; }
.result-table { width: 100%; border-collapse: collapse; min-width: 520px; font: 10px var(--mono); }
.result-table th { color: #9aa49f; text-align: left; font-weight: 500; border-bottom: 1px solid var(--line); padding: 8px 10px; white-space: nowrap; }
.result-table td { color: var(--ink); border-bottom: 1px solid var(--line); padding: 9px 10px; white-space: nowrap; }
.sql-error { color: #c55d52; background: #fff0ee; border: 1px solid #f0c8c2; border-radius: 5px; padding: 11px 12px; }
.plsql-output { margin: 0; padding: 14px; background: #0f1b1c; color: #d7e7dc; border-radius: 7px; font: 12px/1.7 var(--mono); white-space: pre-wrap; }
body.dark .plsql-output { background: #0b1314; color: #d7e7dc; }
.answer-sidebar { display: grid; align-content: start; gap: 11px; }
.side-note { padding: 18px 20px; background: #eef4ec !important; border: 0 !important; }
.note-icon { color: var(--orange); font-size: 18px; }
.side-note h3 { font-size: 13px; margin: 10px 0 7px; }
.side-note p { font-size: 11px; line-height: 1.7; color: #74837b; margin: 0; }
.answer-toggle { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 7px; color: #657570; background: var(--surface); font-size: 11px; }
.answer-body { display: none; padding: 18px 20px; }
.answer-body.open { display: block; }
.answer-body pre { background: #172b2d; color: #cbdad1; padding: 14px; font: 10px/1.8 var(--mono); overflow: auto; }
.answer-body p { font-size: 10px; color: #7f8b86; line-height: 1.7; }

.playground-intro { align-items: center; }
.connection-pill { background: var(--green-soft); color: #4d8066; border-radius: 30px; padding: 9px 14px; font: 10px var(--mono); }
.connection-pill .status-dot { margin-right: 7px; }
.playground-layout { display: grid; grid-template-columns: 1fr 270px; gap: 15px; }
.play-editor-card { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.tab { font: 10px var(--mono); color: #7c8c85; padding: 3px 8px 14px; border-bottom: 2px solid var(--orange); }
.tab span { margin-left: 10px; color: #b1bbb5; }
.play-editor-card textarea { height: 330px; }
.template-row { display: flex; gap: 7px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.template-row span { font: 9px var(--mono); color: #a2aaa5; margin-right: 5px; }
.template-row button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 3px; font-size: 9px; color: #7d8b85; }
.schema-card { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 17px; }
.schema-title { display: flex; justify-content: space-between; margin-bottom: 14px; }
.schema-table { border-top: 1px solid var(--line); padding: 13px 0; }
.schema-table div { display: flex; justify-content: space-between; }
.schema-table b { font: 11px var(--mono); color: #667b73; }
.schema-table span, .schema-table p { font-size: 9px; color: #9aa39e; margin: 7px 0 0; line-height: 1.6; }
.play-tip { display: flex; gap: 11px; background: var(--orange-soft); border-radius: 6px; padding: 16px; margin-top: 14px; color: #8d6b58; }
.play-tip > span { font: 20px var(--mono); color: var(--orange); }
.play-tip b { font-size: 11px; }
.play-tip p { font-size: 10px; line-height: 1.6; margin: 5px 0 0; }
.playground-output { margin-top: 15px; }

.knowledge-layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; }
.article-list { display: grid; align-content: start; gap: 7px; }
.article-list button { padding: 14px; text-align: left; border-radius: 6px; color: #7e8d87; font-size: 11px; }
.article-list button.active, .article-list button:hover { background: var(--surface); color: var(--orange); box-shadow: 0 4px 15px rgba(30, 48, 45, .04); }
.article-card { max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 32px 38px; }
.article-top { display: flex; justify-content: space-between; align-items: center; }
.article-card h2 { font-size: 28px; letter-spacing: -1px; margin: 17px 0 10px; }
.article-lead { font-size: 13px; line-height: 1.8; color: #788780; }
.syntax-block { position: relative; margin-top: 28px; background: #172b2d; border-radius: 6px; padding: 19px; color: #d3ddd6; }
.syntax-block .card-kicker { color: #76918a; }
.syntax-block pre { font: 12px/1.9 var(--mono); margin: 14px 0 0; }
.copy-btn { position: absolute; right: 14px; top: 14px; color: #9cb8aa; font: 9px var(--mono); }
.article-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; border-top: 1px solid var(--line); margin-top: 27px; padding-top: 22px; }
.article-columns h4 { font-size: 11px; }
.article-columns p { font-size: 11px; line-height: 1.8; color: #7e8d86; }
.article-cta { color: var(--orange); font-size: 11px; }
.answer-placeholder, .article-placeholder { padding: 16px 0; color: #9aa39e; font-size: 11px; }
.article-body p { font-size: 13px; line-height: 1.9; color: #5f6d68; margin: 0 0 14px; }
.answer-body .card-kicker { margin-top: 14px; }
.answer-body .card-kicker:first-child { margin-top: 0; }
.answer-body pre { white-space: pre-wrap; }
body.dark .article-body p { color: #b3c2bc; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 5px; font-size: 11px; opacity: 0; pointer-events: none; transition: .25s; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- 用户与认证 ---- */
.avatar { cursor: pointer; position: relative; user-select: none; }
.avatar.logged-in { background: var(--orange); color: #fff; }
.user-menu {
  position: absolute; top: 60px; right: 34px; min-width: 190px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  box-shadow: var(--shadow); padding: 10px; z-index: 30;
}
.user-menu-head { padding: 6px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.user-menu-head strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.user-menu-head small { color: var(--muted); font-size: 11px; }
.user-menu-head b { color: var(--orange); }
.user-menu-item { width: 100%; text-align: left; padding: 9px 8px; border-radius: 6px; color: #c2502a; font-size: 12px; }
.user-menu-item:hover { background: var(--orange-soft); }

.modal-overlay { position: fixed; inset: 0; background: rgba(15, 25, 26, .55); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 8px; padding: 3px; }
.auth-tab { padding: 7px 16px; border-radius: 6px; color: var(--muted); font-size: 12px; }
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.modal-close { font-size: 20px; color: var(--muted); line-height: 1; }
.auth-field { display: block; margin-bottom: 13px; font-size: 11px; color: var(--muted); }
.auth-field input { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 13px; }
.auth-field input:focus { outline: none; border-color: var(--orange); }
.auth-error { background: #fbeae3; color: #c2502a; border-radius: 7px; padding: 9px 12px; font-size: 11px; margin-bottom: 13px; }
.auth-submit { width: 100%; }

/* ---- 题库完成标记 ---- */
.question-item .q-status { font-size: 15px; width: 20px; text-align: center; color: #c9d2ce; flex-shrink: 0; }
.question-item.passed { border-left: 3px solid #65c59e; }
.question-item.attempted { border-left: 3px solid #e8b04b; }
.question-item .q-status.passed { color: #3aa77d; }
.question-item .q-status.attempted { color: #d99a2b; }
.grade-badge { display: inline-block; margin-left: 10px; padding: 3px 9px; border-radius: 20px; font-size: 10px; }
.grade-badge.pass { background: var(--green-soft); color: #2f8a63; }
.grade-badge.fail { background: #f6eadc; color: #b9832c; }

body.dark .auth-error { background: #3b2b24; color: #e89a74; }
body.dark .modal { background: #1a292a; }
body.dark .user-menu { background: #1a292a; }
body.dark .user-menu-item:hover { background: #243635; }

body.dark { --bg: #111d1e; --surface: #1a292a; --surface-2: #253637; --ink: #e5eeea; --muted: #9aaba4; --line: #304444; --orange-soft: #3b2b24; --green-soft: #243e35; }
body.dark .topbar { background: rgba(17, 29, 30, .86); }
body.dark .breadcrumb strong, body.dark .text-btn, body.dark .link-btn { color: #e5eeea; }
body.dark .expected { background: #203031; }
body.dark .feature-panel { background: #203832; }
body.dark .daily-panel { background: #3b2b24; }
body.dark .category-card, body.dark .question-item, body.dark .article-list button.active { box-shadow: none; }

@media (max-width: 1050px) {
  .hero-copy h1 { font-size: 47px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 20px; }
  .hero-copy { padding-top: 10px; }
  .library-layout { gap: 25px; }
  .page-wrap { padding-left: 4%; padding-right: 4%; }
}

@media (max-width: 750px) {
  .sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 10; transition: .25s; }
  .sidebar.open { left: 0; }
  .topbar { padding: 0 20px; height: 64px; }
  .mobile-menu { display: block; font-size: 19px; color: #75827e; margin-right: 14px; }
  .breadcrumb { margin-right: auto; }
  .page-wrap { padding: 33px 20px 55px; }
  .hero-copy h1 { font-size: 40px; letter-spacing: -2px; }
  .hero-copy > p { font-size: 13px; }
  .hero-meta { gap: 7px; flex-wrap: wrap; margin-top: 30px; }
  .hero-visual { height: 315px; }
  .code-window { width: 100%; }
  .orbit-one { width: 360px; }
  .orbit-two { width: 330px; }
  .float-tag { display: none; }
  .result-badge { right: -3px; bottom: 4px; }
  .section-heading { margin-top: 55px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading .link-btn { display: none; }
  .category-grid { gap: 8px; }
  .category-card { padding: 14px; min-height: 106px; }
  .bottom-grid, .playground-layout, .question-layout, .knowledge-layout { grid-template-columns: 1fr; }
  .bottom-grid { gap: 10px; }
  .page-intro { display: block; margin-bottom: 28px; }
  .page-intro .primary-btn { margin-top: 20px; }
  .library-layout { display: block; }
  .category-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 15px; margin-bottom: 20px; display: flex; overflow: auto; gap: 7px; }
  .category-sidebar h4, .library-tip { display: none; }
  .category-sidebar > div { display: flex; gap: 7px; }
  .category-sidebar button { white-space: nowrap; width: auto; padding: 8px 11px; border: 1px solid var(--line); }
  .toolbar { display: block; }
  .search-box { width: 100%; height: 36px; margin-bottom: 10px; }
  .filters { overflow: auto; }
  .question-item { padding: 14px 12px; }
  .question-tags { display: none; }
  .question-header { display: block; }
  .back-btn { margin-bottom: 23px; }
  .question-head-main h1 { font-size: 26px; }
  .bookmark-btn { margin-top: 18px; }
  .answer-sidebar { margin-top: 0; }
  .article-card { padding: 24px 20px; }
  .article-card h2 { font-size: 24px; }
  .article-columns { grid-template-columns: 1fr; }
  .playground-intro .connection-pill { display: inline-block; margin-top: 18px; }
  .play-editor-card textarea { height: 270px; }
  .play-side { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .play-tip { margin: 0; }
  .schema-card { padding: 13px; }
  .schema-table p { font-size: 8px; }
  .top-actions { gap: 7px; }
  .icon-btn { font-size: 18px; }
  .avatar { width: 27px; height: 27px; }
}
