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

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #fdf6ec;
  color: #333;
  min-height: 100vh;
}

/* ── 用户端页面 ─────────────────────── */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.page img {
  width: 100%;
  display: block;
}

.lottery-section {
  padding: 20px 24px 40px;
  text-align: center;
}

.lottery-note {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
  line-height: 1.6;
}

.btn-lottery {
  display: inline-block;
  width: 80%;
  max-width: 300px;
  padding: 14px 0;
  background: linear-gradient(135deg, #e53935, #d4342a);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-lottery:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(229, 57, 53, 0.3);
}

/* ── 弹窗遮罩 ──────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 360px;
  padding: 28px 24px;
  position: relative;
}

.modal h3 {
  text-align: center;
  font-size: 18px;
  margin-bottom: 20px;
  color: #d4342a;
}

.modal .close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-group input:focus {
  border-color: #e53935;
}

.btn-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #e53935, #d4342a);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 4px;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── 结果提示 ──────────────────────── */
.result-msg {
  text-align: center;
  padding: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: #666;
}

.result-msg.success {
  color: #e53935;
}

/* ── Toast 提示 ─────────────────────── */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  text-align: center;
  max-width: 80%;
}

.toast.show {
  opacity: 1;
}

/* ── 管理后台 ──────────────────────── */
.admin-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.admin-page h1 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #d4342a;
}

.stats-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  flex: 1;
  min-width: 140px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-card .label {
  font-size: 13px;
  color: #999;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-top: 4px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.toolbar input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.toolbar input[type="text"]:focus {
  border-color: #e53935;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.15s;
}

.btn:active {
  opacity: 0.8;
}

.btn-red {
  background: #e53935;
  color: #fff;
}

.btn-orange {
  background: #f57c00;
  color: #fff;
}

.btn-green {
  background: #43a047;
  color: #fff;
}

.btn-gray {
  background: #999;
  color: #fff;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

th {
  background: #fafafa;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #666;
  white-space: nowrap;
}

td {
  padding: 10px 14px;
  border-top: 1px solid #f0f0f0;
  white-space: nowrap;
}

tr:hover td {
  background: #fdf6ec;
}

/* ── 内定弹窗 ──────────────────────── */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.admin-modal-overlay.active {
  display: flex;
}

.admin-modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
}

.admin-modal h3 {
  margin-bottom: 16px;
  color: #333;
}

.admin-modal select,
.admin-modal input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

/* ── 开奖结果区域 ──────────────────── */
.results-section {
  margin-top: 24px;
}

.results-section h2 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #333;
}
