/* 沈理校园 · 意见反馈 —— 配色与组件风格对齐官网 sylulive.online */

:root {
  --bg: #f8fbff;
  --paper: #ffffff;
  --ink: #182133;
  --muted: #667087;
  --cyan: #0eb5d8;
  --blue: #4d6ff7;
  --teal: #1aa989;
  --coral: #f27e82;
  --warm: #f4a34d;
  --violet: #8b76f4;
  --line: rgba(18, 177, 199, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* 背景装饰色块 */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #f4faff 0%, #fbfdff 60%, #fff 100%);
}
.bg-decor::before,
.bg-decor::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.bg-decor::before {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(14, 181, 216, 0.28), rgba(77, 111, 247, 0.16));
}
.bg-decor::after {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(139, 118, 244, 0.2), rgba(26, 169, 137, 0.12));
}

/* 顶栏 */
.topbar {
  width: min(920px, 100% - 32px);
  margin: 0 auto;
  padding: 18px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; }
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  box-shadow: 0 6px 18px rgba(31, 42, 68, 0.14);
}
.brand-name { font-size: 15px; font-weight: 800; letter-spacing: 0.01em; line-height: 1.15; }
.brand-name small {
  display: block;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.12em;
  color: #8791a7;
}
.nav-cta {
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  background: #1f2a44;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(31, 42, 68, 0.16);
  transition: 0.25s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); }

/* 舞台与步骤条 */
.stage {
  width: min(640px, 100% - 24px);
  margin: 0 auto;
  padding: 22px 0 40px;
  flex: 1;
}
.steps {
  list-style: none;
  margin: 0 auto 18px;
  padding: 6px 10px;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(31, 42, 68, 0.06);
  backdrop-filter: blur(6px);
}
.steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 780;
  color: #9aa4b7;
}
.steps li i {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  background: #eef2f8;
  color: #9aa4b7;
  transition: 0.25s var(--ease);
}
.steps li.is-active { color: #3d4962; }
.steps li.is-active i {
  background: linear-gradient(135deg, #159cbb, #496cf4);
  color: #fff;
  box-shadow: 0 6px 14px rgba(65, 111, 221, 0.3);
}
.steps li.is-done { color: var(--teal); }
.steps li.is-done i { background: rgba(26, 169, 137, 0.14); color: var(--teal); }

/* 卡片 */
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(31, 42, 68, 0.08);
  padding: 34px 36px 30px;
  animation: card-in 0.45s var(--ease);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.card-title {
  margin: 0;
  font-size: clamp(24px, 4.5vw, 31px);
  font-weight: 950;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: transparent;
  background: linear-gradient(100deg, #09afd4 0%, #358ee8 35%, #526cf5 62%, #765ee8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.card-sub { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.mascot img { width: 100%; height: auto; display: block; object-fit: contain; }
.mascot-float {
  position: absolute;
  top: -26px;
  right: 22px;
  width: 92px;
  animation: bob 3.4s ease-in-out infinite;
  filter: drop-shadow(0 12px 22px rgba(31, 42, 68, 0.18));
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-8px) rotate(-2deg); }
}

/* 表单 */
form { margin-top: 22px; }
.field { display: block; margin-bottom: 16px; }
.field > span:first-child {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #536077;
}
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid #e3ecf6;
  border-radius: 14px;
  background: #fbfdff;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: 0.2s var(--ease);
}
.field input::placeholder { color: #a8b1c2; }
.field input:focus {
  border-color: var(--cyan);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 181, 216, 0.14);
}
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 9px;
  background: rgba(14, 181, 216, 0.1);
  color: #168fa8;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s var(--ease);
}
.pw-toggle:hover { background: rgba(14, 181, 216, 0.18); }

.btn-primary {
  width: 100%;
  height: 50px;
  margin-top: 6px;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: linear-gradient(135deg, #159cbb, #496cf4);
  box-shadow: 0 14px 34px rgba(65, 111, 221, 0.23);
  transition: 0.25s var(--ease);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(65, 111, 221, 0.3); }
.btn-primary:active:not(:disabled) { transform: none; }
.btn-primary:disabled { opacity: 0.65; cursor: wait; }

.form-note {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}
.form-error {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fdf0f0;
  border: 1px solid rgba(242, 126, 130, 0.45);
  color: #b3454a;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.6;
}

/* 题目 */
.q { border: none; margin: 26px 0 0; padding: 0; transition: 0.25s var(--ease); }
.q legend {
  padding: 0;
  margin-bottom: 13px;
  font-size: 15px;
  font-weight: 850;
  color: #24324a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.q legend em {
  font-style: normal;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  color: #168fa8;
  background: linear-gradient(135deg, rgba(18, 177, 199, 0.12), rgba(77, 111, 247, 0.1));
  border: 1px solid rgba(18, 177, 199, 0.22);
  border-radius: 8px;
  padding: 3px 8px;
}
.q.is-missing { animation: missing 0.35s ease; }
@keyframes missing {
  0%, 100% { transform: none; }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  position: relative;
  cursor: pointer;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border: 1.5px solid #e3ecf6;
  border-radius: 13px;
  background: #fbfdff;
  font-size: 14px;
  font-weight: 750;
  color: #536077;
  transition: 0.2s var(--ease);
}
.choice:hover span { border-color: rgba(14, 181, 216, 0.5); transform: translateY(-1px); }
.choice.is-checked span {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #159cbb, #496cf4);
  box-shadow: 0 10px 24px rgba(65, 111, 221, 0.26);
}
.choice-lg span { height: 52px; padding: 0 34px; font-size: 15px; }
.choice input:focus-visible + span { outline: 3px solid rgba(14, 181, 216, 0.4); outline-offset: 2px; }

/* 评分 */
.score-row { display: flex; flex-wrap: wrap; gap: 7px; }
.score-btn {
  width: 42px;
  height: 42px;
  border: 1.5px solid #e3ecf6;
  border-radius: 13px;
  background: #fbfdff;
  color: #536077;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: 0.18s var(--ease);
}
.score-btn:hover { border-color: rgba(14, 181, 216, 0.5); transform: translateY(-2px); }
.score-btn.is-selected { color: #fff; border-color: transparent; transform: scale(1.08); }
.score-btn.is-selected[data-bucket="low"] { background: linear-gradient(135deg, #ef8085, #f2aa53); box-shadow: 0 10px 22px rgba(242, 126, 130, 0.32); }
.score-btn.is-selected[data-bucket="mid"] { background: linear-gradient(135deg, #f2aa53, #e8c25a); box-shadow: 0 10px 22px rgba(244, 163, 77, 0.32); }
.score-btn.is-selected[data-bucket="good"] { background: linear-gradient(135deg, #1aa989, #17b1c5); box-shadow: 0 10px 22px rgba(26, 169, 137, 0.32); }
.score-btn.is-selected[data-bucket="great"] { background: linear-gradient(135deg, #17b1c5, #496cf4); box-shadow: 0 10px 22px rgba(77, 111, 247, 0.32); }
.score-btn:focus-visible { outline: 3px solid rgba(14, 181, 216, 0.4); outline-offset: 2px; }
.score-hint { margin: 11px 0 0; font-size: 12.5px; color: var(--muted); min-height: 1.4em; }

/* 意见输入 */
.ta-wrap { position: relative; display: block; }
.ta-wrap textarea {
  width: 100%;
  padding: 13px 14px 30px;
  border: 1.5px solid #e3ecf6;
  border-radius: 14px;
  background: #fbfdff;
  color: var(--ink);
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.75;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: 0.2s var(--ease);
}
.ta-wrap textarea::placeholder { color: #a8b1c2; }
.ta-wrap textarea:focus {
  border-color: var(--cyan);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 181, 216, 0.14);
}
.ta-count {
  position: absolute;
  right: 13px;
  bottom: 11px;
  font-size: 11px;
  font-weight: 700;
  color: #a8b1c2;
}

#survey-error { margin-bottom: 14px; }
#submit-btn { margin-top: 24px; }

/* 完成页 */
.card-thanks { text-align: center; padding-top: 44px; padding-bottom: 40px; }
.mascot-big { width: 148px; display: inline-block; animation: pop 0.55s var(--ease); filter: drop-shadow(0 16px 30px rgba(31, 42, 68, 0.18)); }
@keyframes pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
.card-thanks .card-sub { margin-bottom: 24px; }
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0 34px;
  text-decoration: none;
}

/* 页脚 */
.foot { padding: 10px 16px 34px; text-align: center; }
.rainbow-rule {
  height: 5px;
  max-width: 640px;
  margin: 0 auto 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, #17b1c5 0 20%, #4b7af2 20% 40%, #8d75f3 40% 60%, #ef8085 60% 80%, #f2aa53 80% 100%);
}
.foot p { margin: 4px 0; font-size: 12px; color: #9aa4b7; }
.foot a { color: #168fa8; text-decoration: none; font-weight: 700; }
.foot a:hover { text-decoration: underline; }
.foot-slogan { font-weight: 800; color: #7d879c; letter-spacing: 0.06em; }

@media (max-width: 560px) {
  .card { padding: 26px 20px 24px; }
  .mascot-float { width: 70px; top: -20px; right: 14px; }
  .steps { gap: 14px; padding: 6px 12px; }
  .steps li span { display: none; }
  .score-btn { width: 36px; height: 38px; }
  .choice-lg span { padding: 0 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
