/* 量刑减刑查询平台 - 专业UI设计 */
/* 柔和绿+米色配色，矩形扁平化 */

/* CSS变量 - 柔和绿色系 */
:root {
  --primary: #5A8F7B;
  --primary-light: #E8F0EB;
  --primary-dark: #3D6B5A;
  --secondary: #F5F1E8;
  --secondary-dark: #E8E4D8;
  --accent: #8B7355;
  --text-primary: #2C3E3A;
  --text-secondary: #5A6B68;
  --text-hint: #8A9A97;
  --background: #F8F6F2;
  --card-bg: #FFFFFF;
  --border: #D8D4C8;
  --shadow: rgba(58, 107, 90, 0.08);
  --success: #5A8F7B;
  --warning: #C49A6C;
  --danger: #B85450;
  --radius: 4px;
  --radius-sm: 3px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  padding-bottom: 60px;
  font-size: 15px;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* Page Container */
.page-container {
  display: none;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-container.active {
  display: block;
}

/* Header - 专业简洁风格 */
.header {
  background: var(--primary);
  color: white;
  padding: 16px 20px;
  position: relative;
}

.header-content {
  text-align: center;
}

.header-content h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 1px;
}

.header-content p {
  font-size: 13px;
  opacity: 0.85;
}

/* 页面横幅 */
.banner-section {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  display: block;
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
}

/* 返回按钮 - 文字样式 */
.back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: white;
  cursor: pointer;
  padding: 6px 12px;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s;
}

.back-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Container */
.container {
  padding: 16px;
  max-width: 100%;
}

/* 首页模块网格 */
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

/* 模块卡片 - 矩形扁平化 */
.module-card {
  background: var(--card-bg);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.module-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.module-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.module-card:hover::before {
  opacity: 1;
}

.module-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
  fill: none;
}

.module-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.module-desc {
  font-size: 12px;
  color: var(--text-hint);
}

/* 模块卡片 - 扁平样式 */
.module-card-flat {
  background: var(--card-bg);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-sizing: border-box;
}

.flat-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.flat-title-icon {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
}

/* 表单样式 */
.form-group {
  margin-bottom: 16px;
}

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

.form-label .required {
  color: var(--danger);
}

.form-label .hint {
  font-size: 12px;
  color: var(--text-hint);
  font-weight: normal;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field,
.select-field,
.textarea-field {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFAF8;
  transition: all 0.2s;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.input-wrapper .input-field {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

input[type="date"].input-field,
input[type="date"].date-input-field {
  -webkit-appearance: none;
  appearance: none;
}

.input-field:focus,
.select-field:focus,
.textarea-field:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

.textarea-field {
  min-height: 100px;
  resize: vertical;
}

.select-wrapper {
  position: relative;
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-hint);
  font-size: 10px;
  pointer-events: none;
}

.select-field {
  appearance: none;
  padding-right: 36px;
}

/* Radio Group - 矩形样式 */
.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--secondary);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  min-height: 48px;
  min-width: 100px;
  flex: 1;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.radio-item:hover {
  border-color: var(--primary);
}

.radio-item.active {
  background: var(--primary-light);
  border-color: var(--primary);
}

.radio-item input[type="radio"] {
  display: none;
}

.radio-item .radio-dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  background: white;
  position: relative;
  flex-shrink: 0;
}

.radio-item.active .radio-dot {
  border-color: var(--primary);
}

.radio-item.active .radio-dot::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 8px;
  height: 8px;
  background: var(--primary);
}

.radio-label {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

/* 搜索选择框 */
.search-select-wrapper {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 14px;
  padding-left: 40px;
  font-size: 15px;
  border: 1px solid var(--border);
  background: #FAFAF8;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-hint);
}

.search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

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

.search-btn.loading {
  background: var(--primary-light);
  cursor: not-allowed;
}

.search-btn.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

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

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  margin-top: 2px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 12px var(--shadow);
}

.search-dropdown.show {
  display: block;
}

.search-option {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  font-size: 14px;
}

.search-option:last-child {
  border-bottom: none;
}

.search-option:hover {
  background: var(--primary-light);
}

.search-option.active {
  background: var(--primary-light);
  color: var(--primary);
}

.selected-crime {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  margin-top: 8px;
}

.selected-crime-text {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

.selected-crime-clear {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
}

/* 按钮样式 - 矩形扁平 */
.btn-predict {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 20px;
  letter-spacing: 1px;
}

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

.btn-predict:disabled {
  background: var(--text-hint);
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  padding: 12px 20px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-inline {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-inline:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-predict-inline {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

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

.ai-analysis-content {
  padding: 16px;
  background: var(--secondary);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
}

.ai-loading-indicator {
  text-align: center;
  color: var(--text-secondary);
  padding: 20px;
}

.result-card {
  background: var(--secondary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.result-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--primary);
}

.result-icon {
  font-size: 24px;
}

.result-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.result-card-body {
  padding: 20px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.result-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.result-value {
  font-size: 15px;
  color: var(--primary);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

.ai-action-buttons {
  display: none;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 2px;
}

.ai-action-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

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

.prediction-card {
  background: var(--secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prediction-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: var(--primary);
  color: white;
}

.prediction-icon {
  font-size: 24px;
}

.prediction-title {
  font-size: 16px;
  font-weight: 600;
}

.prediction-body {
  padding: 16px;
}

.prediction-result {
  text-align: center;
  margin-bottom: 16px;
}

.result-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.result-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.prediction-tips p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 订阅价格卡片 */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pricing-item {
  position: relative;
  background: var(--secondary);
  border: 1px solid var(--border);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.pricing-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pricing-item:hover {
  border-color: var(--primary);
}

.pricing-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
}

.pricing-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pricing-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.pricing-price span {
  font-size: 12px;
  font-weight: normal;
  color: var(--text-hint);
}

.pricing-desc {
  font-size: 11px;
  color: var(--text-hint);
}

.pricing-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 10px;
  padding: 2px 8px;
}

.pricing-badge.hot {
  background: var(--warning);
}

/* 订单摘要 */
.order-info {
  background: var(--secondary);
  padding: 16px;
  border: 1px solid var(--border);
}

.order-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.order-row:last-child {
  border-bottom: none;
}

.order-row.total {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 2px solid var(--primary);
  border-bottom: none;
}

.order-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.order-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.order-row.total .order-value {
  font-size: 16px;
  color: var(--primary);
  font-weight: 700;
}

/* 底部导航 */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
  z-index: 1000;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px 20px;
  transition: color 0.2s;
  min-width: 80px;
}

.tab-item svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-hint);
  margin-bottom: 2px;
}

.tab-item.active svg {
  stroke: var(--primary);
}

.tab-item .tab-text {
  font-size: 12px;
  color: var(--text-hint);
}

.tab-item.active .tab-text {
  color: var(--primary);
  font-weight: 500;
}

/* 加载遮罩 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-overlay.show {
  display: flex;
}

.loading-content {
  background: white;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.loading-text {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}

.loading-dots {
  display: inline-block;
}

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

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  padding: 16px 20px;
  background: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  font-size: 24px;
  cursor: pointer;
  opacity: 0.8;
}

.modal-body {
  padding: 20px;
}

/* 支付信息 */
.pay-info {
  background: var(--secondary);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.pay-methods {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.pay-method {
  flex: 1;
  padding: 12px;
  background: var(--secondary);
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.pay-method.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.pay-method svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.btn-pay {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border: none;
  cursor: pointer;
}

/* 预测结果展示 */
.result-display {
  background: var(--secondary);
  padding: 20px;
  border: 1px solid var(--border);
}

.result-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  text-align: center;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.result-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.result-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.result-highlight {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  padding: 16px;
  margin-top: 16px;
  text-align: center;
}

.result-highlight .highlight-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.result-highlight .highlight-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 免责声明 */
.disclaimer {
  background: var(--secondary);
  padding: 16px;
  border: 1px solid var(--border);
  margin-top: 20px;
}

.disclaimer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.disclaimer-content {
  font-size: 12px;
  color: var(--text-hint);
  line-height: 1.8;
}

/* 减刑详情结果 */
.reduction-detail {
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.detail-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.detail-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-value.strict {
  color: var(--danger);
}

.detail-value.normal {
  color: var(--success);
}

/* 付费解锁遮罩 */
.unlock-mask {
  position: relative;
}

.unlock-mask::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.95));
  pointer-events: none;
}

.unlock-btn-wrapper {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.btn-unlock {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border: none;
  cursor: pointer;
}

/* 通知和公告 */
.static-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #FFF8E1;
  border: 1px solid #FFD54F;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #E65100;
}

.dynamic-announcement {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #E8F5E9;
  border: 1px solid #81C784;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #2E7D32;
}

/* 资讯图片展示 */
.news-images-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.news-image-item {
  background: var(--secondary);
  border: 1px solid var(--border);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.news-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 资讯预览卡片 */
.news-preview-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.news-preview-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.news-preview-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
}

/* 流程步骤指示 */
.step-indicator-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.step-indicator {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 12px 16px;
  background: var(--secondary);
  border: 1px solid var(--border);
  min-width: max-content;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-hint);
  white-space: nowrap;
}

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

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

.step-num {
  width: 24px;
  height: 24px;
  background: var(--border);
  color: var(--text-hint);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-item.active .step-num {
  background: var(--primary);
  color: white;
}

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

.step-arrow {
  color: var(--text-hint);
  font-size: 14px;
  margin: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 24px;
}

/* 日期输入 */
.date-input-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.date-input-item {
  background: var(--secondary);
  padding: 12px;
  border: 1px solid var(--border);
  box-sizing: border-box;
  min-width: 0;
}

.date-input-label {
  font-size: 13px;
  color: var(--text-hint);
  margin-bottom: 6px;
}

.date-input-field {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid var(--border);
  background: white;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

/* 咨询类型选择 */
.consult-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.consult-type-item {
  padding: 16px;
  background: var(--secondary);
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.consult-type-item:hover {
  border-color: var(--primary);
}

.consult-type-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.consult-type-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.consult-type-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
}

.consult-type-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .date-input-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .module-grid {
    gap: 10px;
  }
  
  .module-card {
    padding: 16px 12px;
  }
  
  .pricing-grid {
    gap: 6px;
  }
  
  .pricing-item {
    padding: 12px 8px;
  }
}

/* VIP套餐选择 */
.vip-plans {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.vip-plan {
  padding: 16px;
  background: var(--secondary);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.vip-plan:hover {
  border-color: var(--primary);
}

.vip-plan.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.vip-plan-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.vip-plan-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.vip-plan-price span:first-child {
  font-size: 16px;
  font-weight: 500;
}

.vip-plan-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.vip-plan.selected::after {
  content: '✓';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 地址列表 */
.address-list-item {
  padding: 12px;
  background: var(--secondary);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.address-list-item:last-child {
  margin-bottom: 0;
}

.address-list-item.default {
  border-color: var(--primary);
  background: var(--primary-light);
}

.address-default-tag {
  font-size: 11px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 4px;
}

.address-info {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.address-info strong {
  color: var(--text-primary);
}

.address-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.address-action-btn {
  font-size: 12px;
  padding: 4px 12px;
  background: white;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-secondary);
}

.address-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 邮寄记录项 */
.mailing-record-item {
  padding: 12px;
  background: var(--secondary);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.mailing-record-item:last-child {
  margin-bottom: 0;
}

.mailing-record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mailing-period {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.mailing-status {
  font-size: 12px;
  padding: 2px 8px;
}

.mailing-status.mailed {
  background: var(--primary-light);
  color: var(--primary);
}

.mailing-status.pending {
  background: #F5E6D3;
  color: var(--warning);
}

.mailing-address {
  font-size: 13px;
  color: var(--text-secondary);
}

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

/* 必填项标记 */
.required {
  color: var(--danger);
  margin-right: 4px;
}

/* 登录弹窗样式 */
.login-modal-content {
  background: white;
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--border);
}

.login-modal-header {
  background: var(--primary);
  color: white;
  padding: 24px 20px;
  text-align: center;
  position: relative;
}

.login-modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  line-height: 28px;
  text-align: center;
  font-size: 24px;
  color: white;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.login-modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.login-modal-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.login-modal-subtitle {
  font-size: 13px;
  opacity: 0.85;
}

.login-modal-body {
  padding: 24px;
}

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

.login-label {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 500;
}

.login-input-wrapper {
  position: relative;
  background: #F8F6F2;
  border: 1px solid var(--border);
  padding: 0 14px;
}

.login-input {
  width: 100%;
  padding: 12px 14px;
  padding-left: 40px;
  font-size: 15px;
  border: none;
  background: transparent;
  outline: none;
}

.login-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-hint);
  stroke: var(--text-hint);
  fill: none;
}

.login-auto-login {
  margin-bottom: 20px;
}

.login-btn-group {
  display: flex;
  gap: 12px;
}

.login-btn {
  flex: 1;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 1px;
}

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

.login-btn.register-btn {
  background: var(--secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.login-btn.register-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.login-close-btn {
  margin-top: 16px;
  text-align: center;
}

.login-close-button {
  padding: 10px 32px;
  font-size: 14px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.login-close-button:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: var(--secondary);
}

.login-captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-captcha-row .captcha-input {
  flex: 1;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  background: #F8F6F2;
  outline: none;
}

.login-captcha-row .captcha-input:focus {
  border-color: var(--primary);
}

.captcha-image {
  width: 120px;
  height: 44px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #F8F6F2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-hint);
}

/* 动画过渡 */
.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Toast提示 */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(44, 62, 58, 0.9);
  color: white;
  padding: 12px 24px;
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s;
  max-width: 80%;
  text-align: center;
}

.toast.show {
  opacity: 1;
}

/* 支付弹窗详情 */
.pay-info-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pay-info-desc {
  font-size: 13px;
  color: var(--text-hint);
}

.pay-amount {
  text-align: center;
  padding: 16px;
  background: var(--secondary);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.pay-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.pay-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-left: 8px;
}

.pay-method-icon {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* 结果弹窗内容 */
.result-content {
  text-align: center;
}

.result-main {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.result-label {
  font-size: 14px;
  color: var(--text-hint);
  margin-bottom: 20px;
}

.result-range {
  background: var(--secondary);
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.result-range-title {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 8px;
}

.result-range-value {
  font-size: 18px;
}

.result-crime-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.result-tier {
  background: var(--secondary);
  padding: 12px 16px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  text-align: left;
}

.result-tier-title {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 6px;
}

.result-tier-value {
  font-size: 14px;
  color: var(--text-primary);
}

.result-factors {
  margin-bottom: 16px;
  text-align: left;
}

.result-factors-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.factors-list {
  background: var(--secondary);
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.factor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px dashed var(--border);
}

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

.factor-name {
  font-size: 14px;
  color: var(--text-primary);
}

.factor-effect {
  font-size: 13px;
  font-weight: 500;
}

.factor-percentage {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.result-legal {
  margin-bottom: 16px;
  text-align: left;
  background: #f0f8ff;
  padding: 12px 16px;
  border-left: 3px solid var(--primary);
}

.result-legal-title {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 6px;
}

.result-legal-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.result-tips {
  font-size: 13px;
  color: var(--text-hint);
  line-height: 1.6;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-secondary);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

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

.search-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

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

.scroll-question-item {
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-tips {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  background: var(--primary-light);
  padding: 12px;
  border: 1px solid var(--primary);
}

/* 资讯图片放大预览 */
.image-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}

.image-preview-overlay.show {
  display: flex;
}

.image-preview-content {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.image-preview-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.image-preview-close:hover {
  opacity: 1;
}

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

/* SVG图标定义 - 内联使用 */
.icon-scale {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 我的页面样式 */
.mine-header {
  background: var(--primary);
  color: white;
  padding: 24px 20px;
  text-align: center;
}

.mine-header h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 2px;
}

.mine-header p {
  font-size: 13px;
  opacity: 0.85;
}

.mine-content {
  padding-top: 16px;
}

.mine-card {
  background: white;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  overflow: hidden;
}

.mine-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--secondary);
}

.mine-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.mine-card-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.2s;
}

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

.mine-card-body {
  padding: 16px;
  background: var(--secondary);
}

.mine-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid var(--border);
  float: left;
  margin-right: 12px;
}

.mine-avatar-icon {
  width: 40px;
  height: 40px;
  stroke: var(--primary);
}

.mine-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.mine-user-info {
  display: inline-block;
  vertical-align: top;
  padding-top: 8px;
}

.mine-user-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mine-user-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.mine-edit-nickname {
  font-size: 12px;
  color: var(--text-hint);
  cursor: pointer;
}

.mine-edit-nickname:hover {
  color: var(--primary);
  text-decoration: underline;
}

.mine-user-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #FFF3E0;
  color: #C49A6C;
  font-size: 11px;
  font-weight: 500;
  border-radius: 10px;
}

.mine-user-tag.vip {
  background: #E8F0EB;
  color: #5A8F7B;
}

.mine-user-phone {
  font-size: 13px;
  color: var(--text-hint);
  margin-top: 6px;
}

.mine-vip-info {
  clear: both;
  padding-top: 10px;
  font-size: 14px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mine-vip-label {
  color: var(--text-secondary);
}

.mine-vip-date {
  font-weight: 500;
}

.mine-renew-btn {
  float: right;
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 3px;
  margin-top: 10px;
}

.mine-logout-btn {
  background: transparent;
  color: var(--text-hint);
  border: 1px solid var(--border);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
  margin-left: auto;
}

.mine-logout-btn:hover {
  background: var(--secondary);
  color: var(--text-primary);
}

.mine-card-empty {
  font-size: 14px;
  color: var(--text-hint);
  text-align: center;
  padding: 20px 0;
}