/* PCB前列腺癌早筛公益小程序 - 高保真原型样式 v3 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #eef2f6;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

.mobile-frame {
  max-width: 430px;
  margin: 0 auto;
  background: #f8fafc;
  min-height: 100vh;
  position: relative;
  padding-bottom: 90px;
  box-shadow: 0 0 40px rgba(0,0,0,0.12);
}

.page-header {
  background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
  color: #fff;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(13,148,136,0.2);
}

.page-header-light {
  background: #fff;
  color: #1f2937;
  border-bottom: 1px solid #f1f5f9;
}

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(255,255,255,0.98);
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 18px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.tab-item {
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  text-decoration: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.tab-item.active {
  color: #0d9488;
}

.tab-icon {
  width: 24px;
  height: 24px;
}

.card {
  background: #fff;
  border-radius: 20px;
  margin: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
}

.card-flat {
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(13,148,136,0.25);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(13,148,136,0.2);
}

.btn-outline {
  background: #fff;
  color: #0d9488;
  border: 1.5px solid #0d9488;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: #f0fdfa;
}

.btn-ghost {
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
}

.progress-bg {
  background: #e2e8f0;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #0d9488 0%, #10b981 100%);
  height: 100%;
  border-radius: 999px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.tag-primary {
  background: #ccfbf1;
  color: #0f766e;
}

.tag-secondary {
  background: #f1f5f9;
  color: #64748b;
}

.tag-accent {
  background: #ffedd5;
  color: #c2410c;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: #d1fae5; color: #047857; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #dbeafe; color: #1d4ed8; }

.amount-btn {
  border: 1.5px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.amount-btn.active {
  border-color: #0d9488;
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.timeline-item {
  position: relative;
  padding-left: 24px;
  padding-bottom: 20px;
  border-left: 2px solid #e2e8f0;
  margin-left: 8px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0d9488;
}

.timeline-item:last-child {
  border-left: 2px solid transparent;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.rank-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-1 { background: #fef3c7; color: #b45309; }
.rank-2 { background: #f1f5f9; color: #475569; }
.rank-3 { background: #ffedd5; color: #c2410c; }
.rank-other { background: #f8fafc; color: #64748b; }

.admin-sidebar {
  width: 240px;
  background: #fff;
  min-height: 100vh;
  border-right: 1px solid #e2e8f0;
  position: fixed;
  left: 0;
  top: 0;
}

.admin-main {
  margin-left: 240px;
  padding: 28px;
  min-height: 100vh;
  background: #f8fafc;
}

@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 16px; }
}

.text-gradient {
  background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.tab-btn {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  white-space: nowrap;
}

.tab-btn.active {
  color: #0d9488;
  border-bottom-color: #0d9488;
  font-weight: 700;
}

.tab-panel.hidden {
  display: none;
}

.tab-panel.active {
  display: block;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.safe-area-bottom {
  height: 24px;
}
