/* ============================================================================
   分享卡样式 - 阶段 3.1 (2026-06-25)
   3 种风格: dark / gradient / light
   16:9 比例 (1280×720)
   ============================================================================ */

.share-card-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #6c5ce7, #4834d4);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 8px;
}
.share-card-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.4);
}

.share-card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.share-card-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  max-width: 920px;
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
}
.share-card-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.share-card-modal .modal-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* 风格选择 */
.share-style-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px;
  background: var(--bg-elevated);
  border-radius: 10px;
}
.share-style-btn {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.share-style-btn:hover { color: var(--text); border-color: var(--border-hover); }
.share-style-btn.active {
  background: linear-gradient(135deg, #6c5ce7, #4834d4);
  color: #fff;
  border-color: transparent;
}

/* 卡片容器 (16:9 缩放) */
.share-card-container {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16/9;
  margin: 0 auto 20px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.share-card-container .share-card {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* === 风格 1: 暗色 Apple === */
.share-card.style-dark {
  background: #0a0a0a;
  color: #fff;
}
.share-card.style-dark .sc-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(0, 184, 148, 0.2) 0%, transparent 50%),
    linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}
.share-card.style-dark .sc-content {
  position: relative;
  z-index: 2;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* === 风格 2: 渐变紫 === */
.share-card.style-gradient {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
  color: #fff;
}
.share-card.style-gradient::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2) 0%, transparent 30%),
    radial-gradient(circle at 20% 80%, rgba(0,0,0,0.15) 0%, transparent 40%);
}
.share-card.style-gradient .sc-content {
  position: relative;
  z-index: 2;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* === 风格 3: 亮色 === */
.share-card.style-light {
  background: #fafaf8;
  color: #1a1a1a;
}
.share-card.style-light::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(253, 203, 110, 0.1) 0%, transparent 50%);
}
.share-card.style-light .sc-content {
  position: relative;
  z-index: 2;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

/* 通用卡片元素 */
.sc-podcast-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-bottom: 8px;
}
.share-card.style-light .sc-podcast-label { color: #6c5ce7; }
.share-card.style-dark .sc-podcast-label,
.share-card.style-gradient .sc-podcast-label { color: rgba(255,255,255,0.7); }

.sc-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.share-card.style-light .sc-title { color: #0a0a0a; }

.sc-title-zh {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 24px;
  opacity: 0.9;
}
.share-card.style-light .sc-title-zh { color: #4a4a4a; }
.share-card.style-dark .sc-title-zh,
.share-card.style-gradient .sc-title-zh { color: rgba(255,255,255,0.85); }

.sc-quote {
  font-size: 1.15rem;
  line-height: 1.55;
  font-style: italic;
  margin: 0 0 16px;
  padding-left: 16px;
  border-left: 3px solid currentColor;
  opacity: 0.92;
}
.share-card.style-light .sc-quote { color: #2a2a2a; }
.share-card.style-dark .sc-quote,
.share-card.style-gradient .sc-quote { color: rgba(255,255,255,0.9); }

.sc-speakers {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.sc-speaker-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
}
.share-card.style-light .sc-speaker-pill {
  background: rgba(108, 92, 231, 0.1);
  color: #6c5ce7;
}
.share-card.style-dark .sc-speaker-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
}
.share-card.style-gradient .sc-speaker-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(10px);
}

.sc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 0.85rem;
  opacity: 0.75;
}
.share-card.style-light .sc-footer { color: #666; }
.share-card.style-dark .sc-footer,
.share-card.style-gradient .sc-footer { color: rgba(255,255,255,0.75); }

.sc-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.sc-brand-icon {
  display: inline-block;
  width: 18px; height: 18px;
  background: currentColor;
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

/* 4:3 竖屏变体 (适合 Instagram, 小红书) */
.share-card.size-square {
  aspect-ratio: 1/1;
}
.share-card.size-story {
  aspect-ratio: 9/16;
}

/* 操作按钮 */
.share-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.share-card-actions button {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.share-card-actions button:hover { background: var(--bg-card); border-color: var(--border-hover); }
.share-card-actions button.primary {
  background: linear-gradient(135deg, #6c5ce7, #4834d4);
  color: #fff;
  border: none;
}
.share-card-actions button.primary:hover { box-shadow: 0 4px 14px rgba(108,92,231,0.4); }

/* 比例切换 */
.share-ratio-picker {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.share-ratio-btn {
  padding: 4px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
}
.share-ratio-btn.active {
  background: rgba(108,92,231,0.15);
  color: #6c5ce7;
  border-color: #6c5ce7;
}

.share-card-loading {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: #fff;
  font-size: 0.95rem;
}

/* Toast 通知 */
.share-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: linear-gradient(135deg, #6c5ce7, #4834d4);
  color: #fff;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10001;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
  animation: toastSlide 0.3s ease-out;
}
@keyframes toastSlide {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

@media (max-width: 768px) {
  .share-card-modal { padding: 20px; }
  .sc-title { font-size: 1.8rem; }
  .sc-title-zh { font-size: 1rem; }
  .sc-quote { font-size: 0.95rem; }
  .sc-content { padding: 32px 28px !important; }
}
