/**
 * 灵感墙样式组件 - 硬裁剪版
 * Android WebView 兼容：不用 line-clamp，用 max-height + overflow hidden 硬切
 */

/* ===== 灵感墙触发按钮 ===== */
.inspiration-trigger {
  display: block;
  text-align: center;
  padding: 8px 16px;
  margin-top: -16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--gold, #c9a96e);
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'DM Sans', 'Amatic SC', sans-serif;
  letter-spacing: 0.03em;
}

.inspiration-trigger:hover { opacity: 1; text-decoration: underline; }

/* ===== 灵感墙Sheet容器 ===== */
.inspiration-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 70vh;
  background: linear-gradient(180deg, rgba(26, 13, 5, 0.98) 0%, rgba(13, 7, 5, 0.99) 100%);
  border-top: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9998;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.inspiration-sheet.open { transform: translateY(0); }

.inspiration-sheet::before {
  content: '';
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 4px;
  background: rgba(201, 169, 110, 0.4);
  border-radius: 2px;
}

.inspiration-header {
  padding: 28px 20px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(201, 169, 110, 0.15);
}

.inspiration-title {
  font-size: 20px;
  font-family: 'Amatic SC', cursive;
  color: var(--gold-light, #e8c87a);
  margin: 0 0 4px;
  letter-spacing: 0.05em;
}

.inspiration-subtitle {
  font-size: 11px;
  color: rgba(255, 249, 240, 0.45);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ===== 祝福语卡片网格 ===== */
.inspiration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  height: calc(70vh - 140px);
  overflow-y: auto;
  align-items: start;
}

@media (max-width: 480px) {
  .inspiration-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
  }
}

/* ===== 祝福语卡片 - 核心修复 ===== */
.blessing-card {
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.08) 0%, rgba(201, 169, 110, 0.05) 100%);
  border: 1px solid rgba(201, 169, 110, 0.25);
  border-radius: 16px;
  padding: 12px 10px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  /* 硬裁剪：不管内容多长，绝不溢出 */
  overflow: hidden !important;
  max-height: 120px;
  min-height: 80px;
}

.blessing-card:hover {
  border-color: rgba(201, 169, 110, 0.5);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.12) 0%, rgba(201, 169, 110, 0.08) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.blessing-card:active { transform: scale(0.98); }

.blessing-card.selected {
  border-color: var(--gold-light, #e8c87a);
  box-shadow: 0 0 0 2px rgba(232, 200, 122, 0.3);
}

/* 卡片文字 - 硬裁剪，不依赖 line-clamp */
.blessing-card-text {
  font-size: 11px;
  line-height: 1.45;
  color: #e5e7eb;
  font-family: -apple-system, 'Noto Sans SC', 'PingFang SC', sans-serif;
  word-break: break-all;
  /* 不用 line-clamp！用纯 height + overflow hidden */
  display: block;
  overflow: hidden !important;
  max-height: 88px;
  /* 渐变遮罩：底部淡出效果 */
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* 展开状态 */
.blessing-card.expanded .blessing-card-text {
  max-height: none;
  overflow: visible !important;
  mask-image: none;
  -webkit-mask-image: none;
}

/* ===== 底栏按钮 ===== */
.inspiration-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(13, 7, 5, 0.95) 20%);
  display: flex;
  gap: 12px;
}

.inspiration-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.03em;
}

.inspiration-btn-primary {
  background: linear-gradient(135deg, var(--gold, #c9a96e) 0%, var(--gold-light, #e8c87a) 100%);
  color: #1a0d05;
  border: none;
}

.inspiration-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(201, 169, 110, 0.4);
  transform: translateY(-1px);
}

.inspiration-btn-secondary {
  background: transparent;
  color: var(--gold, #c9a96e);
  border: 1px solid rgba(201, 169, 110, 0.4);
}

.inspiration-btn-secondary:hover { background: rgba(201, 169, 110, 0.1); }

/* ===== 遮罩层 ===== */
.inspiration-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 9997;
}

.inspiration-overlay.show { opacity: 1; visibility: visible; }

/* ===== 关闭按钮 ===== */
.inspiration-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--gold, #c9a96e);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.inspiration-close:hover {
  background: rgba(201, 169, 110, 0.1);
  border-color: var(--gold, #c9a96e);
}
