/* 主题变量 + 基础元素样式。与 Clootee 的 styles.css 同一套变量名，
   这样 exam.css 里的布局代码可以和小白教程保持一致的写法。
   本项目是纯静态站，不依赖任何外部 CSS。 */

[hidden] { display: none !important; }

/* 深色（默认） */
:root, body.dark {
  --bg: #0f1115;
  --panel: #171a21;
  --panel2: #1f2430;
  --border: #2a2f3a;
  --text: #e6e8ec;
  --muted: #8b93a3;
  --accent: #5b8cff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --gray: #6e7681;
  --overlay: rgba(0, 0, 0, .6);
  --codebg: #0b0d11;
  --hover: #2a3040;
  --active: #243049;
}

/* 浅色 */
body.light {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel2: #eef1f7;
  --border: #d8dee9;
  --text: #1b2230;
  --muted: #65718a;
  --accent: #2f6fed;
  --green: #1a7f37;
  --yellow: #9a6700;
  --red: #cf222e;
  --gray: #8b94a6;
  --overlay: rgba(20, 28, 46, .35);
  --codebg: #f0f3f9;
  --hover: #e2e7f0;
  --active: #dbe6ff;
}

/* 大海蓝 */
body.ocean {
  --bg: #0a1a2f;
  --panel: #0f2440;
  --panel2: #163050;
  --border: #22456d;
  --text: #dce8f5;
  --muted: #7f9dc0;
  --accent: #38bdf8;
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #fb7185;
  --gray: #64748b;
  --overlay: rgba(2, 12, 25, .62);
  --codebg: #08182b;
  --hover: #1c3a5c;
  --active: #1e4a78;
}

/* 暖阳（浅色系，米黄基调） */
body.warm {
  --bg: #fdf6ec;
  --panel: #fffdf9;
  --panel2: #f6ead6;
  --border: #e8d6ba;
  --text: #4a3928;
  --muted: #97836a;
  --accent: #e08a3c;
  --green: #1a7f37;
  --yellow: #b4690e;
  --red: #d6336c;
  --gray: #b09a7f;
  --overlay: rgba(74, 57, 40, .3);
  --codebg: #f7efe2;
  --hover: #f0e0c8;
  --active: #f7ddb8;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: background .2s, color .2s;
}

select, input, textarea, button {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
}
select, input, textarea { width: 100%; }
input::placeholder, textarea::placeholder { color: var(--muted); }

button { cursor: pointer; background: var(--panel2); transition: background .15s; }
button:hover { background: var(--hover); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { filter: brightness(1.1); }
button.danger { color: var(--red); }
button:disabled { opacity: .4; cursor: not-allowed; }

a { color: var(--accent); }
