/* ==========================================================================
   金豆剧场 · H5 分享落地页样式（零依赖，移动优先）
   ========================================================================== */

:root {
  --jd-gold: #e4c127;
  --jd-gold-dim: #c9a91f;
  --jd-bg: #0e0e11;
  --jd-card: rgba(30, 30, 36, 0.72);
  --jd-border: rgba(255, 255, 255, 0.14);
  --jd-text: #f5f5f7;
  --jd-text-dim: rgba(245, 245, 247, 0.62);
  --jd-radius: 16px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  color: var(--jd-text);
  background: var(--jd-bg);
  /* 背景图由 JS 注入（--jd-bg-image），未配置时用渐变兜底 */
  background-image: var(--jd-bg-image, linear-gradient(170deg, #1b1b22 0%, #0b0b0e 60%, #000 100%));
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}

/* 背景图之上压一层暗化，保证文字可读 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.72) 100%);
  z-index: -1;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--jd-card);
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  display: block;
}

.theater-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--jd-gold);
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

.slogan {
  font-size: 15px;
  color: var(--jd-text-dim);
  margin: 0 0 22px;
  line-height: 1.5;
}

/* 短剧信息块（仅 drama.html 使用） */
.drama {
  margin: 0 0 20px;
  text-align: left;
}

.drama-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 340px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: block;
  margin-bottom: 14px;
}

.drama-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
}

.drama-meta {
  font-size: 13px;
  color: var(--jd-gold);
  margin: 0 0 8px;
}

.drama-desc {
  font-size: 13px;
  color: var(--jd-text-dim);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 邀请码 */
.invite {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--jd-text-dim);
}

.invite-code {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(228, 193, 39, 0.14);
  border: 1px solid rgba(228, 193, 39, 0.4);
  color: var(--jd-gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  user-select: all;
}

/* 按钮 */
.btn {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
  background: linear-gradient(135deg, var(--jd-gold) 0%, var(--jd-gold-dim) 100%);
  color: #1a1500;
  box-shadow: 0 10px 24px rgba(228, 193, 39, 0.26);
}

.btn:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.btn-ghost {
  margin-top: 10px;
  background: transparent;
  border: 1px solid var(--jd-border);
  color: var(--jd-text);
  box-shadow: none;
  font-weight: 500;
  font-size: 14px;
  padding: 12px 18px;
}

.tip {
  margin: 16px 0 0;
  font-size: 12px;
  color: rgba(245, 245, 247, 0.42);
  line-height: 1.6;
}

/* 悬浮提示（复制成功等） */
.toast {
  position: fixed;
  left: 50%;
  bottom: 12%;
  transform: translate(-50%, 12px);
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 99;
  max-width: 80vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 加载骨架 */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.12) 37%, rgba(255, 255, 255, 0.06) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

[hidden] {
  display: none !important;
}
