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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
}

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

.title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.label {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
}

.input,
.textarea,
.select {
  width: 100%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: #3b82f6;
}

.textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.btn {
  width: 100%;
  padding: 14px;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 16px;
}

.btn:hover {
  opacity: 0.85;
}

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

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

.output-block {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 15px;
  background: #f9fafb;
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}

.disclaimer {
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 16px;
}

.home-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.home-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.home-card:active {
  transform: translateY(0);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: #eef2ff;
  color: #4f46e5;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.footer-btns {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-btns .btn {
  flex: 1;
}

.nav-bar {
  display: flex;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 8px;
}

.nav-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.nav-title {
  font-size: 18px;
  font-weight: 600;
  margin-left: 12px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #111827;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  margin-top: 12px;
  color: #6b7280;
  font-size: 14px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 200;
  animation: fadeInOut 2s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.quota-info {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  margin-top: 8px;
}

.user-id-tag {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
}

.user-id-text {
  font-family: monospace;
  color: #111827;
  font-weight: 600;
  font-size: 12px;
}

.copy-id-btn {
  background: #e5e7eb;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #374151;
}

.copy-id-btn:active {
  background: #d1d5db;
}

.admin-section {
  border-top: 1px solid #e5e7eb;
  margin-top: 24px;
  padding-top: 24px;
}

.user-list {
  max-height: 300px;
  overflow-y: auto;
}

.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}

.user-id {
  color: #6b7280;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-card {
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}

.admin-user-card:last-child {
  border-bottom: none;
}

.admin-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.admin-user-id {
  font-weight: 600;
  font-size: 15px;
  font-family: monospace;
}

.admin-user-stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

.admin-user-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.admin-user-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  width: auto !important;
  margin: 0 !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
}

.btn-danger {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

.badge-paid {
  background: #dcfce7;
  color: #16a34a;
}

.result-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
}

.result-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.result-tab.active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.score-block {
  text-align: center;
  padding: 24px 16px;
  border-radius: 12px;
}

.score-block--high {
  background: #dcfce7;
}

.score-block--mid {
  background: #fef9c3;
}

.score-block--low {
  background: #fee2e2;
}

.score-number {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
}

.score-block--high .score-number {
  color: #16a34a;
}

.score-block--mid .score-number {
  color: #ca8a04;
}

.score-block--low .score-number {
  color: #dc2626;
}

.score-label {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

.score-coverage {
  font-size: 13px;
  color: #374151;
  margin-top: 8px;
}

.keyword-count {
  font-weight: 400;
  color: #9ca3af;
  font-size: 13px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.kw-covered {
  background: #dcfce7;
  color: #16a34a;
}

.kw-missing {
  background: #fee2e2;
  color: #dc2626;
}

.correction-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.correction-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.correction-icon {
  color: #dc2626;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recommendation-item {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
  padding-left: 12px;
  border-left: 3px solid #3b82f6;
}

.version-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ver-tab {
  padding: 7px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.ver-tab.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.version-panel {
  display: none;
}

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

.version-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
}

.btn-copy {
  background: #f3f4f6;
  color: #111827;
  margin-top: 12px;
}

/* 使用提示折叠区域 */
.tips-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #eff6ff;
  border-radius: 10px;
  margin-bottom: 16px;
  cursor: pointer;
  border: 1px solid #bfdbfe;
  user-select: none;
}

.tips-toggle-text {
  font-size: 14px;
  font-weight: 600;
  color: #1d4ed8;
}

.tips-toggle-arrow {
  font-size: 12px;
  color: #3b82f6;
  transition: transform 0.2s;
}

.tips-toggle-arrow.open {
  transform: rotate(180deg);
}

.tips-body {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: #1e40af;
}

.tips-body ul {
  margin: 6px 0 0 16px;
  padding: 0;
}

.tips-body li {
  margin-bottom: 4px;
}

/* 表单提示 */
.hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
  line-height: 1.5;
}

/* 字数统计 */
.char-count {
  font-size: 12px;
  color: #9ca3af;
  text-align: right;
  margin-top: 4px;
}

.char-count.warn {
  color: #dc2626;
}

/* 提交按钮提示 */
.btn-hint {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  margin-top: 8px;
  min-height: 18px;
}

.placeholder {
  color: #9ca3af;
  font-style: italic;
  font-weight: 400;
}

/* 简历预览 */
.resume-preview {
  padding: 28px 20px;
}

.resume-name {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  color: #111827;
}

.resume-contact {
  text-align: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.resume-contact-item {
  white-space: nowrap;
}

.resume-contact-divider {
  color: #d1d5db;
}

.resume-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e5e7eb;
}

.resume-edu-item,
.resume-exp-item {
  margin-bottom: 12px;
}

.resume-edu-header,
.resume-exp-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.resume-edu-school,
.resume-exp-company {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

.resume-exp-role {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.resume-edu-period,
.resume-exp-period {
  font-size: 13px;
  color: #9ca3af;
  margin-left: auto;
}

.resume-edu-detail {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}

.resume-bullets {
  margin: 4px 0 0 18px;
  padding: 0;
  list-style: disc;
}

.resume-bullets li {
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 2px;
}

.resume-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-skill-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f3f4f6;
  border-radius: 16px;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.resume-self-intro {
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
  white-space: pre-wrap;
}
