/* ========== PDD 福袋专用样式 ========== */

.pdd-page,
.pdd-page * {
  box-sizing: border-box;
}

.pdd-card-top-line {
  background: linear-gradient(90deg, #E4393C, #FF6B6B, #FF8A80);
}

.pdd-icon-inner {
  background: linear-gradient(135deg, #E4393C, #CC0000);
}

.pdd-icon-char {
  color: #FFD100;
}

.pdd-label {
  color: #E4393C !important;
  background: #FFF5F5 !important;
}

/* ========== PDD 页面 ========== */
.pdd-page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}

/* ========== 主卡片 ========== */
.pdd-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  width: 100%;
}

/* 顶部标题栏 */
.pdd-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
}

.pdd-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pdd-card-title {
  font-size: 22px;
  font-weight: 800;
  color: #333;
  margin: 0;
}

.pdd-tag {
  font-size: 11px;
  color: #fff;
  background: #4CAF50;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.pdd-version {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

.pdd-notify-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f5f5f5;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.pdd-notify-btn:hover {
  background: #eee;
}

.pdd-notify-icon {
  font-size: 14px;
}

/* 中间信息栏 */
.pdd-card-info {
  display: flex;
  align-items: center;
  padding: 20px 16px;
  gap: 0;
}

.pdd-info-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pdd-info-value {
  font-size: 28px;
  font-weight: 800;
  color: #4CAF50;
  line-height: 1.2;
}

.pdd-info-label {
  font-size: 13px;
  color: #999;
  margin-top: 4px;
}

.pdd-info-divider {
  width: 1px;
  height: 40px;
  background: #e0e0e0;
  flex-shrink: 0;
}

/* 底部按钮栏 */
.pdd-card-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

.pdd-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  min-width: 0;
}

.pdd-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pdd-action-meituan {
  background: #FFF8E1;
}

.pdd-action-pdd {
  background: #FFF0F0;
}

.pdd-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.pdd-action-icon-meituan {
  background: linear-gradient(135deg, #FF6B35, #FF8A50);
  color: #fff;
}

.pdd-action-icon-pdd {
  background: linear-gradient(135deg, #E4393C, #FF6B6B);
  color: #fff;
}

/* 活动入口 */
.pdd-action-entry {
  background: #FFF0F0;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #E4393C;
  padding: 14px 16px;
}

/* ========== 福袋码输入卡片 ========== */
.pdd-input-card {
  margin-top: 12px;
  padding-top: 14px;
}

.pdd-form-title {
  font-size: 17px;
  font-weight: 700;
  color: #333;
  margin: 0;
  padding: 16px 16px 8px;
}

.pdd-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 14px;
}

.pdd-code-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.05em;
}

.pdd-code-input:focus {
  border-color: #4CAF50;
}

.pdd-code-input::placeholder {
  color: #bbb;
  font-weight: 400;
  letter-spacing: 0;
}

.pdd-submit-btn {
  padding: 12px 16px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.pdd-submit-btn:hover {
  background: #43A047;
}

.pdd-ocr-btn {
  padding: 12px 14px;
  background: #E3F2FD;
  color: #1976D2;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.pdd-ocr-btn:hover {
  background: #BBDEFB;
}

/* 错误提示 */
.pdd-input-error {
  padding: 0 16px 12px;
}

.pdd-input-error span {
  display: inline-block;
  background: #333;
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
}

/* 输入提示 */
.pdd-input-hint {
  padding: 0 16px 14px;
  font-size: 12px;
  color: #999;
  text-align: left;
  margin-top: -6px;
}

.pdd-input-hint.pdd-hint-ok {
  color: #4CAF50;
}

/* ========== 可用互助码列表卡片 ========== */
.pdd-codelist-card {
  margin-top: 12px;
}

.pdd-codelist-card .pdd-card-header {
  border-bottom: none;
}

.pdd-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pdd-codelist-refresh {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f5f5f5;
  border: none;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.pdd-codelist-refresh:hover {
  background: #eee;
}

.pdd-refresh-icon {
  font-size: 14px;
  display: inline-block;
  transition: transform 0.3s;
}

.pdd-refresh-icon.spinning {
  animation: spinOnce 0.6s linear;
}

@keyframes spinOnce {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pdd-codelist-grab {
  background: #1976D2;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.pdd-codelist-grab:hover {
  background: #1565C0;
}

.pdd-codelist-card .pdd-card-title {
  font-size: 18px;
}

.pdd-codelist-count {
  color: #4CAF50;
  font-size: 18px;
  font-weight: 700;
  margin-left: 4px;
}

.pdd-grab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f0f0f0;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  color: #4CAF50;
  cursor: pointer;
  margin-left: 0;
  margin-right: 6px;
  line-height: 1;
}

.pdd-grab-icon:hover {
  background: #e0e0e0;
}

.pdd-codelist-body {
  padding: 8px 16px 16px;
  min-height: 60px;
}

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

/* ========== 筛选标签 ========== */
.pdd-tabs {
  display: flex;
  gap: 0;
  padding: 4px;
  margin: 0 16px;
  background: #f5f5f5;
  border-radius: 999px;
}

.pdd-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  margin: 0;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.pdd-tab.active {
  background: #fff;
  color: #E4393C;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========== 互助码列表项 ========== */
.pdd-code-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #FAFAFA;
  border-radius: 14px;
  margin-bottom: 10px;
  transition: background 0.2s;
  gap: 10px;
}

.pdd-code-item:last-child {
  margin-bottom: 0;
}

.pdd-code-item:hover {
  background: #F5F5F5;
}

.pdd-code-item.pdd-code-used {
  opacity: 0.55;
}

.pdd-code-left {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.pdd-code-text {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.04em;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}

.pdd-code-meta {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.pdd-code-mine-badge {
  display: inline-block;
  font-size: 10px;
  color: #E4393C;
  background: #FFF0F0;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}

.pdd-code-right {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 10px;
  white-space: nowrap;
}

/* 使用按钮 */
.pdd-code-use-btn {
  background: #4CAF50;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.pdd-code-use-btn:hover {
  background: #43A047;
}

/* 已使用状态按钮 */
.pdd-code-used-btn {
  background: #e0e0e0;
  color: #999;
  border: none;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: not-allowed;
  white-space: nowrap;
}

/* 已使用状态按钮 */
.pdd-code-used-btn {
  background: #e0e0e0;
  color: #999;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: not-allowed;
  white-space: nowrap;
}

/* ========== Toast 提示 ========== */
.pdd-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  white-space: nowrap;
}

.pdd-toast.is-visible {
  opacity: 1;
}

/* ========== 弹窗 ========== */
.pdd-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.pdd-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  animation: pddModalIn 0.2s ease-out;
}

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

.pdd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.pdd-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.pdd-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.pdd-modal-close:hover {
  color: #333;
}

.pdd-modal-body {
  padding: 20px;
}

.pdd-modal-step {
  font-size: 14px;
  color: #333;
  line-height: 1.8;
  margin: 0 0 8px;
}

.pdd-modal-tip {
  font-size: 13px;
  color: #E4393C;
  background: #FFF5F5;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 16px 0 0;
  line-height: 1.5;
}

/* 弹窗按钮 */
.pdd-modal-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.pdd-modal-btn-primary {
  background: #4CAF50;
  color: #fff;
}

.pdd-modal-btn-primary:hover {
  background: #43A047;
}

.pdd-modal-btn-ghost {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}

.pdd-modal-btn-ghost:hover {
  background: #eee;
}

/* ========== 手机端适配 ========== */
@media (max-width: 768px) {
  .pdd-page {
    padding: 16px;
    max-width: 100%;
  }

  .pdd-card-header {
    padding: 16px;
    gap: 8px;
  }

  .pdd-card-title {
    font-size: 20px;
  }

  .pdd-card-info {
    padding: 20px 16px;
    gap: 16px;
  }

  .pdd-info-value {
    font-size: 28px;
  }

  .pdd-card-actions {
    gap: 8px;
    padding: 0 16px 16px;
  }

  .pdd-action-btn {
    padding: 14px;
  }

  .pdd-header-right {
    gap: 6px;
  }
}

@media (max-width: 400px) {
  .pdd-page {
    padding: 12px;
  }

  .pdd-card {
    border-radius: 20px;
  }

  .pdd-card-header {
    padding: 14px 12px;
  }

  .pdd-card-title {
    font-size: 18px;
  }

  .pdd-tag {
    font-size: 10px;
    padding: 2px 6px;
  }

  .pdd-notify-btn {
    font-size: 11px;
    padding: 5px 8px;
  }

  .pdd-card-info {
    padding: 16px 12px;
  }

  .pdd-info-value {
    font-size: 24px;
  }

  .pdd-card-actions {
    padding: 0 12px 12px;
  }

  .pdd-action-btn {
    padding: 12px;
    font-size: 13px;
    gap: 8px;
  }

  .pdd-action-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .pdd-header-right {
    gap: 6px;
  }


}