/* ==========================================================================
   青少年领袖训练营 - 课前问卷设计系统
   ========================================================================== */
:root {
  --primary-color: #2b5c8f;
  --primary-hover: #1e436b;
  --primary-light: #eef4fb;
  --accent-color: #f39c12;
  --success-color: #27ae60;
  --danger-color: #e74c3c;
  --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --card-bg: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #626d7a;
  --border-color: #e1e8ed;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px 12px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

/* 头部卡片 */
.header-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.header-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #2b5c8f, #f39c12, #27ae60);
}

.header-card h1 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 2px;
}

.header-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

.brand-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: left;
  margin-bottom: 14px;
}

.brand-logo {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(143, 85, 48, 0.2);
}

.brand-copy {
  min-width: 0;
}

.header-card .brand-subtitle {
  color: #9a603b;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.header-card .brand-slogan {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 6px;
}

/* 步骤条 */
.step-bar {
  display: flex;
  justify-content: space-between;
  background: var(--card-bg);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.step-item {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
  font-weight: 500;
}

.step-item.active {
  color: var(--primary-color);
  font-weight: 700;
}

.step-item.completed {
  color: var(--success-color);
}

.step-item .circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f3f6;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  font-size: 14px;
}

.step-item.active .circle {
  background: var(--primary-color);
  color: #fff;
}

.step-item.completed .circle {
  background: var(--success-color);
  color: #fff;
}

/* 问卷表单卡片 */
.form-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.step-section {
  display: none;
}

.step-section.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 18px;
  color: var(--primary-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
  margin-bottom: 20px;
  font-weight: 600;
}

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

.form-group.required label::after {
  content: ' *';
  color: var(--danger-color);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
  background: #fcfdfe;
  transition: all 0.2s;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43, 92, 143, 0.15);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* 选项组（单选/多选） */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.option-box {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fbfcfd;
  transition: all 0.2s;
  user-select: none;
}

.option-box:hover {
  background: var(--primary-light);
  border-color: #b5d1f0;
}

.option-box input {
  margin-right: 8px;
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
}

/* 按钮组 */
.btn-group {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #edf2f7;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-success {
  background: var(--success-color);
  color: #fff;
}

.btn-success:hover {
  background: #219653;
}

.btn-danger {
  background: #fef2f2;
  color: var(--danger-color);
  border: 1px solid #fca5a5;
}

.btn-danger:hover {
  background: #fee2e2;
}

/* 成功感谢提示 */
.success-card {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  font-size: 60px;
  color: var(--success-color);
  margin-bottom: 16px;
}

/* ==========================================================================
   后台管理界面专用样式
   ========================================================================== */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.admin-title h2 {
  font-size: 20px;
  color: var(--primary-color);
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-box {
  display: flex;
  gap: 8px;
  background: var(--card-bg);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.search-box input {
  flex: 1;
}

.table-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table th,
table.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

table.data-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

table.data-table tr:hover {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

/* 模态框 Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 750px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.close-btn {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  background: none;
  border: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

.detail-item {
  margin-bottom: 10px;
}

.detail-item.full-width {
  grid-column: span 2;
}

.detail-label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 13px;
  margin-bottom: 2px;
}

.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  word-break: break-all;
}

/* 二维码弹层 */
.qr-container {
  text-align: center;
  padding: 20px;
}

.qr-container img {
  width: 220px;
  height: 220px;
  margin: 16px 0;
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* 提示家长继续点击按钮（居中、红字、向下小手指） */
.next-step-container {
  text-align: center;
  margin-top: 24px;
  padding: 18px 16px;
  background: #fff5f5;
  border: 1px dashed #feb2b2;
  border-radius: var(--radius-md);
}

.next-step-hint {
  text-align: center;
  font-size: 16px;
  color: #e53e3e; /* 鲜艳红色 */
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.next-step-hint span.finger-down {
  font-size: 22px;
  display: inline-block;
  animation: bounceDown 1.2s infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.btn-block-next {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(43, 92, 143, 0.25);
  background: var(--primary-color);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-block-next:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(43, 92, 143, 0.35);
}

.multi-child-notice {
  background: #f0f7ff;
  border: 2px dashed #b5d1f0;
  border-radius: var(--radius-md);
  padding: 20px 16px;
  margin: 20px 0;
  text-align: center;
}

@media (max-width: 520px) {
  .header-card {
    padding: 24px 18px 20px;
  }

  .brand-heading {
    gap: 12px;
    justify-content: flex-start;
  }

  .brand-logo {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .header-card h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  .header-card .brand-subtitle {
    font-size: 14px;
  }

  .header-card .brand-slogan {
    font-size: 12px;
    line-height: 1.45;
  }
}

@media print {
  body {
    background: #fff;
    padding: 0;
  }
  .modal-content {
    max-height: none;
    box-shadow: none;
    width: 100%;
  }
  .admin-header, .search-box, .btn, .close-btn {
    display: none !important;
  }
}
