/* ===================== 入口页（落地页 / 教师登录）共享样式 =====================
   视觉风格与教师端后台（styles.css）保持一致：扁平、细边框、克制阴影、统一蓝 #3b6fe0 */
:root {
  --bg: #f8f9fb;
  --bg-2: #eef2f8;
  --text: #1a2230;
  --text-2: #566175;
  --muted: #8a95a5;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --border: #e4e9f0;
  --border-strong: #d4dbe6;
  --accent: #3b6fe0;
  --accent-2: #3b6fe0;
  --accent-hover: #2f5fc8;
  --accent-weak: rgba(59, 111, 224, 0.10);
  --accent-weak-2: rgba(59, 111, 224, 0.16);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 6px 20px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
}
[data-theme="dark"] {
  --bg: #0f141b;
  --bg-2: #1e2733;
  --text: #e6ebf2;
  --text-2: #a4afbd;
  --muted: #6e7a8a;
  --surface: #161d27;
  --surface-2: #1e2733;
  --border: #28333f;
  --border-strong: #34404e;
  --accent: #5b8bff;
  --accent-2: #5b8bff;
  --accent-hover: #6f9bff;
  --accent-weak: rgba(91, 139, 255, 0.14);
  --accent-weak-2: rgba(91, 139, 255, 0.20);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 22px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.entry-wrap {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 96px 20px 40px;
}

/* 顶栏：标题 + 主题切换 */
.entry-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.entry-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; }
.entry-brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: grid; place-items: center; color: #fff; font-size: 16px;
  box-shadow: 0 4px 12px var(--accent-weak-2);
}
.entry-brand .brand-name { font-size: 16px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 17px;
  transition: transform .25s cubic-bezier(.16,1,.3,1), background .2s, border-color .2s;
}
.theme-toggle:hover { transform: scale(1.06) rotate(-8deg); border-color: var(--accent); }

/* 落地页主体 */
.hero { text-align: center; max-width: 760px; margin-bottom: 36px; }
.hero h1 {
  font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; line-height: 1.2;
  background: linear-gradient(120deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* 四个入口：桌面水平一行，平板两列，手机单列 */
.role-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  width: 100%; max-width: 1080px;
}
.role-card {
  position: relative; cursor: pointer; user-select: none;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 30px 22px; text-align: center; overflow: hidden;
  transition: transform .28s cubic-bezier(.16,1,.3,1), box-shadow .28s, border-color .28s;
}
.role-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.role-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.role-icon {
  width: 60px; height: 60px; border-radius: 14px; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 28px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: 0 8px 20px var(--accent-weak-2);
}
.role-icon svg { width: 30px; height: 30px; display: block; }
.role-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.role-card .enter {
  margin-top: 16px; font-size: 13px; color: var(--accent); font-weight: 600;
  transition: letter-spacing .25s ease;
}
.role-card:hover .enter { letter-spacing: .5px; }

.entry-foot { margin-top: 36px; color: var(--muted); font-size: 13px; text-align: center; }

/* 备案号页脚 */
.icp-foot { margin-top: 16px; text-align: center; }
.icp-foot a {
  display: inline-block; color: var(--muted); font-size: 12.5px; text-decoration: none;
  letter-spacing: .3px; transition: color .2s;
}
.icp-foot a:hover { color: var(--accent); }

/* 登录卡片（教师登录页复用本样式） */
.login-card {
  width: 100%; max-width: 400px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md); padding: 32px 30px;
}
.login-card h2 { margin: 0 0 4px; font-size: 24px; }
.login-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 12px 14px; font-size: 15px; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  outline: none; transition: border-color .25s, box-shadow .25s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.btn-primary {
  width: 100%; padding: 13px; margin-top: 6px; font-size: 15px; font-weight: 600; color: #fff;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: 0 8px 20px var(--accent-weak-2);
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s, opacity .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--accent-weak-2); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-ghost {
  display: inline-block; margin-top: 16px; font-size: 13px; color: var(--muted);
  text-decoration: none; transition: color .2s;
}
.btn-ghost:hover { color: var(--accent); }
.msg { margin-top: 14px; font-size: 13.5px; min-height: 18px; }
.msg.err { color: #e2574c; }
.msg.ok { color: #18a957; }

@media (max-width: 980px) {
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
}
@media (max-width: 560px) {
  .role-grid { grid-template-columns: 1fr; max-width: 360px; }
  .entry-wrap { padding-top: 84px; }
}
