/* 好评文案助手 · H5 版样式 */
/* rpx → px 换算基准：1rpx ≈ 0.5px（375px 宽度参考） */

/* ========== Reset ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #F5F5F5;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #333;
  -webkit-text-size-adjust: 100%;
}

.page {
  min-height: 100vh;
  padding-bottom: 20px;
  max-width: 480px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* ========== 平台切换标签 ========== */
.platform-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E5E5;
}

.platform-tab {
  flex: 1;
  max-width: 140px;
  text-align: center;
  padding: 9px 0;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  color: #999;
  background: #F5F5F5;
  border: 1px solid #E5E5E5;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.platform-tab:active {
  transform: scale(0.95);
}

/* 美团 - 平台标签选中 */
.platform-meituan .platform-tab.active {
  color: #FFF;
  background: #FFD100;
  border-color: #FFD100;
  box-shadow: 0 2px 8px rgba(255, 209, 0, 0.35);
}

/* 大众点评 - 平台标签选中 */
.platform-dianping .platform-tab.active {
  color: #FFF;
  background: #FF6633;
  border-color: #FF6633;
  box-shadow: 0 2px 8px rgba(255, 102, 51, 0.35);
}

/* ========== 评价标签 ========== */
.tag-section {
  padding: 12px 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tag-item {
  padding: 7px 14px;
  border-radius: 18px;
  font-size: 13px;
  color: #999;
  background: #FFF;
  border: 1px solid #E5E5E5;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
}

.tag-item:active {
  transform: scale(0.92);
  opacity: 0.75;
}

/* 美团 - 标签选中 */
.platform-meituan .tag-item.active {
  color: #FFF;
  background: #FFD100;
  border-color: #FFD100;
  box-shadow: 0 1px 6px rgba(255, 209, 0, 0.3);
}

/* 大众点评 - 标签选中 */
.platform-dianping .tag-item.active {
  color: #FFF;
  background: #FF6633;
  border-color: #FF6633;
  box-shadow: 0 1px 6px rgba(255, 102, 51, 0.3);
}

/* 生成按钮 */
.generate-btn {
  margin-top: 14px;
  text-align: center;
  padding: 10px 0;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
  color: #FFF;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.platform-meituan .generate-btn {
  background: #FFD100;
  box-shadow: 0 2px 8px rgba(255, 209, 0, 0.35);
}

.platform-dianping .generate-btn {
  background: #FF6633;
  box-shadow: 0 2px 8px rgba(255, 102, 51, 0.35);
}

.generate-btn:active {
  opacity: 0.8;
  transform: scale(0.97);
}

/* ========== 文案展示区 ========== */
.review-section {
  padding: 0 16px;
}

.review-card {
  background: #FFF;
  border-radius: 8px;
  padding: 16px;
  min-height: 100px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

/* Loading 动画 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.loading-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.platform-meituan .dot {
  background: #FFD100;
}

.platform-dianping .dot {
  background: #FF6633;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  from { opacity: 0.3; transform: translateY(0); }
  to   { opacity: 1;   transform: translateY(-6px); }
}

.loading-text {
  font-size: 13px;
  color: #999;
}

/* 文案内容 */
.review-content {
  line-height: 1.8;
}

.review-text {
  font-size: 15px;
  color: #333;
  white-space: pre-wrap;
}

/* 两种风格 */
.meituan-style {
  line-height: 2;
}

.dianping-style {
  font-size: 14px;
  line-height: 1.9;
}

/* 空状态 */
.review-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  color: #999;
}

/* 换一条按钮 */
.refresh-btn {
  text-align: center;
  margin-top: 10px;
  padding: 7px 0;
  font-size: 13px;
  border-radius: 18px;
  background: #FFF;
  width: 100px;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.platform-meituan .refresh-btn {
  color: #FFD100;
  border: 1px solid #FFD100;
}

.platform-dianping .refresh-btn {
  color: #FF6633;
  border: 1px solid #FF6633;
}

.refresh-btn:active {
  opacity: 0.7;
  transform: scale(0.96);
}

/* ========== 环境图展示区 ========== */
.image-section {
  padding: 16px;
}

.section-title {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
  padding-left: 2px;
}

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

.image-item {
  flex: 1;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.image-item:active {
  transform: scale(0.96);
}

.env-image {
  width: 100%;
  height: 90px;
  display: block;
  object-fit: cover;
}

.image-label {
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 4px 0;
  background: #FFF;
}

/* ========== 复制按钮 ========== */
.action-section {
  padding: 8px 16px 20px;
}

.copy-btn {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  color: #FFF;
  background: #07C160;
  border: none;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.35);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.copy-btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.copy-btn:disabled {
  background: #C0C0C0;
  box-shadow: none;
  cursor: not-allowed;
}

.copy-btn.copied {
  background: #07C160;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #FFF;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  pointer-events: none;
  white-space: nowrap;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ========== 引导弹窗 (Bottom Sheet) ========== */
.guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.25s ease;
}

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

.guide-sheet {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #FFF;
  border-radius: 14px 14px 0 0;
  padding: 10px 20px 30px;
  animation: slideUp 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.guide-handle {
  width: 30px;
  height: 3px;
  background: #DDD;
  border-radius: 2px;
  margin: 0 auto 12px;
}

.guide-title {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 16px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  color: #FFF;
  font-size: 13px;
  font-weight: 600;
}

.platform-meituan .step-num {
  background: #FFD100;
}

.platform-dianping .step-num {
  background: #FF6633;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 2px;
}

.step-title {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.step-desc {
  font-size: 12px;
  color: #999;
}

.guide-close-btn {
  margin-top: 18px;
  text-align: center;
  padding: 11px 0;
  font-size: 15px;
  color: #FFF;
  background: #07C160;
  border-radius: 22px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.guide-close-btn:active {
  opacity: 0.85;
}
