/* ===== 基础与主题 ===== */
:root {
  --primary: #1a5fb4;
  --primary-dark: #144a8f;
  --primary-light: #eaf1fb;
  --accent: #f2a71b;
  --text: #22303f;
  --text-light: #5c6b7a;
  --card-bg: #ffffff;
  --danger: #d93025;
  --success: #18864b;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(26, 95, 180, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(160deg, #eef4fc 0%, #dfe9f7 55%, #d3e2f5 100%);
  background-attachment: fixed;
}

.hidden {
  display: none !important;
}

/* ===== 页面容器 ===== */
.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== 顶部标题 ===== */
.page-header {
  text-align: center;
  margin-bottom: 24px;
  padding-top: 12px;
}

.logo-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(26, 95, 180, 0.35);
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

.page-header p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== 表单卡片 ===== */
.feedback-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.field .required {
  color: var(--danger);
}

.field input,
.field textarea {
  width: 100%;
  border: 1.5px solid #d9e2ee;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--text);
  background: #f8fafd;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a4b2c3;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.12);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.counter {
  text-align: right;
  font-size: 12px;
  color: #a4b2c3;
  margin-top: 6px;
}

/* ===== 提交按钮 ===== */
.submit-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px 0;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 18px rgba(26, 95, 180, 0.35);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s, opacity 0.2s;
  letter-spacing: 2px;
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.submit-btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit-btn.loading .spinner {
  display: block;
}

.submit-btn.loading .btn-text {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== 错误提示 ===== */
.error-msg {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--danger);
  background: #fdecea;
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.5;
}

.privacy-note {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #a4b2c3;
  line-height: 1.5;
}

/* ===== 页脚 ===== */
.page-footer {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

/* ===== 提交成功页 ===== */
#successView {
  justify-content: center;
  align-items: center;
  padding-bottom: 60px;
}

.success-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 44px 32px 36px;
  box-shadow: var(--shadow);
  text-align: center;
  width: 100%;
  animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 对勾动画 */
.checkmark {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
}

.checkmark svg {
  width: 100%;
  height: 100%;
}

.checkmark circle {
  stroke: var(--success);
  stroke-width: 2.5;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.55s ease forwards;
}

.checkmark path {
  stroke: var(--success);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: draw 0.4s ease 0.5s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.success-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.success-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 26px;
}

.again-btn {
  border: none;
  border-radius: 14px;
  padding: 13px 34px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.again-btn:active {
  transform: scale(0.97);
  background: #dbe7f7;
}
