* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* 头部Banner */
.banner {
  width: 100%;
  overflow: hidden;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  min-height: 120px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 标题区 */
.header {
  background: #fff;
  padding: 20px 16px 16px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.header h1 {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* 表单卡片 */
.form-card {
  background: #fff;
  margin: 12px 16px;
  padding: 20px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.form-label.required::after {
  content: '*';
  color: #ff4d4f;
  margin-left: 4px;
}

/* 输入框 */
input[type="text"],
input[type="tel"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 15px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: #07c160;
}

input::placeholder {
  color: #bfbfbf;
}

/* 单选按钮组 - 年级 */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-item {
  flex: 1 1 calc(33.33% - 7px);
  min-width: 80px;
}

.radio-item input {
  display: none;
}

.radio-item span {
  display: block;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-item input:checked + span {
  background: #e6f7ed;
  border-color: #07c160;
  color: #07c160;
  font-weight: 500;
}

/* 课程选择卡片 */
.course-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-card {
  display: block;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.course-card input {
  display: none;
}

.course-card:hover {
  border-color: #b3b3b3;
}

.course-card input:checked + .course-info {
  color: #07c160;
}

.course-card:has(input:checked) {
  border-color: #07c160;
  background: #e6f7ed;
}

.course-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.course-date {
  font-size: 14px;
  color: #666;
  flex: 1;
  text-align: center;
}

.course-price {
  font-size: 18px;
  font-weight: 700;
  color: #ff4d4f;
}

.course-card:has(input:checked) .course-name,
.course-card:has(input:checked) .course-date {
  color: #07c160;
}

.course-card:has(input:checked) .course-price {
  color: #ff6b6b;
}

/* 金额条 */
.amount-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-top: 8px;
  border-top: 1px dashed #e8e8e8;
  font-size: 15px;
  color: #666;
}

.amount {
  font-size: 24px;
  font-weight: 700;
  color: #ff4d4f;
}

/* 提交按钮 */
.submit-btn {
  width: 100%;
  height: 48px;
  background: #07c160;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.submit-btn:active {
  background: #06ad56;
}

.submit-btn:disabled {
  background: #b3e6c8;
  cursor: not-allowed;
}

/* 底部 */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #999;
}

/* 加载遮罩 */
.mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: #fff;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 错误提示 */
.error-msg {
  color: #ff4d4f;
  font-size: 13px;
  margin-top: 4px;
}

input.error {
  border-color: #ff4d4f !important;
}
