@import "tailwindcss";

:root {
  --font-title: "Cinzel";
  --font-chinese: "Noto Serif SC";
  /* ========== 核心色板 (参考 style-unification-preview.html) ========== */
  --color-blood: #8a1c1c;
  --color-blood-light: #b93636;
  --color-gold: #c5a059;
  --color-gold-dim: #8c7335;
  --color-gold-dark: #6e5626;
  --paper: #f0e6d2;
  --paper-dim: #e6dac0;

  /* 背景色 - 白天更精致的纸张/羊皮纸质感 */
  --bg-main: #f5f0e6;
  --bg-day-main: #f5f0e6;
  --bg-secondary: #ede6d6;
  --bg-card: #ffffff;
  --bg-dark: #1a1614;
  --bg-dark-secondary: #2c241b;
  --bg-hover: #e8dfcc;
  --bg-selected: #fcfbf9;

  /* 渐变背景 - 白天 (暖色调) */
  --bg-day-from: #fdfbf7;
  --bg-day-via: #f2ebe0;
  --bg-day-to: #e6ded1;
  
  --bg-night-from: #1a1614;
  --bg-night-via: #14100e;
  --bg-night-to: #0d0a08;
  
  /* 文字颜色 - 白天高对比度，使用深棕色代替纯黑 */
  --text-primary: #3d2e24;
  --text-secondary: #6e5948;
  --text-muted: #9c8570;
  --text-inverse: #f0e6d2;
  
  /* 角色主题色 */
  --color-wolf: #8a1c1c;
  --color-wolf-bg: #f5e6e6;
  --color-seer: #2c5282; /* 白天用深蓝 */
  --color-seer-bg: #e6f0f8;
  --color-witch: #6b46c1; /* 白天用深紫 */
  --color-witch-bg: #f3e6f8;
  --color-hunter: #c05621; /* 白天用深橙 */
  --color-hunter-bg: #fdf2e6;
  --color-guard: #276749; /* 白天用深绿 */
  --color-guard-bg: #e6f5ed;
  --color-villager: #5c4a3d;
  --color-villager-bg: #ebe4d4;
  
  /* 功能色 - 金色主题 */
  --color-accent: #c5a059;
  --color-accent-light: #d4b06a;
  --color-accent-dark: #8c7335;
  --color-accent-bg: rgba(197, 160, 89, 0.12);
  --color-success: #2f855a;
  --color-success-bg: #f0fff4;
  --color-warning: #c05621;
  --color-warning-bg: #fffaf0;
  --color-danger: #9b2c2c;
  --color-danger-bg: #fff5f5;
  
  /* 边框 */
  --border-color: rgba(140, 115, 53, 0.25);
  --border-focus: #c5a059;
  --border-dark: #8b7355;
  
  /* 阴影 - 白天更柔和 */
  --shadow-sm: 0 1px 2px rgba(61, 46, 36, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(61, 46, 36, 0.1);

  /* 玻璃面板 - 白天 (更通透，带一点暖色) */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-bg-weak: rgba(255, 255, 255, 0.60);
  --glass-bg-strong: rgba(255, 255, 255, 0.90);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(61, 46, 36, 0.08);
  --glass-shadow-strong: 0 12px 48px rgba(61, 46, 36, 0.12);
  --glass-blur: 16px;
  --glass-blur-weak: 10px;
  --glass-blur-strong: 24px;

  /* 顶部栏 */
  --topbar-bg: rgba(255, 255, 255, 0.85);
  --topbar-border: rgba(197, 160, 89, 0.3);
  --topbar-text: var(--text-primary);

  /* 卡片表面 */
  --surface-card: rgba(255, 255, 255, 0.85);
  --surface-card-dead: rgba(240, 240, 240, 0.80);
  --surface-border: rgba(197, 160, 89, 0.25);
  --shadow-card: 0 4px 12px rgba(61, 46, 36, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(197, 160, 89, 0.15);

  /* 聊天气泡 */
  --chat-bubble-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(252, 250, 245, 0.98));
  --chat-bubble-text: var(--text-primary);
  --chat-bubble-border: rgba(197, 160, 89, 0.3);

  /* 徽章 */
  --badge-bg: rgba(197, 160, 89, 0.15);
  --badge-text: var(--color-gold-dark);

  /* 玩家卡片渐变 - 白天 */
  --card-gradient-from: rgba(255, 255, 255, 0.95);
  --card-gradient-to: rgba(248, 245, 238, 0.98);
}

/* ========== 夜晚主题 (参考 style-unification-preview.html) ========== */
[data-theme="dark"] {
  /* 背景色 */
  --bg-main: #1a1614;
  --bg-secondary: #2c241b;
  --bg-card: #1e1a17;
  --bg-hover: #3e3428;
  --bg-selected: #4a3d2e;
  
  /* 文字颜色 - 夜晚高对比度 (羊皮纸色) */
  --text-primary: #f0e6d2;
  --text-secondary: rgba(240, 230, 210, 0.75);
  --text-muted: rgba(240, 230, 210, 0.55);
  --border-color: rgba(197, 160, 89, 0.20);

  /* 玻璃面板 - 夜晚 */
  --glass-bg: rgba(20, 16, 14, 0.70);
  --glass-bg-weak: rgba(20, 16, 14, 0.55);
  --glass-bg-strong: rgba(20, 16, 14, 0.82);
  --glass-border: rgba(197, 160, 89, 0.20);
  --glass-shadow: 0 14px 40px rgba(0, 0, 0, 0.50);
  --glass-shadow-strong: 0 18px 60px rgba(0, 0, 0, 0.60);

  /* 顶部栏 */
  --topbar-bg: linear-gradient(to bottom, rgba(26, 22, 20, 0.90), rgba(26, 22, 20, 0.70));
  --topbar-border: rgba(197, 160, 89, 0.20);
  --topbar-text: #f0e6d2;

  /* 卡片表面 */
  --surface-card: linear-gradient(145deg, rgba(40, 35, 33, 0.80), rgba(30, 25, 23, 0.90));
  --surface-card-dead: rgba(20, 16, 14, 0.75);
  --surface-border: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.40);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.50);

  /* 聊天气泡 */
  --chat-bubble-bg: linear-gradient(180deg, rgba(30, 25, 23, 0.95), rgba(20, 16, 14, 0.98));
  --chat-bubble-text: var(--text-primary);
  --chat-bubble-border: rgba(197, 160, 89, 0.25);

  /* 徽章 */
  --badge-bg: rgba(197, 160, 89, 0.18);
  --badge-text: var(--color-gold);

  /* 玩家卡片渐变 - 夜晚 */
  --card-gradient-from: rgba(40, 35, 33, 0.80);
  --card-gradient-to: rgba(30, 25, 23, 0.90);

  /* 角色背景色调整 - 夜晚更暗 */
  --color-wolf-bg: rgba(138, 28, 28, 0.15);
  --color-seer-bg: rgba(74, 144, 226, 0.12);
  --color-witch-bg: rgba(155, 89, 182, 0.12);
  --color-hunter-bg: rgba(211, 84, 0, 0.12);
  --color-guard-bg: rgba(39, 174, 96, 0.12);
  --color-villager-bg: rgba(92, 74, 61, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main); /* Fallback to prevent black flash */
  color: var(--text-primary);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

button:not(:disabled),
input[type="button"]:not(:disabled),
input[type="submit"]:not(:disabled),
[role="button"]:not([aria-disabled="true"]) {
  cursor: pointer;
}

/* === Supabase Auth UI === */
.wc-auth-modal .supabase-auth-ui_ui {
  font-family: var(--font-chinese), ui-serif, Georgia, serif;
}

.wc-auth {
  display: grid;
  gap: 12px;
}

.wc-auth .supabase-auth-ui_ui-button {
  border-radius: 6px;
  border: 1px solid var(--color-gold);
  box-shadow: 0 6px 14px rgba(197, 160, 89, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wc-auth .supabase-auth-ui_ui-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(197, 160, 89, 0.28);
}

.wc-auth-input {
  border-radius: 6px;
  background: var(--bg-card);
}

.wc-auth-input:focus {
  box-shadow: 0 0 0 2px var(--color-accent-bg);
}

.wc-auth-label {
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.wc-auth-message {
  color: var(--text-secondary);
}

/* Magic link form */
.wc-magic-link-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wc-auth-hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

.wc-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wc-auth-field .wc-auth-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-chinese), ui-serif, Georgia, serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wc-auth-field .wc-auth-input::placeholder {
  color: var(--text-muted);
}

.wc-auth-field .wc-auth-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-bg);
}

.wc-auth-field .wc-auth-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wc-auth-submit {
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1614;
  background: var(--color-gold);
  border: 1px solid var(--color-gold);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-chinese), ui-serif, Georgia, serif;
  box-shadow: 0 6px 14px rgba(197, 160, 89, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wc-auth-submit:hover:not(:disabled) {
  background: var(--color-gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(197, 160, 89, 0.28);
}

.wc-auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

[data-theme="dark"] .wc-auth-field .wc-auth-input {
  background: var(--bg-secondary);
}

/* === Sonner Toast === */
[data-sonner-toaster] {
  font-family: var(--font-chinese), ui-serif, Georgia, serif !important;
}

[data-sonner-toast] {
  position: relative !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow-md) !important;
  color: var(--text-primary) !important;
  padding: 14px 18px !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}

[data-sonner-toast][data-type="success"] {
  border-color: rgba(47, 133, 90, 0.35) !important;
}

[data-sonner-toast][data-type="error"] {
  border-color: rgba(155, 44, 44, 0.35) !important;
}

[data-sonner-toast][data-type="warning"] {
  border-color: rgba(192, 86, 33, 0.35) !important;
}

[data-sonner-toast]::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 8px !important;
  bottom: 8px !important;
  width: 3px !important;
  border-radius: 999px !important;
  background: var(--color-gold) !important;
  opacity: 0.9 !important;
}

[data-sonner-toast][data-type="success"]::before {
  background: var(--color-success) !important;
}

[data-sonner-toast][data-type="error"]::before {
  background: var(--color-danger) !important;
}

[data-sonner-toast][data-type="warning"]::before {
  background: var(--color-warning) !important;
}

[data-sonner-toast] [data-title] {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  letter-spacing: 0.015em !important;
  font-size: 0.98rem !important;
}

[data-sonner-toast] [data-description] {
  color: var(--text-primary) !important;
  font-size: 0.9rem !important;
  opacity: 0.82 !important;
}

[data-sonner-toast] [data-close-button] {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
}

[data-sonner-toast] [data-close-button]:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border-color: var(--color-gold) !important;
}

/* Toast icon colors */
[data-sonner-toast][data-type="success"] [data-icon] {
  color: var(--color-success) !important;
}

[data-sonner-toast][data-type="error"] [data-icon] {
  color: var(--color-danger) !important;
}

[data-sonner-toast][data-type="warning"] [data-icon] {
  color: var(--color-warning) !important;
}

/* Dark theme toast adjustments */
[data-theme="dark"] [data-sonner-toast] {
  background: var(--bg-secondary) !important;
  border-color: var(--glass-border) !important;
  box-shadow: var(--glass-shadow-strong) !important;
}

[data-theme="dark"] [data-sonner-toast][data-type="success"] {
  border-color: rgba(47, 133, 90, 0.25) !important;
}

[data-theme="dark"] [data-sonner-toast][data-type="error"] {
  border-color: rgba(155, 44, 44, 0.25) !important;
}

[data-theme="dark"] [data-sonner-toast][data-type="warning"] {
  border-color: rgba(192, 86, 33, 0.25) !important;
}

/* === WelcomeScreen: 暗夜契约入场 === */

.wc-contract-screen {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1000px;
}

.wc-contract-fog {
  position: absolute;
  inset: -40%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 35% 35%, rgba(184, 134, 11, 0.10), rgba(0, 0, 0, 0) 55%),
    radial-gradient(circle at 65% 40%, rgba(138, 28, 28, 0.12), rgba(0, 0, 0, 0) 60%),
    radial-gradient(circle at 45% 70%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0) 55%),
    radial-gradient(circle at 55% 55%, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0) 62%);
  filter: blur(1px);
  opacity: 0.85;
  animation: wc-fog-drift 22s ease-in-out infinite;
}

@keyframes wc-fog-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  50% {
    transform: translate3d(2%, 1.5%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
}

.wc-contract-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.40) 75%);
}

.wc-contract-paper {
  position: relative;
  z-index: 2;
  width: min(460px, calc(100vw - 40px));
  min-height: 590px;
  padding: 34px 30px 28px;
  border-radius: 6px;
  background-color: #f0e6d2;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(139, 69, 19, 0.10), rgba(0, 0, 0, 0) 55%),
    radial-gradient(circle at 75% 20%, rgba(139, 69, 19, 0.08), rgba(0, 0, 0, 0) 60%),
    radial-gradient(circle at 50% 85%, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0) 60%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.015) 0px, rgba(0, 0, 0, 0.015) 1px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0) 6px);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.55),
    inset 0 0 60px rgba(139, 69, 19, 0.18);
  transform-style: preserve-3d;
  transform:
    rotateY(calc(var(--wc-tilt-x, 0) * 1deg))
    rotateX(calc(var(--wc-tilt-y, 0) * 1deg));
  transition: transform 0.12s ease-out;
}

.wc-promo-tag-container {
  position: absolute;
  top: -15px;
  right: 30px;
  z-index: 20;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: rotate(3deg);
}

.wc-promo-tag-container:hover {
  transform: rotate(0deg) scale(1.05) translateY(5px);
}

.wc-promo-ticket {
  display: block;
  background: linear-gradient(135deg, #a31818 0%, #7a1212 100%);
  color: var(--color-gold);
  padding: 22px 12px 8px 12px;
  border-radius: 3px;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  min-width: 80px;
}

.wc-promo-title {
  font-family: var(--font-title), ui-serif, Georgia, serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  display: block;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wc-promo-subtitle {
  display: block;
  font-size: 9px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.wc-paper-clip {
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  width: 10px;
  height: 28px;
  z-index: 25;
  pointer-events: none;
}

.wc-paper-clip::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 70%;
  border: 2px solid #bdc3c7;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  background: transparent;
}

.wc-paper-clip::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2px;
  width: 6px;
  height: 12px;
  border: 2px solid #8e9496;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  z-index: -1;
  box-sizing: border-box;
}

.wc-shine-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  border-radius: 3px;
}

.wc-shine-effect::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-25deg);
  animation: wc-promo-shine 5s infinite;
}

@keyframes wc-promo-shine {
  0% {
    left: -150%;
  }
  20% {
    left: 150%;
  }
  100% {
    left: 150%;
  }
}

.wc-contract-borders {
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(44, 24, 16, 0.18);
  pointer-events: none;
}

.wc-contract-borders::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(44, 24, 16, 0.10);
}

.wc-contract-title {
  font-family: var(--font-title), ui-serif, Georgia, serif;
  font-weight: 800;
  letter-spacing: 0.26em;
  font-size: 34px;
  color: var(--color-wolf);
  opacity: 0.92;
}

.wc-contract-subtitle {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.55;
}

.wc-contract-body {
  font-family: var(--font-chinese), ui-serif, Georgia, serif;
}

/* Watcha official badge embedded inside the welcome card */
.wc-watcha-paper-badge {
  display: inline-block;
  text-decoration: none;
  border: 0;
  outline: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wc-watcha-paper-badge img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border: 0;
  outline: none;
  user-select: none;
  -webkit-user-drag: none;
}

.wc-watcha-paper-badge:hover {
  transform: scale(1.02);
}

.wc-contract-oath {
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.74;
}

.wc-contract-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.52;
}

.wc-signature-input {
  width: 100%;
  height: 62px;
  font-size: 34px;
  text-align: center;
  color: var(--color-wolf);
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(138, 28, 28, 0.30);
  outline: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
  font-family: "IM Fell English", var(--font-chinese), ui-serif, Georgia, serif;
}

.wc-signature-input:focus {
  border-bottom-color: rgba(138, 28, 28, 0.8);
  transform: scale(1.03);
}

.wc-signature-input::placeholder {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: rgba(138, 28, 28, 0.35);
}

.wc-signature-ok {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-success);
  opacity: 0.95;
}

.wc-seal-hint {
  font-size: 12px;
  font-style: italic;
  opacity: 0.60;
}

.wc-wax-seal {
  width: 100px;
  height: 100px;
  border-radius: 9999px;
  border: 4px solid rgba(138, 28, 28, 0.6);
  background: radial-gradient(circle at 30% 30%, #b93636, #8a1c1c 55%, #581010);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.35),
    inset 2px 2px 8px rgba(255, 255, 255, 0.18),
    inset -2px -2px 10px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
}

.wc-wax-seal::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 9999px;
  border: 2px dashed rgba(184, 134, 11, 0.28);
  animation: wc-rotate-slow 20s linear infinite;
  pointer-events: none;
}

.wc-wax-seal:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 34px rgba(185, 54, 54, 0.55),
    inset 2px 2px 10px rgba(255, 255, 255, 0.24);
}

.wc-wax-seal:active {
  transform: scale(0.96);
}

.wc-wax-seal:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.65;
}

.wc-wax-seal--auth {
  animation: wc-seal-breathe 1.6s ease-in-out infinite;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(185, 54, 54, 0.35),
    inset 2px 2px 10px rgba(255, 255, 255, 0.2),
    inset -2px -2px 12px rgba(0, 0, 0, 0.3);
}

@keyframes wc-seal-breathe {
  0% {
    transform: scale(1);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.05);
    filter: saturate(1.15);
  }
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wc-wax-seal--auth {
    animation: none;
  }
}

.wc-wax-seal-icon {
  color: rgba(88, 16, 16, 0.66);
  filter: drop-shadow(1px 1px 0 rgba(255, 255, 255, 0.16));
  transform: rotate(-15deg);
}

@keyframes wc-rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.wc-corner-mark {
  position: absolute;
  bottom: 16px;
  right: 16px;
}

/* === Difficulty Selector === */
.wc-difficulty-dialog {
  width: min(520px, calc(100vw - 40px));
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--glass-bg-strong);
  box-shadow: var(--glass-shadow-strong);
  backdrop-filter: blur(var(--glass-blur));
}

.wc-difficulty-grid {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.wc-difficulty-card {
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wc-difficulty-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.wc-difficulty-card[data-active="true"] {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.35), var(--shadow-card-hover);
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.12), rgba(255, 255, 255, 0.9));
}

[data-theme="dark"] .wc-difficulty-card[data-active="true"] {
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.16), rgba(20, 16, 14, 0.9));
}

.wc-difficulty-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wc-difficulty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.wc-difficulty-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.wc-difficulty-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--badge-text);
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
}

.wc-difficulty-desc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.wc-difficulty-footer {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== 召唤等待模式 (参考 waiting-preview.html) ========== */
.wc-contract-paper--summoning {
  min-height: 620px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(197, 160, 89, 0.1),
    inset 0 0 80px rgba(139, 69, 19, 0.15);
}

/* 召唤状态文字 */
.wc-summoning-status {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  color: var(--color-gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: wc-pulse-text 2s infinite;
}

@keyframes wc-pulse-text {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* 召唤魔法阵 */
.wc-summoning-circle {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 20px 0;
}

.wc-circle-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-blood);
  border-radius: 50%;
  opacity: 0.3;
}

.wc-circle-ring--1 {
  animation: wc-spin 20s linear infinite;
  border-style: dashed;
}

.wc-circle-ring--2 {
  inset: 20px;
  animation: wc-spin 15s linear infinite reverse;
  border-color: var(--color-gold);
  opacity: 0.2;
}

.wc-circle-ring--3 {
  inset: 40px;
  animation: wc-pulse-ring 3s ease-in-out infinite;
  border: 1px solid var(--color-blood);
  opacity: 0.1;
}

@keyframes wc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes wc-pulse-ring {
  0%, 100% { transform: scale(0.95); opacity: 0.1; }
  50% { transform: scale(1.05); opacity: 0.3; }
}

/* 玩家列表槽位 */
.wc-player-slots {
  width: 100%;
  padding: 0 24px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wc-player-slot {
  height: 36px;
  border-bottom: 1px solid rgba(139, 69, 19, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Dancing Script', cursive;
  font-size: 1rem;
  color: var(--color-wolf);
  position: relative;
  transition: opacity 0.3s ease;
}

.wc-player-slot--revealed {
  opacity: 1;
}

.wc-slot-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(139, 69, 19, 0.1);
  margin-right: 8px;
  flex-shrink: 0;
}

.wc-slot-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.wc-particle {
  position: fixed;
  border-radius: 9999px;
  background: rgba(184, 134, 11, 0.90);
  pointer-events: none;
  z-index: 9999;
}

 .wc-summoning-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
 }

 .wc-summoning-bg {
  position: fixed;
  inset: 0;
  background: var(--bg-night-to);
  z-index: 0;
 }

 .wc-fog-container {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(138, 28, 28, 0.05), transparent 60%),
    radial-gradient(circle at 20% 30%, rgba(197, 160, 89, 0.03), transparent 50%);
  animation: wc-fog-drift 30s ease-in-out infinite alternate;
  pointer-events: none;
 }

 .wc-summoning-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(197, 160, 89, 0.08) 0%, transparent 70%);
  pointer-events: none;
 }

 @keyframes wc-fog-drift {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(5deg) scale(1.1); }
 }

 .wc-summoning-circle-container {
  position: relative;
  width: 600px;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  z-index: 1;
 }

 .wc-magic-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  opacity: 0.3;
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.1);
 }

 .wc-ring-1 {
  width: 100%;
  height: 100%;
  border-style: solid;
  border-width: 1px;
  animation: wc-summoning-spin 60s linear infinite;
  background: radial-gradient(circle, transparent 60%, rgba(197, 160, 89, 0.05) 70%, transparent 80%);
 }

 .wc-ring-2 {
  width: 70%;
  height: 70%;
  border-style: dashed;
  border-color: var(--color-blood);
  animation: wc-summoning-spin 40s linear infinite reverse;
 }

 .wc-ring-3 {
  width: 40%;
  height: 40%;
  border: 2px solid var(--color-gold);
  opacity: 0.6;
  animation: wc-summoning-pulse-ring 4s ease-in-out infinite;
 }

 @keyframes wc-summoning-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
 }

 @keyframes wc-summoning-pulse-ring {
  0%, 100% { transform: scale(0.95); opacity: 0.4; border-color: var(--color-gold); }
  50% { transform: scale(1.05); opacity: 0.8; border-color: var(--color-blood); }
 }

 .wc-altar-core {
  position: absolute;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--color-gold-dim), transparent);
  border-radius: 50%;
  filter: blur(20px);
  animation: wc-summoning-breathe 4s ease-in-out infinite;
 }

 @keyframes wc-summoning-breathe {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 0.6; transform: scale(1.2); }
 }

 .wc-wolf-icon {
  position: relative;
  z-index: 10;
  color: var(--color-gold);
  filter: drop-shadow(0 0 20px rgba(197, 160, 89, 0.5));
  animation: wc-summoning-float 6s ease-in-out infinite;
 }

 @keyframes wc-summoning-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
 }

 .wc-player-slots-ring {
  position: absolute;
  inset: -100px;
  pointer-events: none;
 }

 .wc-player-slot-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
 }

 .wc-slot-avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: 2px dashed rgba(197, 160, 89, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
 }

 .wc-slot-avatar-circle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
 }

 .wc-slot-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease;
 }

 .wc-player-slot-circle.active .wc-slot-avatar-inner {
  opacity: 1;
  transform: scale(1);
 }

 .wc-slot-loading-spinner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(197, 160, 89, 0.2);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: wc-spin 0.8s linear infinite;
 }

 .wc-player-slot-circle.active .wc-slot-loading-spinner {
  display: none;
 }

 @keyframes wc-spin {
  to { transform: rotate(360deg); }
 }

 .wc-player-slot-circle.active .wc-slot-avatar-circle {
  background: #1a1614;
  border-style: solid;
  border-color: var(--color-gold);
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
 }

 .wc-player-slot-circle.active .wc-slot-avatar-circle::before {
  opacity: 1;
  transform: scale(1);
  animation: wc-summoning-spin 10s linear infinite;
 }

 .wc-slot-name-circle {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  white-space: nowrap;
  color: rgba(240, 230, 210, 0.92);
 }

 .wc-player-slot-circle.active .wc-slot-name-circle {
  opacity: 1;
  transform: translateY(0);
 }

 .wc-summon-beam {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 0;
  background: linear-gradient(to top, var(--color-gold), transparent);
  transform: translateX(-50%);
  opacity: 0;
  transition: height 0.3s ease-out, opacity 0.3s;
 }

 .wc-player-slot-circle.summoning .wc-summon-beam {
  height: 100px;
  opacity: 1;
 }

 .wc-status-text {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
 }

 .wc-status-title {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  text-transform: uppercase;
  animation: wc-text-glow 2s ease-in-out infinite alternate;
 }

 .wc-status-subtitle {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.6;
  font-family: 'Noto Serif SC', serif;
 }

 @keyframes wc-text-glow {
  from { text-shadow: 0 0 10px rgba(197, 160, 89, 0.2); opacity: 0.8; }
  to { text-shadow: 0 0 20px rgba(197, 160, 89, 0.6); opacity: 1; }
 }

.wc-transition-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}

 .wc-eyelid-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background: transparent;
  --wc-lid: 0;
  --wc-eye-feather: 18;
  will-change: opacity;
  transform: translateZ(0);
 }

 .wc-eyelid-overlay::before,
 .wc-eyelid-overlay::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 52%;
  background: rgba(0, 0, 0, 0.96);
  will-change: transform;
  backface-visibility: hidden;
 }

 .wc-eyelid-overlay::before {
  top: 0;
  transform: translate3d(0, calc((-100%) + (var(--wc-lid) * 100%)), 0);
  box-shadow: 0 calc(var(--wc-eye-feather) * 1px) calc(var(--wc-eye-feather) * 1.6px) rgba(0, 0, 0, 0.75);
 }

 .wc-eyelid-overlay::after {
  bottom: 0;
  transform: translate3d(0, calc((100%) - (var(--wc-lid) * 100%)), 0);
  box-shadow: 0 calc(var(--wc-eye-feather) * -1px) calc(var(--wc-eye-feather) * 1.6px) rgba(0, 0, 0, 0.75);
 }

.wc-blink-underlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  pointer-events: none;
  background: #000;
  will-change: opacity;
  transform: translateZ(0);
}

.wc-transition-text {
  text-align: center;
  padding: 20px 26px;
}

.wc-transition-title {
  font-family: var(--font-chinese), ui-serif, Georgia, serif;
  font-weight: 900;
  font-size: 34px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7), 0 0 26px rgba(184, 134, 11, 0.30);
}

.wc-transition-subtitle {
  margin-top: 10px;
  font-family: var(--font-title), ui-serif, Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(184, 134, 11, 0.90);
  opacity: 0.92;
}

/* ========== 玻璃面板系统 (wc-panel) ========== */
.glass-panel,
.wc-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 8px;
  position: relative;
}

.glass-panel--weak,
.wc-panel--weak {
  background: var(--glass-bg-weak);
  backdrop-filter: blur(var(--glass-blur-weak));
  -webkit-backdrop-filter: blur(var(--glass-blur-weak));
}

.glass-panel--strong,
.wc-panel--strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
  box-shadow: var(--glass-shadow-strong);
}

/* 装饰性边角 (参考 style-unification-preview.html) */
.wc-panel--decorated::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 2px solid var(--color-gold);
  border-left: 2px solid var(--color-gold);
  border-radius: 6px 0 0 0;
  opacity: 0.6;
  pointer-events: none;
}

.wc-panel--decorated::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-bottom: 2px solid var(--color-gold);
  border-right: 2px solid var(--color-gold);
  border-radius: 0 0 6px 0;
  opacity: 0.6;
  pointer-events: none;
}

.glass-topbar {
  background: var(--topbar-bg);
  border: 0;
  border-bottom: 1px solid var(--topbar-border);
  box-shadow: none;
}

/* ========== 顶部栏样式 (严格对齐 style-unification-preview.html) ========== */
.wc-topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--topbar-border);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .wc-topbar {
  background: linear-gradient(to bottom, rgba(26, 22, 20, 0.9), rgba(26, 22, 20, 0.6));
  border-bottom-color: rgba(197, 160, 89, 0.2);
}

.wc-topbar__title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  text-shadow: 0 2px 10px rgba(197, 160, 89, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wc-topbar__info {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.wc-topbar__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .wc-topbar {
    height: auto;
    min-height: 48px;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .wc-topbar__row-1 {
    order: -1;
  }

  .wc-topbar__title {
    font-size: 14px;
    letter-spacing: 0.06em;
    gap: 4px;
  }

  .wc-topbar__title svg {
    width: 18px;
    height: 18px;
  }

  .wc-topbar__info {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  .wc-topbar__item {
    font-size: 11px;
    gap: 4px;
  }

  .wc-topbar__item .font-serif {
    font-size: 14px;
  }

  .wc-topbar__item--role {
    display: none;
  }

  .wc-phase-badge {
    font-size: 10px;
    padding: 2px 6px;
    gap: 4px;
  }

  /* 投票进度区域最大宽度 */
  .wc-voting-progress {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
  .wc-topbar {
    padding: 6px 10px;
  }

  .wc-topbar__title {
    font-size: 13px;
  }

  .wc-topbar__item .font-serif {
    font-size: 13px;
  }

  .wc-phase-badge {
    font-size: 9px;
    padding: 2px 5px;
  }

  .wc-player-card--mobile {
    min-width: 80px;
    max-width: 88px;
    padding: 6px;
  }

  .wc-player-card--mobile .wc-player-card__avatar {
    width: 32px;
    height: 32px;
  }

  .wc-player-card--mobile .wc-player-card__name {
    font-size: 10px;
    max-width: 70px;
  }

  .wc-mobile-player-bar__track {
    gap: 6px;
    padding: 4px 8px 6px;
  }

  .wc-panel {
    padding: 12px;
    min-height: 100px;
  }

  .wc-panel .text-lg {
    font-size: 14px;
  }

  .wc-panel .text-xl {
    font-size: 15px;
  }

  .wc-action-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }
}

/* 阶段徽章 - 严格对齐HTML */
.wc-phase-badge {
  background: var(--badge-bg);
  border: 1px solid rgba(197, 160, 89, 0.3);
  padding: 4px 12px;
  border-radius: 4px;
  color: var(--color-gold-dark);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .wc-phase-badge {
  color: var(--color-gold);
}

/* ========== 玩家卡片样式 (严格对齐 style-unification-preview.html) ========== */
.wc-player-card {
  background: linear-gradient(145deg, var(--card-gradient-from), var(--card-gradient-to));
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  padding: 12px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

[data-theme="dark"] .wc-player-card {
  background: linear-gradient(145deg, rgba(40, 35, 33, 0.8), rgba(30, 25, 23, 0.9));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.wc-player-card:hover {
  transform: translateX(4px);
  border-color: var(--color-gold);
  background: linear-gradient(145deg, #fff, #f8f5ed);
  box-shadow: var(--shadow-card-hover);
}

[data-theme="dark"] .wc-player-card:hover {
  background: linear-gradient(145deg, rgba(50, 45, 43, 0.9), rgba(40, 35, 33, 0.95));
  border-color: rgba(197, 160, 89, 0.3);
}

.wc-player-card--me {
  border-left: 3px solid var(--color-gold);
  background: linear-gradient(90deg, rgba(197, 160, 89, 0.08), transparent);
}

.wc-player-card--speaking {
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(197, 160, 89, 0.15);
  animation: wc-pulse-border 2.5s infinite;
  background: linear-gradient(145deg, #fff, #fdfbf5);
}

[data-theme="dark"] .wc-player-card--speaking {
  box-shadow: 0 0 12px rgba(197, 160, 89, 0.1);
  background: transparent;
}

.wc-player-card--speaking .wc-player-card__avatar {
  border-color: var(--color-gold);
}

.wc-player-card--speaking .wc-player-card__name {
  color: var(--color-gold-dark);
}

[data-theme="dark"] .wc-player-card--speaking .wc-player-card__name {
  color: var(--color-gold);
}

.wc-player-card--dead {
  filter: grayscale(1) brightness(0.9);
  opacity: 0.6;
}

[data-theme="dark"] .wc-player-card--dead {
  filter: grayscale(1) brightness(0.5);
  opacity: 0.7;
}

.wc-player-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(197, 160, 89, 0.3);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.wc-player-card__info {
  flex: 1;
  min-width: 0;
}

.wc-player-card__name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.wc-player-card__meta {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== 玩家详情弹窗暗夜适配 ========== */
.wc-player-detail-modal {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .wc-player-detail-modal {
  background: rgba(18, 16, 15, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .wc-player-detail-header {
  background-image: linear-gradient(to bottom, rgba(138, 28, 28, 0.18), transparent);
}

[data-theme="dark"] .wc-player-detail-close {
  background-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .wc-player-detail-close:hover {
  background-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .wc-player-detail-modal .bg-slate-100 {
  background-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .wc-player-detail-modal .text-slate-700 {
  color: rgba(236, 230, 220, 0.9) !important;
}

[data-theme="dark"] .wc-player-detail-modal .bg-emerald-100 {
  background-color: rgba(16, 185, 129, 0.18) !important;
}

[data-theme="dark"] .wc-player-detail-modal .text-emerald-700 {
  color: rgba(167, 243, 208, 0.95) !important;
}

[data-theme="dark"] .wc-player-detail-modal .bg-purple-100 {
  background-color: rgba(168, 85, 247, 0.18) !important;
}

[data-theme="dark"] .wc-player-detail-modal .text-purple-700 {
  color: rgba(233, 213, 255, 0.95) !important;
}

[data-theme="dark"] .wc-player-detail-modal .bg-blue-100 {
  background-color: rgba(59, 130, 246, 0.18) !important;
}

[data-theme="dark"] .wc-player-detail-modal .text-blue-700 {
  color: rgba(191, 219, 254, 0.95) !important;
}

[data-theme="dark"] .wc-player-detail-modal .bg-orange-100 {
  background-color: rgba(249, 115, 22, 0.18) !important;
}

[data-theme="dark"] .wc-player-detail-modal .text-orange-700 {
  color: rgba(254, 215, 170, 0.95) !important;
}

.wc-player-card--speaking .wc-player-card__meta {
  color: var(--color-gold-dark);
}

[data-theme="dark"] .wc-player-card--speaking .wc-player-card__meta {
  color: var(--color-gold);
}

/* 座位徽章 - 严格对齐HTML */
.wc-seat-badge {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 5px;
  border-radius: 2px;
  font-family: 'Cinzel', serif;
  font-weight: bold;
  font-size: 10px;
  color: var(--text-secondary);
}

[data-theme="dark"] .wc-seat-badge {
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.wc-player-card--speaking .wc-seat-badge {
  background: var(--color-gold);
  color: #fff;
}

[data-theme="dark"] .wc-player-card--speaking .wc-seat-badge {
  color: #1a1614;
}

.wc-player-card--selectable {
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.25), 0 8px 20px rgba(197, 160, 89, 0.12);
  animation: wc-selectable-pulse 2s ease-in-out infinite;
}

.wc-player-card--selectable:hover {
  transform: translateX(6px);
}

/* ========== 对话区域样式 (严格对齐 style-unification-preview.html) ========== */
.wc-dialog-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .wc-dialog-main {
    flex-direction: column;
    gap: 8px;
    padding: 0 12px;
  }

  .wc-dialog-portrait {
    width: 100%;
    min-height: 100px;
    max-height: 180px;
    justify-content: center;
  }

  .wc-dialog-portrait img {
    width: 140px !important;
  }

  .wc-dialog-history {
    flex: 1;
    min-height: 0;
    max-height: none;
  }

  .wc-dialog-bottom {
    padding: 0 12px calc(8px + env(safe-area-inset-bottom));
    position: relative;
  }

  .wc-dialog-portrait-mobile {
    position: absolute;
    left: 12px;
    bottom: calc(100% + 6px);
    z-index: 5;
    margin: 0;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    min-height: 100px;
    max-height: 160px;
    width: 100%;
  }

  .wc-dialog-portrait-mobile img,
  .wc-dialog-portrait-mobile .wc-talking-avatar {
    width: 110px !important;
  }

  /* Smaller dialog panel on mobile */
  .wc-panel {
    padding: 14px;
    min-height: 120px;
  }

  .wc-panel .text-lg {
    font-size: 15px;
  }

  .wc-panel .text-xl {
    font-size: 17px;
  }

  /* Compact action buttons */
  .wc-action-btn {
    height: 36px;
    padding: 0 14px;
    font-size: 12px;
  }

  .wc-action-btn--primary,
  .wc-action-btn--danger {
    height: 36px;
    padding: 0 14px;
  }
}

.wc-role-reveal-card {
  max-height: calc(100vh - 32px);
}

.wc-role-reveal-card .glass-panel {
  max-height: inherit;
}

.wc-role-reveal-card .glass-panel > div {
  max-height: inherit;
}

/* 发言者大头像 - 严格对齐HTML */
.wc-speaker-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
}

/* 对话气泡 - 严格对齐HTML */
.wc-speaker-bubble {
  background: var(--chat-bubble-bg);
  border: 1px solid var(--chat-bubble-border);
  border-radius: 0 12px 12px 12px;
  padding: 20px 24px;
  max-width: 600px;
  position: relative;
  box-shadow: 0 8px 32px rgba(197, 160, 89, 0.08);
}

[data-theme="dark"] .wc-speaker-bubble {
  background: linear-gradient(180deg, rgba(30, 25, 23, 0.95), rgba(20, 16, 14, 0.98));
  border-color: rgba(197, 160, 89, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.wc-dialog-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* 历史记录 - 严格对齐HTML */
.wc-history-panel {
  margin-top: 20px;
  flex: 1;
  overflow-y: auto;
  padding: 0 10px;
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
  scrollbar-width: none;
}

.wc-history-panel::-webkit-scrollbar {
  display: none;
}

.wc-history-item {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 100%;
  /* Remove background/padding from container - move to inner bubble */
}

.wc-history-item > div:last-child {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .wc-history-item > div:last-child {
  background: rgba(255, 255, 255, 0.03);
}

.wc-history-item--highlight > div:last-child {
  background: rgba(197, 160, 89, 0.1);
  color: var(--text-primary);
}

[data-theme="dark"] .wc-history-item--highlight > div:last-child {
  background: rgba(197, 160, 89, 0.05);
  color: rgba(255, 255, 255, 0.85);
}

/* ========== 操作栏样式 (严格对齐 style-unification-preview.html) ========== */
.wc-action-bar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px;
  position: relative;
}

/* 输入框 - 严格对齐HTML */
.wc-input-box {
  flex: 1;
  height: 50px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--text-primary);
  font-family: 'Noto Serif SC', serif;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

[data-theme="dark"] .wc-input-box {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

.wc-input-box:focus-within {
  border-color: var(--color-gold);
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .wc-input-box:focus-within {
  background: rgba(0, 0, 0, 0.6);
}

.wc-input-field {
  flex: 1;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  outline: none;
  font-size: 16px;
}

.wc-input-field::placeholder {
  color: var(--text-muted);
}

/* 操作按钮 - 严格对齐HTML */
.wc-action-btn {
  height: 50px;
  padding: 0 24px;
  border: 1px solid var(--color-gold);
  background: linear-gradient(180deg, rgba(197, 160, 89, 0.1), rgba(197, 160, 89, 0.05));
  color: var(--color-gold);
  font-family: 'Cinzel', serif;
  font-weight: bold;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Dialog panel action buttons are more compact */
.wc-panel .wc-action-btn {
  height: 36px;
  padding: 0 16px;
}

.wc-action-btn:hover {
  background: rgba(197, 160, 89, 0.2);
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.2);
  transform: translateY(-1px);
}

/* 主要按钮 - 严格对齐HTML */
.wc-action-btn--primary {
  background: var(--color-gold);
  color: #1a1614;
  border-color: #e6dac0;
}

.wc-action-btn--primary:hover {
  background: #d4b06a;
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
}

/* 危险按钮 - 严格对齐HTML */
.wc-action-btn--danger {
  border-color: var(--color-blood);
  color: var(--color-blood-light);
  background: rgba(138, 28, 28, 0.1);
}

.wc-action-btn--danger:hover {
  background: rgba(138, 28, 28, 0.2);
  box-shadow: 0 0 15px rgba(138, 28, 28, 0.3);
}

/* ========== 动画关键帧 ========== */
@keyframes wc-pulse-border {
  0% { 
    border-color: rgba(197, 160, 89, 0.5);
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.15);
  }
  50% { 
    border-color: rgba(197, 160, 89, 0.75);
    box-shadow: 0 0 16px rgba(197, 160, 89, 0.2);
  }
  100% { 
    border-color: rgba(197, 160, 89, 0.5);
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.15);
  }
}

@keyframes wc-selectable-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.2), 0 6px 14px rgba(197, 160, 89, 0.08); }
  50% { box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.4), 0 10px 22px rgba(197, 160, 89, 0.18); }
}

@keyframes wc-typing-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 打字光标 */
.wc-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--color-gold);
  margin-left: 2px;
  animation: wc-typing-cursor 1s infinite;
  vertical-align: text-bottom;
}

/* ========== 装饰角纹 (严格对齐 style-unification-preview.html) ========== */
.wc-corner-deco {
  position: fixed;
  pointer-events: none;
  z-index: 5;
  opacity: 0.3;
}

.wc-corner-deco--tl { top: 20px; left: 20px; transform: rotate(0deg); }
.wc-corner-deco--tr { top: 20px; right: 20px; transform: rotate(90deg); }
.wc-corner-deco--bl { bottom: 20px; left: 20px; transform: rotate(-90deg); }
.wc-corner-deco--br { bottom: 20px; right: 20px; transform: rotate(180deg); }

/* 白天模式下角纹更淡 */
.wc-corner-deco {
  opacity: 0.15;
}

[data-theme="dark"] .wc-corner-deco {
  opacity: 0.3;
}

/* ========== 笔记本悬浮按钮 ========== */
.wc-notebook-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.50);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
}

.wc-notebook-panel {
  max-width: 92vw;
}

@media (max-width: 768px) {
  .wc-notebook-fab {
    display: none;
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
    width: 52px;
    height: 52px;
  }

  .wc-notebook-panel {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none;
    width: 100%;
    height: min(75vh, 560px);
    max-height: calc(100vh - 80px);
    border-radius: 16px 16px 0 0;
  }
}

.wc-mobile-player-bar {
  padding: 8px 0 calc(6px + env(safe-area-inset-bottom));
  background: var(--glass-bg-weak);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 10;
}

.wc-mobile-player-bar__track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 12px 6px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.wc-mobile-player-bar__track::-webkit-scrollbar {
  display: none;
}

/* Mobile player card - compact horizontal layout */
.wc-player-card--mobile {
  flex: 0 0 auto;
  min-width: 90px;
  max-width: 100px;
  padding: 8px 6px 6px;
  border-radius: 8px;
  gap: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
  scroll-snap-align: start;
}

.wc-player-card--mobile .wc-player-card__avatar {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
}

.wc-player-card--mobile .wc-player-card__info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.wc-player-card--mobile .wc-player-card__name {
  font-size: 11px;
  max-width: 80px;
  line-height: 1.2;
  margin-bottom: 0;
  justify-content: center;
}

.wc-player-card--mobile .wc-player-card__meta {
  font-size: 9px;
  justify-content: center;
  min-height: auto;
}

.wc-player-card--mobile .wc-seat-badge {
  font-size: 9px;
  padding: 1px 4px;
}

/* Hide meta text in mobile compact mode */
.wc-player-card--mobile .wc-player-card__meta span:not(.wc-seat-badge) {
  display: none;
}

/* Mobile player card badges - smaller and repositioned */
.wc-player-card--mobile [class*="absolute"][class*="top-1.5"] {
  top: 2px;
  left: 2px;
  right: auto;
  font-size: 8px;
  padding: 1px 4px;
}

.wc-player-card--mobile [class*="absolute"][class*="right-1.5"] {
  top: 2px;
  right: 2px;
  left: auto;
  font-size: 8px;
  padding: 1px 4px;
}

/* Mobile role badge at bottom */
.wc-player-card--mobile [class*="absolute"][class*="bottom-0"] {
  bottom: -2px;
  right: -2px;
  font-size: 8px;
  padding: 1px 4px;
}

.wc-vote-result-card {
  width: 100%;
}

.wc-vote-result-row {
  flex-wrap: wrap;
}

.wc-vote-result-target {
  min-width: 0;
}

.wc-vote-result-count {
  min-width: 0;
}

.wc-voting-progress-row {
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .wc-voting-progress-row {
    padding: 6px 8px;
  }

  .wc-voting-progress-row > div:first-child {
    min-width: 60px;
  }

  .wc-voting-progress-row .text-sm {
    font-size: 12px;
  }

  .wc-voting-progress-row .text-xs {
    font-size: 10px;
  }
}

.wc-mention-suggest {
  max-width: 280px;
}

.wc-player-detail-content {
  max-height: min(88vh, 720px);
  overflow-y: auto;
}

.wc-wolf-panel {
  width: 100%;
}

/* Wolf panel mobile layout */
@media (max-width: 768px) {
  .wc-wolf-panel {
    padding: 10px;
  }

  .wc-wolf-panel > div:first-child {
    margin-bottom: 10px;
  }

  .wc-wolf-panel > div:first-child > div:first-child {
    width: 28px;
    height: 28px;
  }

  .wc-wolf-panel > div:first-child > div:last-child > div:first-child {
    font-size: 13px;
  }

  .wc-wolf-panel > div:first-child > div:last-child > div:last-child {
    font-size: 11px;
  }
}

.wc-bottom-action-panel {
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
}

.wc-bottom-action-row,
.wc-witch-action-row {
  width: 100%;
}

@media (max-width: 768px) {
  .wc-role-reveal-card {
    padding: 0 12px;
  }

  .wc-role-reveal-card .glass-panel {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .wc-vote-result-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .wc-vote-result-target {
    width: 100%;
  }

  .wc-vote-result-count {
    width: 100%;
    justify-content: flex-end;
  }

  .wc-voting-progress-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .wc-tutorial-modal {
    max-width: 92vw;
    max-height: 90vh;
  }

  .wc-tutorial-scroll {
    max-height: calc(90vh - 160px);
  }

  .wc-player-detail-wrapper {
    width: 92vw;
  }

  .wc-player-detail-content {
    max-height: 88vh;
  }

  .wc-mention-suggest {
    max-width: 80vw;
    max-height: 40vh;
  }

  .wc-wolf-panel {
    padding: 12px;
  }

  .wc-welcome-actions {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
  }

  .wc-dev-console {
    width: 100%;
    max-width: 100%;
  }

  .wc-bottom-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .wc-witch-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .wc-contract-paper {
    min-height: 520px;
    padding: 24px 20px 22px;
  }

  .wc-contract-title {
    font-size: 28px;
    letter-spacing: 0.2em;
  }

  .wc-contract-oath {
    font-size: 13px;
  }

  .wc-signature-input {
    height: 54px;
    font-size: 26px;
  }

  .wc-wax-seal {
    width: 84px;
    height: 84px;
  }
}

.wc-notebook-fab:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 25px rgba(197, 160, 89, 0.30);
}

/* Scrollbar - 现代简洁风格 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
  background: var(--text-muted); 
  border-radius: 9999px; 
}
::-webkit-scrollbar-thumb:hover { 
  background: var(--text-secondary); 
}

/* 隐藏滚动条 - 严格对齐 style-unification-preview.html */
.scrollbar-hide {
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* === 动画关键帧 === */
@keyframes blink {
  50% { opacity: 0; }
}

@keyframes speaker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.1); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* === 加载状态 === */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === 布局样式 (保留用于游戏布局) === */
.game-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
  overflow: hidden;
}

.game-layout {
  flex: 1;
  display: flex;
  gap: 20px;
  padding: 20px 40px;
  overflow: hidden;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.game-layout-expanded {
  flex: 1;
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  overflow: hidden;
  width: 100%;
  justify-content: center;
}

.left-players-column {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex-shrink: 0;
  padding-right: 8px;
}

.right-panel {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  padding-left: 8px;
  height: 100%;
  min-height: 0;
}

.center-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-width: 1000px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.bottom-panel {
  border-top: 1px solid var(--border-color);
  padding: 20px 40px;
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.human-player-bar .avatar-sm {
  width: 40px;
  height: 40px;
}

.human-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.human-name {
  font-weight: 600;
  font-size: 14px;
}

.badge-sm {
  padding: 2px 6px;
  font-size: 10px;
}

/* 对话框 */
.dialog-box {
  flex: 1;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  min-height: 200px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.dialog-box::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--border-color);
  border-radius: calc(var(--radius-xl) - 2px);
  pointer-events: none;
  opacity: 0.3;
}

.dialog-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.dialog-message {
  animation: fade-slide-up 0.3s ease;
}

@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dialog-speaker {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.dialog-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}

.dialog-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px;
}


.bottom-panel {
  padding: 16px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

/* === 空状态 === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px;
  text-align: center;
  height: 100%;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 300px;
}

/* === YOU 徽章 === */
.you-badge {
  background: var(--color-accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === 打字光标 === */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--color-accent);
  animation: blink 1s infinite;
  margin-left: 2px;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* === Notion 风格 === */
.game-layout {
  flex: 1;
  display: flex;
  gap: 20px;
  padding: 20px 40px;
  overflow: hidden;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.side-players {
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 4px;
  flex-shrink: 0;
}

.side-players.left { align-items: flex-end; }
.side-players.right { align-items: flex-start; }

.center-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.player-card-flat {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: default;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.player-card-flat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.player-card-flat.clickable {
  cursor: pointer;
  border-color: var(--color-accent);
}

.player-card-flat.clickable:hover {
  background: var(--bg-hover);
}

.player-card-flat.selected {
  background: var(--bg-selected);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-bg);
}

.player-card-flat.dead {
  opacity: 0.5;
  filter: grayscale(1);
  background: var(--bg-secondary);
  border-style: dashed;
}

.player-card-flat.speaking {
  border-color: var(--color-accent);
  background: var(--color-accent-bg);
}

.player-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.seat-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.player-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.avatar-container {
  position: relative;
  width: 56px;
  height: 56px;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
  object-fit: cover;
}

.status-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
}

.speaking-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
}

.human-player-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.human-player-card.clickable {
  cursor: pointer;
  border-color: var(--color-accent);
}

.human-player-card.clickable:hover {
  background: var(--bg-hover);
}

.human-player-card.selected {
  background: var(--bg-selected);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-bg);
}

.role-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-bg);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.dialog-container {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
}

.dialog-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.dialog-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.history-messages {
  opacity: 0.5;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.history-item {
  display: flex;
  gap: 8px;
}

.history-speaker {
  font-weight: 600;
  color: var(--text-secondary);
}

.current-message {
  animation: fade-up 0.4s ease;
}

.message-speaker {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-speaker::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.message-content {
  font-size: 24px;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 500;
  font-family: "Georgia", serif;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dialog-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.mini-log {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.mini-log-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
}

.mini-log-header:hover {
  color: var(--text-primary);
}

.mini-log-latest {
  color: var(--text-primary);
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all 0.15s ease;
  font-size: 14px;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: #000000;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--border-color);
}

.input {
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 0 12px;
  background: var(--bg-card);
  transition: border-color 0.15s ease;
}
.input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--color-accent-bg);
}

.game-stage {
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
}

.top-bar {
  background: var(--bg-main) !important;
  border-bottom: 1px solid var(--border-color);
  padding: 0 40px;
  height: 56px;
}

.top-bar-title {
  font-family: serif;
  font-size: 18px;
}

.bottom-panel {
  border-top: 1px solid var(--border-color);
  padding: 20px 40px;
  background: var(--bg-main);
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: currentColor;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 24px;
}

.empty-state-title {
  font-size: 24px;
  font-weight: 600;
}



/* 当前发言高亮 */
.current-speaker-highlight {
  animation: speaker-pulse 2s ease-in-out infinite;
}

@keyframes speaker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 134, 11, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.1); }
}

/* 夜间行动弹窗样式 */
.night-action-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.night-action-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* 操作提示条 */
.action-hint-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--color-accent-bg);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  font-size: 14px;
  font-weight: 500;
  margin: 0 auto;
  max-width: 400px;
}

.action-hint-bar.danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.action-hint-bar.success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

/* === 更大的玩家卡片 === */
.player-card-larger {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: default;
  width: 100%;
  min-width: 120px;
}

.player-card-larger:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.player-card-larger.clickable {
  cursor: pointer;
  border-color: var(--color-accent);
  background: var(--color-accent-bg);
}

.player-card-larger.clickable:hover {
  background: var(--color-accent-bg);
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.2);
}

.player-card-larger.selected {
  background: var(--color-success-bg);
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.2);
}

.player-card-larger.dead {
  opacity: 0.5;
  filter: grayscale(0.8);
  background: var(--bg-secondary);
}

.player-card-larger.speaking {
  border-color: var(--color-accent);
  background: var(--color-accent-bg);
}

.player-card-larger.wolf-teammate {
  border-color: var(--color-wolf);
  background: var(--color-wolf-bg);
}

.player-card-larger .avatar-md {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.player-card-larger .avatar-md img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-card-larger .player-info-full {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.player-card-larger .seat-badge-sm {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

.player-card-larger .player-name-full {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}

.player-card-larger .speaking-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
}


/* === 阶段提示条 === */
.phase-hint-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
  color: var(--text-primary);
  height: 50px;
}

.phase-hint-bar.night {
  background: #231e19;
  color: #f0e6d2;
  border-bottom-color: #3e2723;
}

.phase-hint-bar .hint-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.phase-hint-bar.night .hint-icon {
  background: rgba(255,255,255,0.1);
  color: #f0e6d2;
}

.phase-hint-bar .hint-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.phase-hint-bar .hint-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(184, 134, 11, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
}

.phase-hint-bar.night .hint-action {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
}

/* === 消息气泡自适应宽度 === */
.message-bubble-auto {
  display: inline-block;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.message-bubble-auto.from-self {
  background: var(--color-accent);
  color: white;
  margin-left: auto;
}

.message-bubble-auto.from-other {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.message-bubble-auto.from-system {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
  padding: 8px 20px;
  max-width: none;
  width: auto;
  display: inline-block;
  border-radius: var(--radius-md);
}

/* Markdown 样式 */
.message-bubble-auto p {
  margin: 0;
}

.message-bubble-auto p + p {
  margin-top: 8px;
}

.message-bubble-auto strong {
  font-weight: 600;
}

.message-bubble-auto em {
  font-style: italic;
}

.message-bubble-auto code {
  background: rgba(0,0,0,0.1);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 13px;
}

.message-bubble-auto ul, .message-bubble-auto ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-bubble-auto li {
  margin: 4px 0;
}

/* 消息行 */
.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.message-row:last-child {
  border-bottom: none;
}

.message-row.from-self {
  flex-direction: row-reverse;
}

.message-row .message-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
}

.message-row .message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-row .message-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: calc(100% - 50px);
}

.message-row.from-self .message-body {
  align-items: flex-end;
}

.message-row .message-sender {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.message-row .message-sender .seat-tag {
  font-size: 10px;
  background: var(--bg-secondary);
  padding: 1px 4px;
  border-radius: 3px;
}

/* 玩家提及标签 */
.player-mention-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 2px 8px 2px 2px;
  font-size: 12px;
  vertical-align: middle;
  margin: 0 2px;
}

.player-mention-tag img {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.player-mention-tag .mention-seat {
  font-weight: 600;
  color: var(--color-accent);
  font-size: 11px;
}

.player-mention-tag .mention-name {
  color: var(--text-primary);
  font-weight: 500;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-text-with-mentions {
  line-height: 1.8;
}

/* ========== Night Action Overlays (Abstract) ========== */
.wc-night-action-overlay {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.wc-night-action-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.5) 86%);
  opacity: 0.4;
}

.wc-night-action-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.035), transparent 40%),
    radial-gradient(circle at 78% 68%, rgba(255, 255, 255, 0.025), transparent 45%);
  mix-blend-mode: screen;
  opacity: 0.35;
}

.wc-night-action-target {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(9, 9, 12, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  min-width: 200px;
  justify-content: center;
}

.wc-night-action-target__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  flex-shrink: 0;
}

.wc-night-action-target__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wc-night-action-target__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.wc-night-action-target__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Screen shake for impact moments */
.wc-night-action-overlay[data-variant="wolf"],
.wc-night-action-overlay[data-variant="hunter"] {
  animation: wc-night-shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes wc-night-shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Wolf slash */
.wc-night-wolf-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(138, 28, 28, 0.42) 0%, transparent 70%);
  opacity: 0;
  mix-blend-mode: screen;
  animation: wc-night-flash 0.7s ease-out forwards;
}

.wc-night-wolf-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 40% 50%, rgba(60, 0, 0, 0.45), transparent 55%);
  opacity: 0;
  animation: wc-night-wolf-shade 0.9s ease-out forwards;
}

.wc-night-wolf-claws {
  position: absolute;
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  transform: rotate(-12deg);
  filter: drop-shadow(0 0 14px rgba(138, 28, 28, 0.6));
}

.wc-night-wolf-claw {
  fill: none;
  stroke: rgba(185, 54, 54, 0.95);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  opacity: 0;
}

.wc-night-wolf-claw--1 { animation: wc-night-claw 0.45s ease-out 0.05s forwards; }
.wc-night-wolf-claw--2 { animation: wc-night-claw 0.45s ease-out 0.12s forwards; }
.wc-night-wolf-claw--3 { animation: wc-night-claw 0.45s ease-out 0.2s forwards; }

@keyframes wc-night-claw {
  0% { stroke-dashoffset: 260; opacity: 0; filter: blur(2px); }
  30% { opacity: 1; filter: blur(0.5px); }
  100% { stroke-dashoffset: 0; opacity: 0; filter: blur(1px); }
}

@keyframes wc-night-wolf-shade {
  0% { opacity: 0; transform: scale(0.95); }
  30% { opacity: 0.6; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1); }
}

@keyframes wc-night-flash {
  0% { opacity: 0; transform: scale(0.92); }
  18% { opacity: 0.85; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1); }
}

/* Witch save (heal) */
.wc-night-heal-core {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 0 80px 36px rgba(197, 160, 89, 0.75),
    0 0 160px 80px rgba(197, 160, 89, 0.28);
  opacity: 0;
  transform: scale(0.55);
  animation: wc-night-heal-bloom 2.2s ease-out forwards;
}

.wc-night-heal-ring {
  position: absolute;
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 999px;
  width: 10px;
  height: 10px;
  opacity: 0;
}

.wc-night-heal-ring--1 { animation: wc-night-ripple 2.2s ease-out 0s forwards; }
.wc-night-heal-ring--2 { animation: wc-night-ripple 2.2s ease-out 0.6s forwards; }
.wc-night-heal-ring--3 { animation: wc-night-ripple 2.2s ease-out 1.2s forwards; }

.wc-night-heal-sparkles {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 45%, rgba(255, 255, 255, 0.18) 0%, transparent 35%),
    radial-gradient(circle at 70% 55%, rgba(255, 255, 255, 0.14) 0%, transparent 32%),
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.12) 0%, transparent 30%);
  filter: blur(1px);
  opacity: 0;
  animation: wc-night-heal-sparkle 2.2s ease-out forwards;
}

@keyframes wc-night-heal-sparkle {
  0% { opacity: 0; transform: scale(0.9); }
  45% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}

@keyframes wc-night-heal-bloom {
  0% { opacity: 0; transform: scale(0.6); filter: blur(10px); }
  45% { opacity: 1; transform: scale(1.35); filter: blur(20px); }
  100% { opacity: 0; transform: scale(2.1); filter: blur(40px); }
}

@keyframes wc-night-ripple {
  0% { width: 14px; height: 14px; opacity: 0.7; border-width: 2px; }
  100% { width: 680px; height: 680px; opacity: 0; border-width: 0; }
}

/* Witch poison (mist + distortion) */
.wc-night-poison-mist {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 30% 40%, rgba(107, 70, 193, 0.24), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(74, 222, 128, 0.14), transparent 45%),
    radial-gradient(circle at 50% 20%, rgba(180, 120, 255, 0.08), transparent 50%);
  filter: blur(48px);
  opacity: 0;
  animation:
    wc-night-mist-fade 0.7s ease-out forwards,
    wc-night-mist-swirl 4.2s ease-in-out infinite alternate;
}

.wc-night-poison-distort {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(0px) hue-rotate(0deg);
  animation: wc-night-distort 3.4s ease-in-out forwards;
}

.wc-night-poison-grain {
  position: absolute;
  inset: 0;
  opacity: 0;
  mix-blend-mode: overlay;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  animation: wc-night-grain 1.8s ease-out forwards;
}

@keyframes wc-night-grain {
  0% { opacity: 0; }
  40% { opacity: 0.12; }
  100% { opacity: 0; }
}

@keyframes wc-night-mist-fade {
  to { opacity: 1; }
}

@keyframes wc-night-mist-swirl {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(10deg) scale(1.08); }
}

@keyframes wc-night-distort {
  0% { backdrop-filter: blur(0px) hue-rotate(0deg); }
  50% { backdrop-filter: blur(3px) hue-rotate(22deg); }
  100% { backdrop-filter: blur(0px) hue-rotate(0deg); }
}

/* Hunter burst */
.wc-night-hunter-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 246, 233, 0.92);
  opacity: 0;
  animation: wc-night-flash-white 0.25s ease-out forwards;
}

.wc-night-hunter-burst {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(192, 86, 33, 0.38);
  animation: wc-night-shockwave 0.65s ease-out forwards;
}

.wc-night-hunter-lines {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: wc-night-impact 1s ease-out 0.1s forwards;
}

.wc-night-hunter-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 86, 33, 0.75), transparent);
  transform-origin: left center;
  transform: rotate(var(--wc-rot));
}

.wc-night-hunter-core {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 246, 233, 0.7), transparent 70%);
  filter: blur(8px);
  opacity: 0;
  animation: wc-night-hunter-core 0.8s ease-out forwards;
}

@keyframes wc-night-hunter-core {
  0% { opacity: 0; transform: scale(0.7); }
  30% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes wc-night-shockwave {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.9); opacity: 1; }
  50% { box-shadow: 0 0 0 48vw rgba(192, 86, 33, 0.3); opacity: 1; }
  100% { box-shadow: 0 0 0 96vw rgba(192, 86, 33, 0); opacity: 0; }
}

@keyframes wc-night-flash-white {
  0% { opacity: 0.75; }
  100% { opacity: 0; }
}

@keyframes wc-night-impact {
  0% { opacity: 0; transform: scale(0.92); }
  20% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

/* Seer check */
.wc-night-seer-lens {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(74, 144, 226, 0.18) 0%, transparent 70%);
  opacity: 0;
  mix-blend-mode: screen;
  animation: wc-night-seer-lens 1.6s ease-out forwards;
}

.wc-night-seer-eye {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  border: 1px solid rgba(74, 144, 226, 0.35);
  box-shadow:
    0 0 24px rgba(74, 144, 226, 0.25),
    inset 0 0 20px rgba(74, 144, 226, 0.18);
  opacity: 0;
  animation: wc-night-seer-eye 1.4s ease-out forwards;
}

.wc-night-seer-eye::before,
.wc-night-seer-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.wc-night-seer-eye::before {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.95) 0%, rgba(74, 144, 226, 0.4) 55%, transparent 70%);
  box-shadow: 0 0 14px rgba(74, 144, 226, 0.45);
}

.wc-night-seer-eye::after {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.2) 65%, transparent 75%);
  transform: translate(-20%, -35%);
}

.wc-night-seer-ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px dashed rgba(74, 144, 226, 0.35);
  opacity: 0;
}

.wc-night-seer-ring--1 {
  animation: wc-night-seer-ring 1.6s ease-out 0.1s forwards;
}

.wc-night-seer-ring--2 {
  animation: wc-night-seer-ring 1.6s ease-out 0.4s forwards;
}

@keyframes wc-night-seer-lens {
  0% { opacity: 0; transform: scale(0.9); }
  35% { opacity: 0.7; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.06); }
}

@keyframes wc-night-seer-eye {
  0% { opacity: 0; transform: scale(0.7); filter: blur(6px); }
  40% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.1); filter: blur(2px); }
}

@keyframes wc-night-seer-ring {
  0% { opacity: 0.8; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(10); }
}

/* ========== Sponsors - Background Stamps ========== */
.wc-sponsor-cards {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.wc-sponsor-card {
  position: absolute;
  width: 172px;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: transparent;
  border-radius: 999px;
  rotate: var(--card-rotate, 0deg);
  opacity: 0.72;
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transform: translate3d(0, 0, 0);
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease,
    filter 0.25s ease;
  filter: saturate(0.95);
}

.wc-sponsor-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(20, 20, 20, 0.2), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(20, 20, 20, 0.16), transparent 60%),
    repeating-radial-gradient(circle at center, rgba(20, 20, 20, 0.08) 0 2px, transparent 2px 5px);
  opacity: 0.45;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.wc-sponsor-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 14px 16px;
  gap: 4px;
  text-align: center;
  transform: translateY(4px);
}

.wc-sponsor-card__border {
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  border: 2px dashed rgba(20, 20, 20, 0.35);
  box-shadow:
    inset 0 0 0 6px rgba(20, 20, 20, 0.1),
    0 6px 14px rgba(0, 0, 0, 0.12);
  mix-blend-mode: multiply;
  opacity: 0.9;
  pointer-events: none;
}

.wc-sponsor-card__border::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.22);
}

.wc-sponsor-card--featured {
  width: 188px;
}

.wc-sponsor-card--featured .wc-sponsor-card__logo {
  width: 60px;
  height: 60px;
}

.wc-sponsor-card:hover {
  opacity: 0.92;
  transform: translate3d(0, -3px, 0) scale(1.03);
  filter: saturate(1);
}

.wc-sponsor-card__label {
  position: static;
  transform: none;
  padding: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(20, 20, 20, 0.55);
  background: transparent;
  z-index: 3;
  mix-blend-mode: multiply;
  order: 2;
}

.wc-sponsor-card__name {
  font-family: 'Cinzel', var(--font-title), ui-serif, Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: rgba(20, 20, 20, 0.78);
  letter-spacing: 0.02em;
  mix-blend-mode: multiply;
  order: 1;
  transition: opacity 0.22s ease;
}

.wc-sponsor-card:hover .wc-sponsor-card__logo,
.wc-sponsor-card:hover .wc-sponsor-card__name {
  opacity: 0;
}

.wc-sponsor-card__desc {
  font-size: 9px;
  color: rgba(61, 46, 36, 0.6);
  margin-top: 3px;
  font-style: italic;
}

.wc-sponsor-card__note {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(20, 20, 20, 0.88);
  width: 140px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.22s ease;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.wc-sponsor-card:hover .wc-sponsor-card__note {
  opacity: 1;
  color: rgba(10, 10, 10, 0.95);
}

/* Sponsor card with logo */
.wc-sponsor-card--with-logo {
  display: block;
}

.wc-sponsor-card__logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 10px;
  background: transparent;
  transition: opacity 0.22s ease;
  padding: 0;
  box-shadow: none;
  opacity: 0.82;
  filter:
    grayscale(1)
    brightness(0.25)
    contrast(1.35);
  mix-blend-mode: multiply;
}

/* Card positions - scattered around the edges */
.wc-sponsor-card--left-center {
  top: 50%;
  left: 12%;
  translate: 0 -50%;
}

.wc-sponsor-card--left-center:hover {
  translate: 4px -50%;
}

.wc-sponsor-card--right-top {
  top: 22%;
  right: 12%;
}

.wc-sponsor-card--right-bottom {
  bottom: 20%;
  right: 12%;
}

/* Legacy positions (kept for compatibility) */
.wc-sponsor-card--top-left {
  top: 18%;
  left: 4%;
}

.wc-sponsor-card--bottom-left {
  bottom: 22%;
  left: 5%;
}

.wc-sponsor-card--top-right {
  top: 16%;
  right: 4%;
}

/* Watcha sponsor card: larger logo/name, more centered */
.wc-sponsor-card--watcha {
  top: 28%;
  right: 14%;
  width: 200px;
}

.wc-sponsor-card--watcha .wc-sponsor-card__logo {
  width: 82px;
  height: 82px;
}

.wc-sponsor-card--watcha .wc-sponsor-card__name {
  font-size: 16px;
}

/* ========== Watcha Rating Badge (replaces the desktop Watcha sponsor stamp) ========== */

.wc-sponsor-card--bottom-right {
  bottom: 18%;
  right: 4%;
}

.wc-sponsor-card--tokendance {
  width: 180px;
}

.wc-sponsor-card--tokendance .wc-sponsor-card__logo {
  width: 132px;
  height: 48px;
  border-radius: 0;
  filter: none;
  mix-blend-mode: normal;
  opacity: 0.95;
}

@media (max-width: 1280px) {
  .wc-sponsor-card--left-center {
    left: 6%;
  }

  .wc-sponsor-card--right-top {
    right: 6%;
  }

  .wc-sponsor-card--right-bottom {
    right: 6%;
  }

  .wc-sponsor-card--watcha {
    right: 8%;
  }
}

/* Mobile: hide floating sponsor cards, use inline stamps instead */
@media (max-width: 768px) {
  .wc-sponsor-cards {
    display: none;
  }
}

/* ========== Paper Inline Stamps (Mobile) ========== */
.wc-paper-sponsors {
  display: none;
}

@media (max-width: 768px) {
  .wc-paper-sponsors {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 8px 8px;
    margin-bottom: 4px;
  }
}

.wc-paper-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  padding: 10px 8px;
  border-radius: 999px;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  rotate: var(--stamp-rotate, 0deg);
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wc-paper-stamp::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  border: 2px dashed rgba(20, 20, 20, 0.25);
  pointer-events: none;
}

.wc-paper-stamp::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  pointer-events: none;
}

.wc-paper-stamp:hover {
  opacity: 0.75;
  transform: scale(1.05);
}


.wc-paper-stamp__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  filter: grayscale(1) brightness(0.4) contrast(1.2);
  mix-blend-mode: multiply;
}

.wc-paper-stamp--tokendance .wc-paper-stamp__logo {
  width: 56px;
  height: 22px;
  border-radius: 0;
  filter: none;
  mix-blend-mode: normal;
  opacity: 0.95;
}

.wc-paper-stamp--tokendance .wc-paper-stamp__name {
  font-size: 7px;
}

.wc-paper-stamp__name {
  font-family: 'Cinzel', var(--font-title), ui-serif, Georgia, serif;
  font-size: 8px;
  font-weight: 700;
  color: rgba(20, 20, 20, 0.65);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  mix-blend-mode: multiply;
}

/* Responsive positioning for larger screens */
@media (min-width: 1600px) {
  .wc-sponsor-card--top-left {
    left: 8%;
  }
  
  .wc-sponsor-card--bottom-left {
    left: 10%;
  }
  
  .wc-sponsor-card--top-right {
    right: 8%;
  }
  
  .wc-sponsor-card--bottom-right {
    right: 10%;
  }
}

/* ========== Landing Page Animations ========== */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

.animate-pulse-glow {
  animation: pulse-glow 4s ease-in-out infinite;
}

.animate-pulse-glow-delayed {
  animation: pulse-glow 4s ease-in-out infinite 2s;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes role-card-enter {
  0% {
    opacity: 0;
    transform: scale(0.8) rotateX(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateX(0deg);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out forwards;
}

.animate-role-card-enter {
  animation: role-card-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ========== Post Game Analysis Page ========== */
.analysis-page {
  background-color: #1a1614;
  color: #f0e6d2;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(138, 28, 28, 0.15), transparent 60%),
    radial-gradient(circle at 0% 100%, rgba(197, 160, 89, 0.08), transparent 50%);
}

@keyframes analysis-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.analysis-card {
  background: linear-gradient(145deg, rgba(40, 35, 33, 0.9), rgba(30, 25, 23, 0.95));
  border: 1px solid rgba(197, 160, 89, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(0,0,0,0.2);
  position: relative;
}

.analysis-card::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(197, 160, 89, 0.1);
  pointer-events: none;
  border-radius: inherit;
}

.analysis-ornament-border {
  position: relative;
}

.analysis-ornament-border::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.5), transparent);
}

.analysis-nav-line {
  position: absolute;
  left: 50%; 
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(197, 160, 89, 0.1), rgba(197, 160, 89, 0.3), rgba(197, 160, 89, 0.1));
  z-index: 0;
}

.analysis-hide-scrollbar::-webkit-scrollbar { 
  display: none; 
}

.analysis-hide-scrollbar { 
  -ms-overflow-style: none; 
  scrollbar-width: none; 
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 100%; }
  100% { left: 100%; }
}
