/* 卡蓝医疗 · 抽奖系统 —— 高端精致至臻审美 / 治愈系医疗空间主题，移动端优先 */

:root {
  --gold: #c9a86a;
  --gold-deep: #b08d4f;
  --rose: #d4a98a;
  --teal: #6b9a9b;
  --cream: #fdf9f5;
  --blush: #f6e9e4;
  --ink: #4a4038;
  --muted: #9a8c80;
  --line: #ece1da;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: linear-gradient(180deg, #fdf9f5 0%, #f8ede7 48%, #f3e5df 100%);
  min-height: 100vh;
  color: var(--ink);
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ---- 品牌头部 ---- */

.hero {
  text-align: center;
  padding: 34px 0 8px;
}

.brand-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold-deep);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 3px 14px;
  margin-bottom: 14px;
}

.brand-name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(120deg, #b08d4f 0%, #d9bc7f 45%, #b08d4f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.brand-sub {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 4px;
  margin-top: 6px;
}

/* ---- 信任点 ---- */

.trusts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 6px;
}

.trust {
  font-size: 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 7px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.trust b {
  color: var(--gold-deep);
  font-weight: 600;
}

/* ---- 转盘 ---- */

.wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 22px auto 0;
}

.wheel-ring {
  position: relative;
  border-radius: 50%;
  padding: 10px;
  background: linear-gradient(145deg, #e8d5b8 0%, #c9a86a 50%, #e8d5b8 100%);
  box-shadow: 0 10px 34px rgba(176, 141, 79, 0.28);
}

#wheel {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 50%;
}

.pointer {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 26px solid var(--gold-deep);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.spin-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #e3c586 0%, #c9a86a 100%);
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 3px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  z-index: 4;
}

.spin-btn:disabled {
  background: linear-gradient(180deg, #d8d2ca, #c2bbb2);
  color: #f0ece7;
  cursor: not-allowed;
}

.remain-tip {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
}

/* ---- 奖池列表 ---- */

.prize-pool {
  margin-top: 28px;
}

.pool-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 4px;
}

.pool-sub {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

.prize-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.prize-tier {
  flex: 0 0 auto;
  min-width: 58px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  border-radius: 9px;
  padding: 14px 8px;
  letter-spacing: 1px;
  margin-right: 13px;
}

.prize-info {
  flex: 1 1 auto;
  min-width: 0;
}

.prize-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.prize-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.5;
}

.prize-meta .val {
  color: var(--gold-deep);
  font-weight: 600;
}

.prize-right {
  flex: 0 0 auto;
  text-align: right;
  margin-left: 10px;
}

.prize-remain {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
}

.prize-remain-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.prize-rate {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: var(--gold);
  border-radius: 10px;
  padding: 1px 8px;
  margin-top: 4px;
}

.footer-note {
  text-align: center;
  font-size: 11px;
  color: #b9aea4;
  margin-top: 26px;
  line-height: 1.7;
}

/* ---- 弹窗 ---- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(58, 44, 36, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-box {
  background: #fffdfb;
  color: var(--ink);
  border-radius: 18px;
  padding: 26px 20px 20px;
  width: 100%;
  max-width: 340px;
  max-height: 82vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32);
  animation: pop 0.28s ease;
}

@keyframes pop {
  from { transform: scale(0.82); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  font-size: 52px;
  margin-bottom: 6px;
}

.modal-box h2 {
  font-size: 20px;
  color: var(--gold-deep);
  margin-bottom: 2px;
}

.modal-tier {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}

.modal-value {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, #d9bc7f, #b08d4f);
  border-radius: 14px;
  padding: 4px 14px;
  margin-bottom: 14px;
}

.modal-desc {
  text-align: left;
  background: #faf5f0;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 13px;
  color: #6b5f55;
  line-height: 1.7;
  margin-bottom: 12px;
  white-space: pre-line;
}

.modal-adv {
  text-align: left;
  background: #f3f8f6;
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #55605d;
  line-height: 1.7;
  margin-bottom: 12px;
}

.modal-adv b {
  color: var(--teal);
}

.modal-fee {
  font-size: 14px;
  font-weight: 700;
  color: #c0554f;
  margin-bottom: 14px;
}

.modal-box input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
  background: #fff;
}

.modal-box input:focus {
  border-color: var(--gold);
}

.submit-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, #d9bc7f, #b08d4f);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
}

.close-btn {
  margin-top: 10px;
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: #f2ede8;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

/* ---- 后台管理 ---- */

.admin-page {
  background: #f6f3f0;
  color: var(--ink);
  min-height: 100vh;
}

.admin-header {
  background: linear-gradient(120deg, #b08d4f, #c9a86a);
  color: #fff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h1 {
  font-size: 19px;
  letter-spacing: 1px;
}

.admin-header button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.admin-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.card h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--gold-deep);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

.stat-item {
  text-align: center;
  background: #faf7f3;
  border-radius: 8px;
  padding: 12px 6px;
}

.stat-item .num {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-deep);
}

.stat-item .label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.login-box {
  max-width: 360px;
  margin: 60px auto;
  background: #fff;
  border-radius: 12px;
  padding: 30px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.login-box h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--gold-deep);
}

.login-box input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 14px;
  outline: none;
}

.login-box button {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(120deg, #c9a86a, #b08d4f);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

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

th, td {
  padding: 9px 6px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #faf7f3;
}

.prize-emoji {
  font-size: 20px;
}

.color-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  vertical-align: middle;
}

.btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.btn-edit {
  background: #eef4f2;
  color: #4a8b8c;
}

.btn-del {
  background: #fbeeec;
  color: #c0554f;
}

.btn-primary {
  background: linear-gradient(120deg, #c9a86a, #b08d4f);
  color: #fff;
  padding: 8px 16px;
}

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

.form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  align-items: center;
}

.form-row input, .form-row select, .form-row textarea {
  flex: 1;
  min-width: 90px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}

.form-row textarea {
  min-width: 100%;
  flex-basis: 100%;
  resize: vertical;
}

.form-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6b5f55;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.tag-won {
  background: #fff3e0;
  color: #e65100;
}

.tag-lost {
  background: #eceff1;
  color: #607d8b;
}

.tag-claimed {
  background: #e8f5e9;
  color: #2e7d32;
}

.hidden {
  display: none !important;
}

.empty {
  text-align: center;
  color: #999;
  padding: 24px 0;
  font-size: 14px;
}
