/* =========================
   Base
========================= */
html{
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
}

body{
    margin:0;
    font-family:"Noto Sans TC","Segoe UI","Microsoft JhengHei","PingFang TC",sans-serif;
}

.player-page{
    width:100%;
    min-width:800px;
    max-width:1000px;
    margin:0 auto;
    padding:10px 8px;
    box-sizing:border-box;
    text-align:left;
}

.player-title{
    margin:0 0 6px;
    font-size:16px;
    font-weight:700;
    text-align:left;
}

/* =========================
   Theme Background
========================= */

/* =========================
   Board
========================= */
.player-board{
    display:inline-block;
    padding:2px;
    border-radius:10px;
    box-sizing:border-box;
}

.theme-day .player-board{
    background:rgba(255,255,255,0.75);
    border:1px solid rgba(180,120,40,0.22);
    box-shadow:0 2px 8px rgba(150,100,30,0.08);
}

.theme-night .player-board{
    background:rgba(0,0,80,0.55);
    border:1px solid rgba(130,150,255,0.28);
    box-shadow:0 0 12px rgba(96,165,250,0.12);
}

.theme-beforegame .player-board{
    background:rgba(255,250,245,0.75);
    border:1px solid rgba(180,140,120,0.25);
    box-shadow:0 2px 6px rgba(120,80,60,0.08);
}

.theme-aftergame .player-board{
    background:rgba(240,248,255,0.9);
    border:1px solid rgba(120,160,200,0.25);
    box-shadow:0 2px 8px rgba(100,140,180,0.10);
}

/* =========================
   Grid：固定 5 個
========================= */
.player-grid{
    --player-card-width:155px;

    display:grid;
    grid-template-columns:repeat(5, var(--player-card-width));
    gap:1px;
    justify-content:center;
    text-align:left;
}

/* =========================
   Card Base
========================= */
.player-card{
    position:relative;
    display:flex;
    align-items:center;
    gap:1px;
    min-height:56px;
    padding:1px 1px;
    border-radius:10px;
    box-sizing:border-box;
    overflow:hidden;

    transition:
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}


.player-card::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    background:currentColor;
    opacity:0;
    pointer-events:none;
    transition:opacity .15s ease;
}

.player-card:hover{
    transform:translateY(-1px);
}

.player-card:hover::before{
    opacity:.06;
}

.player-card:active{
    transform:translateY(0);
}

.player-card:active::before{
    opacity:.10;
}

.player-card.self{
    cursor:default;
    opacity:1;
}

.player-card.dead{
    cursor:default;
    filter:none;
    opacity:1;
}

/* =========================
   Avatar
========================= */
.player-avatar-wrap{
    flex:0 0 49px;
    width:49px;
    height:55px;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    z-index:1;
}

.player-avatar-wrap a{
    display:block;
    line-height:0;
    border-radius:10px;
}

.player-avatar{
    display:block;
    object-fit:cover;

    border:2px solid currentColor;
    box-sizing:content-box;

    border-radius:5px;
    background:#fff;
    flex-shrink:0;

    box-shadow:
        0 1px 2px rgba(0,0,0,.18),
        0 1px 3px rgba(0,0,0,.12);
}

/* =========================
   Info
========================= */
.player-info{
    position:relative;
    z-index:1;
    flex:1;
    min-width:0;
    padding-right:2px;
}

.player-name{
    font-size:12px;
    font-weight:700;
    line-height:1.25;
    letter-spacing:.01em;
    word-break:break-all;
}

.player-meta{
    margin-top:2px;
    font-size:12px;
    font-weight:600;
    line-height:1.18;
    letter-spacing:.005em;
    word-break:break-all;
}

.player-meta > div{
    margin-top:1px;
}

.player-meta > div:first-child{
    margin-top:0;
}

/* =========================
   Theme：Day
========================= */
.theme-day .player-card{
    border:1px solid rgba(255,255,255,0.3);
    background:rgba(255,255,255,0.1);
    /*
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    */
    box-shadow:
        0 1px 2px rgba(150,100,30,.08),
        0 2px 6px rgba(150,100,30,.10);
}

.theme-day .player-card:hover{
    border-color:rgba(245,158,11,.55);
    box-shadow:
        0 2px 4px rgba(150,100,30,.12),
        0 4px 12px rgba(180,120,40,.16);
}

.theme-day .player-card.self{
    background:linear-gradient(180deg,#fffaf0 0%,#fdecc8 100%);
}

.theme-day .player-card.dead{
    background:linear-gradient(180deg,#9ca3af 0%,#6b7280 100%);
    border-color:rgba(75,85,99,.45);
}

.theme-day .player-card.voted{
    border-color:rgba(0,160,160,.42);
    background:linear-gradient(180deg,#ecfeff 0%,#d0ffff 100%);
    box-shadow:
        0 1px 2px rgba(0,150,150,.12),
        0 4px 12px rgba(0,150,150,.18);
}


/* =========================
   Theme：Night
========================= */
.theme-night .player-card{
    border:1px solid rgba(130,150,255,.22);
    background:rgba(0,0,40,0.3);
    box-shadow:
        0 1px 2px rgba(0,0,0,.45),
        0 3px 8px rgba(0,0,0,.45);
}

.theme-night .player-card:hover{
    border-color:rgba(122,162,255,.6);
    box-shadow:
        0 0 0 1px rgba(122,162,255,.22),
        0 0 14px rgba(96,165,250,.16),
        0 4px 12px rgba(0,0,0,.6);
}

.theme-night .player-card.self{
    background:linear-gradient(180deg,#15153d 0%,#20204d 100%);
}

.theme-night .player-card.dead{
    background:linear-gradient(180deg,#2f2f2f 0%,#141414 100%);
    border-color:rgba(180,180,180,.18);
}

.theme-night .player-card.voted{
    border-color:rgba(0,120,0,.55);
    background:linear-gradient(180deg,#003000 0%,#004000 100%);
    box-shadow:
        0 1px 2px rgba(0,0,0,.45),
        0 0 12px rgba(0,255,0,.22);
}

/* =========================
   Theme：Beforegame
========================= */
.theme-beforegame .player-card{
    border:1px solid rgba(255,255,255,0.3);
    background:rgba(255,255,255,0.1);
    /*
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    */
    box-shadow:
        0 1px 2px rgba(150,80,50,.08),
        0 2px 6px rgba(150,80,50,.10);
}

.theme-beforegame .player-card:hover{
    border-color:rgba(251,146,60,.55);
    box-shadow:
        0 2px 4px rgba(150,80,50,.12),
        0 4px 12px rgba(150,80,50,.15);
}

.theme-beforegame .player-card.self{
    background:linear-gradient(180deg,#fff7ed 0%,#fed7aa 100%);
}

.theme-beforegame .player-card.dead{
    background:linear-gradient(180deg,#aaa29b 0%,#7f766f 100%);
}

.theme-beforegame .player-card.started{
    border-color:rgba(190,0,190,.55);
    background:rgba(255,80,255,.75);
    box-shadow:
        0 1px 2px rgba(160,40,160,.16),
        0 0 14px rgba(255,80,255,.35);
}


/* =========================
   Theme：Aftergame
========================= */
.theme-aftergame .player-card{
    border:1px solid rgba(255,255,255,0.3);
    background:rgba(255,255,255,0.1);
    /*
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    */
    box-shadow:
        0 1px 2px rgba(70,130,180,.08),
        0 2px 7px rgba(70,130,180,.11);
}

.theme-aftergame .player-card:hover{
    border-color:rgba(96,165,250,.55);
    box-shadow:
        0 2px 4px rgba(70,130,180,.12),
        0 4px 12px rgba(70,130,180,.16);
}

.theme-aftergame .player-card.self{
    background:linear-gradient(180deg,#eff6ff 0%,#bfdbfe 100%);
}

.theme-aftergame .player-card.dead{
    background:linear-gradient(180deg,#9ca3af 0%,#6b7280 100%);
}

.theme-aftergame .player-card.sudden-death1{
    border-color:rgba(100,100,255,.5);
    background:linear-gradient(180deg,#c7d2fe 0%,#8080ff 100%);
    box-shadow:
        0 1px 2px rgba(80,80,200,.18),
        0 0 14px rgba(120,120,255,.32);
}

.theme-aftergame .player-card.sudden-death2{
    border-color:rgba(255,120,120,.5);
    background:linear-gradient(180deg,#fecaca 0%,#ff8080 100%);
    box-shadow:
        0 1px 2px rgba(200,60,60,.18),
        0 0 14px rgba(255,120,120,.35);
}

/* =========================
   Dead Avatar Hover
========================= */
.avatar-dead{
    position:relative;
}

.avatar-dead .player-avatar{
    position:absolute;
    top:0;
    left:0;
    transition:
        opacity .18s ease,
        transform .18s ease;
}

.avatar-ghost{
    opacity:1;
    z-index:2;
}

.avatar-real{
    opacity:0;
    z-index:1;
}

.player-card.dead:hover .avatar-ghost,
.player-card.sudden-death1:hover .avatar-ghost,
.player-card.sudden-death2:hover .avatar-ghost{
    opacity:0;
}

.player-card.dead:hover .avatar-real,
.player-card.sudden-death1:hover .avatar-real,
.player-card.sudden-death2:hover .avatar-real{
    opacity:1;
    transform:scale(1.04);
}


/* =========================
   Small Screen
   仍保持 5 個一排
========================= */
@media (max-width:620px){
    .player-page{
        min-width:620px;
    }
}

#playerListBox {
  transition: box-shadow 0.2s ease;
}

/* 釘選中的玩家列表：毛玻璃背景 */
#playerListBox.player-pinned {
  position: fixed;
  left: 0;
  z-index: 9990;
  width: 800px;

  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);

  border-bottom: 1px solid rgba(255,255,255,0.45);
  box-shadow:
    0 12px 30px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.65);
}

/* spacer */
#playerListSpacer {
  display: none;
}

#playerListSpacer.active {
  display: block;
}

/* iOS Segmented control 風格按鈕 */
.pin-segment-btn {
  appearance: none;
  -webkit-appearance: none;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  min-height: 20px;
  padding: 3px 12px;

  border: 1px solid rgba(60, 60, 67, 0.18);
  border-radius: 999px;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #1f2937;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(238,242,247,0.85));

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 4px rgba(0,0,0,0.12);

  cursor: pointer;
  vertical-align: middle;
  white-space: nowrap;
}

.pin-segment-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background:
    linear-gradient(180deg, #ffffff, #eef2ff);
}

.pin-segment-btn:active {
  transform: translateY(1px);
}

/* 開啟狀態 */
.pin-segment-btn.is-pinned {
  color: #ffffff;
  border-color: rgba(34, 197, 94, 0.65);

  background:
    linear-gradient(180deg, #34d399, #16a34a);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 2px 8px rgba(22,163,74,0.28);
}

.pin-segment-icon {
  font-size: 13px;
}

.pin-segment-text {
  display: inline-block;
}

.menu {
  position: fixed;
  top: 2px;
  left: 2px;

  width: auto;
  z-index: 10000;

  box-sizing: border-box;
  padding: 1px 1px;

  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-wrap: wrap;

  border-radius: 14px;

  /* 保留 PHP 給的 background-color，再疊一點亮面 */
  background-image: linear-gradient(
    180deg,
    rgba(255,255,255,0.25),
    rgba(255,255,255,0.18)
  );

  border: 1px solid rgba(255,255,255,0.45);

  box-shadow:
    0 8px 24px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.7);

  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);

  /* color: #111827; */
}
/* 加一層半透明覆蓋（不影響PHP色） */
.menu::before {
  display: none;
}
.menu small {
  font-size: 12px;
  /* color: #374151; */
}

.menu a {
  text-decoration: none;
  color: #2563eb;
  font-weight: 600;
}

.menu a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}
.menu button,
.menu a {
  border-radius: 999px;
  padding: 3px 10px;
}

/* 把 menu 裡的 a 也做成按鈕 */
.menu a {
  display: inline-block;

  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.65);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 3px rgba(0,0,0,0.1);

  transition: all 0.15s ease;
}

.menu a:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(37,99,235,0.4);
}

.menu a:active {
  transform: translateY(1px);
}
.menu-label {
  font-size: 12px;
  font-weight: 800;
  /* color: #111827; */
  margin-left: 4px;
}

.seg-control {
  display: inline-flex;
  align-items: center;

  padding: 2px;
  border-radius: 999px;

  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.16);

  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.08),
    0 1px 2px rgba(255,255,255,0.5);
}

.menu .seg-control a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 20px;
  padding: 3px 5px;

  border: 0;
  border-radius: 999px;

  background: transparent;
  box-shadow: none;

  color: #374151;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.menu .seg-control a:hover {
  background: rgba(255,255,255,0.65);
  color: #111827;
  text-decoration: none;
}

.menu .seg-control a.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, #3b82f6, #2563eb);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 1px 4px rgba(37,99,235,0.35);
}

/* menu 與玩家列表中間的資訊區：整體緊湊 */
.village-head,
.village-alert,
.village-action {
  box-sizing: border-box;
  margin: 3px 8px;
  border-collapse: separate;
  border-spacing: 0;
  font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

/* 村莊標題區 */
.village-head {
  width: calc(100% - 16px);
  padding: 3px 8px;

  border-radius: 12px;
  overflow: hidden;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,0,0,0.08);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    0 1px 4px rgba(0,0,0,0.08);
}

.village-head td {
  padding: 2px 4px;
  vertical-align: middle;
}

.village-head strong {
  font-size: 15pt;
  letter-spacing: 0.02em;
}

.village-head small {
  font-size: 12px;
  font-weight: 600;
  /* color: #374151; */
}

.village-head img {
  vertical-align: middle;
  margin-left: 2px;
}

/* 系統提示條 */
.village-alert {
  width: calc(100% - 16px);
  overflow: hidden;
  border-radius: 10px;
}

.village-alert tr {
  background: linear-gradient(180deg, #16a34a, #15803d) !important;
}

.village-alert td {
  padding: 4px 8px !important;

  color: #ffffff !important;
  font-weight: 800;
  font-size: 13px;

  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 1px 4px rgba(0,0,0,0.12);
}

.village-alert small {
  font-size: 11px;
  opacity: 0.92;
}

/* 右側功能 / objection 區 */
.village-action {
  width: calc(100% - 16px);
  padding: 2px 6px;

  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,0,0,0.06);
}

.village-action td {
  padding: 1px 3px;
  vertical-align: middle;
}

.village-action form {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.village-action input[type="image"] {
  vertical-align: middle;
  max-height: 24px;
}

.village-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 20px;
  padding: 1px 7px;

  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.16);

  background: rgba(255,255,255,0.72);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.village-action a:hover {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}
/* 對話最下方區塊共用 */
.footer-will-title,
.footer-will-content,
.footer-death-msg,
.footer-vote-table {
  box-sizing: border-box;
  margin: 4px 8px;
  width: calc(100% - 16px);
  border-collapse: separate;
  border-spacing: 0;
  font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

/* 遺書標題 */
.lastword-title {
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.lastword-title tr,
.lastword-title td {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.65), rgba(220,230,255,0.72)) !important;
  color: #1f2937 !important;
}

.lastword-title td {
  padding: 5px 10px !important;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(80,100,160,0.18);
  border-bottom: 0;
}

/* 遺書內容 */
.lastword-content {
  overflow: hidden;
  border-radius: 0 0 10px 10px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(80,100,160,0.16);
  border-top: 0;
}

.lastword-content td {
  padding: 4px 0px !important;
  
  color: #111827 !important;
  vertical-align: middle;
}

.lastword-content td:first-child {
  width: 140px;
  font-weight: 800;
  white-space: nowrap;
}

.lastword-content small {
  font-size: 11px;
  color: #64748b;
}

.lastword-content table {
  margin: 0;
  border-collapse: collapse;
}

.lastword-content font[color="red"] {
  color: #dc2626 !important;
  font-weight: 700;
}


.lastword-self {
  width: calc(100% - 16px);
  margin: 4px 8px;

  border-collapse: separate;
  border-spacing: 0;

  border-radius: 10px;
  overflow: hidden;

  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(80,100,160,0.16);

  font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

.lastword-self td {
  padding: 4px 8px !important;
  color: #111827;

  vertical-align: middle;
}

/* 左側標題 */
.lastword-self td:first-child {
  width: 140px;

  font-weight: 800;
  text-align: right;

  background: rgba(220,230,255,0.45);
  border-right: 1px solid rgba(80,100,160,0.18);
}

/* 右側內容 */
.lastword-self td:last-child {
  font-weight: 600;
}

/* 若內容很多時稍微舒服一點 */
.lastword-self td:last-child {
  line-height: 1.4;
}



/* 死亡訊息 */
.footer-death-msg {
  overflow: hidden;
  border-radius: 10px;
}

.footer-death-msg tr {
  height: auto !important;
}

.footer-death-msg td {
  padding: 6px 12px !important;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;

  background: rgba(255,255,255,0.65) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    0 1px 5px rgba(0,0,0,0.10);
}

.footer-death-msg img {
  vertical-align: middle;
  margin-right: 4px;
}

/* 被表決處死 */
.footer-death-vote td {
  color: #854d0e !important;
  border: 1px solid rgba(202,138,4,0.28);
  background:
    linear-gradient(180deg, rgba(255,251,235,0.88), rgba(254,243,199,0.72)) !important;
}

/* 悽慘死狀 */
.footer-death-found td {
  color: #991b1b !important;
  border: 1px solid rgba(220,38,38,0.28);
  background:
    linear-gradient(180deg, rgba(254,242,242,0.9), rgba(254,226,226,0.72)) !important;
}

/* 奇蹟生還(貓又) */
.footer-death-special1 td {
  color: #000099 !important;

  border: 1px solid rgba(0,0,153,0.25);

  background:
    linear-gradient(
      180deg,
      rgba(230,235,255,0.92),
      rgba(210,220,255,0.75)
    ) !important;
}
/* GM復活 爽爽笑聲 */
.footer-death-special2 td {
  color: #0000d0 !important;

  border: 1px solid rgba(0,0,208,0.28);

  background:
    linear-gradient(
      180deg,
      rgba(235,240,255,0.95),
      rgba(210,225,255,0.78)
    ) !important;
}

/* 天國觀戰 */
.footer-death-heaven td {
  color: #000000 !important;

  border: 1px solid rgba(0,0,0,0.18);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.92),
      rgba(240,240,240,0.75)
    ) !important;
}

/* GM殺人 */
.footer-death-gm td {
  color: #d00000 !important;

  border: 1px solid rgba(208,0,0,0.35);

  background:
    linear-gradient(
      180deg,
      rgba(255,235,235,0.95),
      rgba(255,210,210,0.78)
    ) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.65),
    0 1px 6px rgba(208,0,0,0.18);
}

/* 投票結果表 */
.footer-vote-table {
  width: auto;
  min-width: 220px;
  max-width: calc(100% - 16px);

  /* margin: 6px auto 10px; */

  border-collapse: separate;
  border-spacing: 0;

  border-radius: 12px;
  overflow: hidden;

  /* 關鍵：完全透明 */
  background: transparent;
  border: 1px solid rgba(0,0,0,0.18);
}

/* cell */
.footer-vote-table td {
  padding: 3px 10px;

  border: 0;
  border-bottom: 1px solid rgba(0,0,0,0.12);

  /* 不設定顏色 → 吃全局 */
  font-size: 13px;
  line-height: 1.3;
}

/* 標題列 */
.footer-vote-table tr:first-child td {
  font-weight: 900;

  border-bottom: 1px solid rgba(0,0,0,0.2);

  /* 只加一點點背景層次（不影響主色） */
  background: rgba(255,255,255,0.15);
}

/* 最後一列去底線 */
.footer-vote-table tr:last-child td {
  border-bottom: 0;
}

/* hover */
.footer-vote-table tr:not(:first-child):hover td {
  background: rgba(255,255,255,0.08);
}

.result-banner {
  width: calc(100% - 16px);
  margin: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
  font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

.result-banner td {
  padding: 10px 14px !important;
  border-radius: 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.35;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 6px 18px rgba(0,0,0,0.18);
}

.result-banner img {
  vertical-align: middle;
  margin-right: 4px;
}

.result-wolf td {
  color: #fff !important;
  background: linear-gradient(135deg, #7f0000, #cc0000, #3b0000) !important;
}

.result-human td {
  color: #111827 !important;
  background: linear-gradient(135deg, #ffffff, #e0f2fe, #f8fafc) !important;
  border: 1px solid rgba(0,0,0,0.12);
}


.result-fox td {
  color: #fff !important;
  background: linear-gradient(135deg, #5a1f5a, #993399, #c084fc) !important;
}


.result-lover td {
  color: #fff !important;
  background: linear-gradient(135deg, #d81b60, #ff80ff, #ffc0cb) !important;
}

.result-draw td {
  color: #fff !important;
  background: linear-gradient(135deg, #111827, #000000, #374151) !important;
}

.result-custo td {
  color: #fff !important;
  background: linear-gradient(135deg, #14532d, #2d7a56, #064e3b) !important;
}

.result-night td {
  color: #fff !important;
  background: linear-gradient(135deg, #000030, #111827, #020617) !important;
}

/* 尚未進場：登入 / 住民登錄區 */
.lobby-auth-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  margin:4px 0 2px;
  padding:8px 10px;

  border-radius:14px;
  border:1px solid rgba(255,255,255,.45);

  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.12));

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 4px 14px rgba(0,0,0,.10);

  backdrop-filter:blur(12px) saturate(150%);
  -webkit-backdrop-filter:blur(12px) saturate(150%);
}

.lobby-login-form{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin:0;
}

.lobby-login-form label{
  display:inline-flex;
  align-items:center;
  gap:5px;

  font-size:12px;
  font-weight:800;
  
}

.lobby-login-form input[type="text"],
.lobby-login-form input[type="password"]{
  width:150px;
  height:26px;
  box-sizing:border-box;

  padding:3px 8px;

  border-radius:999px;
  border:1px solid rgba(0,0,0,.18);

  background:rgba(255,255,255,.82);
  color:#111827;

  font-size:13px;
  font-weight:700;

  outline:none;

  box-shadow:
    inset 0 1px 2px rgba(0,0,0,.08),
    0 1px 0 rgba(255,255,255,.8);
}

.lobby-login-form input:focus{
  border-color:rgba(37,99,235,.65);
  box-shadow:
    0 0 0 3px rgba(37,99,235,.16),
    inset 0 1px 2px rgba(0,0,0,.08);
}

.lobby-login-btn,
.lobby-register-btn{
  appearance:none;
  -webkit-appearance:none;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-height:27px;
  padding:4px 13px;

  border-radius:999px;
  border:1px solid rgba(0,0,0,.16);

  font-size:13px;
  font-weight:900;
  line-height:1;
  text-decoration:none;

  cursor:pointer;
  white-space:nowrap;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 2px 6px rgba(0,0,0,.14);
}

.lobby-login-btn{
  color:#ffffff;
  background:linear-gradient(180deg, #3b82f6, #2563eb);
}

.lobby-login-btn:hover{
  background:linear-gradient(180deg, #60a5fa, #2563eb);
}

.lobby-register-btn{
  color:#ffffff !important;
  background:linear-gradient(180deg, #f97316, #ea580c);
}

.lobby-register-btn:hover{
  color:#ffffff !important;
  text-decoration:none;
  background:linear-gradient(180deg, #fb923c, #ea580c);
}

.lobby-login-btn:active,
.lobby-register-btn:active{
  transform:translateY(1px);
}

/* =========================
   對話輸出
========================= */

/* ===== 基本 ===== */

.lite-chatbox{
	font-family:"Segoe UI","PingFang TC","Microsoft JhengHei",sans-serif;
	font-size:16px;
	line-height:1.35;
	
	}

/* 每筆訊息 */
.lite-chatbox .cmsg{
	position:relative;
	margin:4px 3px;
	min-height:36px;
}

/* 左右區 */
.lite-chatbox .cleft,
.lite-chatbox .cleftm,
.lite-chatbox .cleftgm{
	margin-right:54px;
}

.lite-chatbox .cright{
	margin-left:54px;
	text-align:right;
}

/* ===== 頭像區（固定空間 + 置中）===== */

.lite-chatbox .avatarBox{
	position:absolute;
	top:0;
	left:0;
	width:50px;
	height:50px;
	display:flex;
	align-items:center;
	justify-content:center;
	pointer-events:none;
}

.lite-chatbox .cright .avatarBox{
	left:auto;
	right:0;
}

/* 頭像本體（由 HTML 控制尺寸） */
.lite-chatbox .headIcon{
	max-width:45px;
	max-height:45px;

	width:auto;
	height:auto;

	object-fit:contain;

	border:2px solid; /* 保留 DB 顏色 */
	box-shadow:
		0 2px 6px rgba(0,0,0,.16),
		0 0 0 1px rgba(0,0,0,.08);
}

.lite-chatbox .radius{
	border-radius:10px;
}

/* ===== 氣泡 ===== */

.lite-chatbox .content{
	display:inline-block;
	padding:4px 9px 5px 9px;
	border-radius:18px;
	max-width:100%;
	line-height:1.35;
	-webkit-text-size-adjust:100%;
	text-size-adjust:100%;
	word-break:break-word;
	white-space:normal;
	vertical-align:top;
	user-select:text;
	box-shadow:
        inset 0 1px 0 rgba(255,255,255,.55),
        0 6px 16px rgba(15,23,42,.12);
}

/* ===== 名字 ===== */

.lite-chatbox .content .name{
	display:block;
	font-size:14px;
	font-weight:700;
	-webkit-text-size-adjust:100%;
	text-size-adjust:100%;
	margin-bottom:2px;
	opacity:.85;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
}

.lite-chatbox .name .htitle{
	display:inline-block;
	padding:1px 6px;
	margin-right:5px;
	border-radius:999px;
	font-size:10px;
}

/* ===== 對話內容 ===== */

.lite-chatbox .msgtext{
	display:inline;
	white-space:pre-wrap;
}

/* 圖片 inline */
.lite-chatbox .content img{
	display:inline-block;
	vertical-align:absmiddle;
	max-width:100%;
	box-shadow:0 1px 1px rgba(0,0,0,.16);
}

/* ===== 一般玩家 ===== */

.lite-chatbox .cleft .content{
	margin-left:60px;
	color:#1f2937;
	border:1px solid rgba(0,0,0,.08);
	box-shadow:0 5px 12px rgba(0,0,0,.10);
	background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.84));
    border-color:rgba(255,255,255,.58);
}

.lite-chatbox .cleft .name{
	color:#5b6470;
}

/* ===== 自己 ===== */

.lite-chatbox .cleftm .content{
	margin-left:60px;
	background:linear-gradient(135deg,#3470f5,#29a8b4);
	color:#fff;
	box-shadow:0 7px 16px rgba(32,84,170,.20);
}

.lite-chatbox .cleftm .name{
	color:rgba(255,255,255,.9);
}

/* ===== GM ===== */

.lite-chatbox .cleftgm .content{
	margin-left:60px;
	background:linear-gradient(135deg, #ff2d55, #ff9500);
	color:#fff;
	box-shadow:0 7px 16px rgba(140,60,60,.20);
}

.lite-chatbox .cleftgm .name{
	color:rgba(255,255,255,.9);
}

.lite-chatbox .cleftgm2 .content{
	margin-left:60px;
	background:linear-gradient(135deg, #34c759, #00a66a);
	color:#fff;
	box-shadow:0 7px 16px rgba(140,60,60,.20);
}

.lite-chatbox .cleftgm2 .name{
	color:rgba(255,255,255,.9);
}

/* ===== 右側 ===== */

.lite-chatbox .cright .content{
	margin-right:60px;
	margin-left:auto;
	background:linear-gradient(135deg,#3470f5,#29a8b4);
	color:#fff;
}

.lite-chatbox .cright .name{
	color:rgba(255,255,255,.9);
}

/* ===== 系統訊息 ===== */

.lite-chatbox .tips{
	margin:5px 0 0 60px;
	font-size:12px;
}

.lite-chatbox .tips span{
	display:inline-block;
	padding:4px 10px;
	background-color:#ccc;
	color:#fff;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:20px;
	box-shadow:
	        inset 0 1px 0 rgba(255,255,255,.34),
	        0 2px 8px rgba(15,23,42,.12);
}

.lite-chatbox .tips .tips-primary{
	background-color:#3986c8
}

.lite-chatbox .tips .tips-success{
	background-color:#49b649
}

.lite-chatbox .tips .tips-info{
	background-color:#5bb6d1
}

.lite-chatbox .tips .tips-warning{
	background-color:#eea948
}

.lite-chatbox .tips .tips-danger{
	background-color:#e24d48
}


/* ===== 手機 ===== */

@media (max-width:640px){

	.lite-chatbox .avatarBox{
		width:42px;
		height:42px;
	}

	.lite-chatbox .headIcon{
		max-width:38px;
		max-height:38px;
	}

	.lite-chatbox .cleft .content,
	.lite-chatbox .cleftm .content,
	.lite-chatbox .cleftgm .content{
		margin-left:50px;
		max-width:100%;
	}

	.lite-chatbox .cright .content{
		margin-right:50px;
	}
}


/* 外框（跟你整體UI一致） */
.role-box {
  width: auto;
  margin: 1px 8px 2px;

  border-collapse: separate;
  border-spacing: 0;

  border-radius: 10px;
  overflow: hidden;

  background: rgba(255,250,240,1);
  border: 1px solid rgba(0,0,0,0.10);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.65),
    0 2px 8px rgba(0,0,0,0.10);
  border-color:rgba(255,255,255,.48);
   box-shadow:
        inset 0 1px 0 rgba(255,255,255,.72),
        0 5px 18px rgba(15,23,42,.10);   
}

.role-box td {
  padding: 0px 0px !important;
}

/* 職業圖片（整行） */
.role-img-wrap {
  display: block;
  text-align: center;

  margin-bottom: 4px;
}

.role-img-wrap img {
  display: block;
  max-width: 100%;
  height: auto;

  border-radius: 10px;
}

/* 職業結果 */
.role-result-wrap {
  display: flex;
  justify-content: left;
  margin-left: 8px;
}

/* 只輕微美化內部 table（不破壞原本） */
.role-result-wrap table {
  border-collapse: separate;
  border-spacing: 0;

  border-radius: 8px;
  overflow: hidden;


  background: transparent;

  /* 外框：深色 + 內亮邊 */
  border: 1px solid rgba(0,0,0,0.55);

  border-color:rgba(15,23,42,.38);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.36),
        0 2px 8px rgba(15,23,42,.10);
}

/* td 微調 */
.role-result-wrap td {
  padding: 1px 3px !important;
  border: 0 !important;
  vertical-align: middle;
}

/* 分隔線（雙色） */
.role-result-wrap td + td {
  border-left: 1px solid rgba(0,0,0,0.45);
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.25);
}


/* ==============================
   Action Hint 操作提示條
   ============================== */

.action-hint {
  position: relative;
  overflow: hidden;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 18px;
  padding: 1px 38px;
  margin: 4px 8px 6px;

  border-radius: 10px;

  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.04em;

  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 3px 10px rgba(0,0,0,0.18);

  animation: actionHintPulse 2.4s ease-in-out infinite;
}

/* 掃光效果 */
.action-hint::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.35),
    transparent
  );

  transform: skewX(-20deg);
  animation: actionHintShine 2.8s ease-in-out infinite;
  pointer-events: none;
}

/* 讓文字在掃光上方 */
.action-hint > * {
  position: relative;
  z-index: 1;
}

/* 如果 span 內只有純文字，也保持正常 */
.action-hint {
  z-index: 0;
}

/* 呼吸光 */
@keyframes actionHintPulse {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.35),
      0 3px 10px rgba(0,0,0,0.18);
  }

  50% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.55),
      0 0 14px rgba(255,255,255,0.35),
      0 3px 10px rgba(0,0,0,0.18);
  }
}

/* 掃光動畫 */
@keyframes actionHintShine {
  0% {
    left: -60%;
  }

  45%, 100% {
    left: 120%;
  }
}

/* ==============================
   職業色系
   ============================== */

/* Mage / 占卜：#990099 */
.action-hint-mage {
  background: linear-gradient(180deg, #b026b0, #990099);
  border: 1px solid rgba(153,0,153,0.55);
}

/* Wolf / 人狼：#CC0000 */
.action-hint-wolf {
  background: linear-gradient(180deg, #ff3333, #cc0000);
  border: 1px solid rgba(204,0,0,0.6);
}

/* The World：#000000 */
.action-hint-theworld {
  background: linear-gradient(180deg, #333333, #000000);
  border: 1px solid rgba(0,0,0,0.7);
}

/* Guard / 獵人：#0099FF */
.action-hint-guard {
  background: linear-gradient(180deg, #33bbff, #0099ff);
  border: 1px solid rgba(0,153,255,0.6);
}

/* Mytho：謊模#FF8000 */
.action-hint-mytho {
  background: linear-gradient(180deg, #ff9f33, #ff8000);
  border: 1px solid rgba(255,128,0,0.6);
}

/* Owlman：夜梟#000080 */
.action-hint-owlman {
  background: linear-gradient(180deg, #1a1aa6, #000080);
  border: 1px solid rgba(0,0,128,0.65);
}

/* Wfwnd：幼狼#28e7ff */
.action-hint-wfwnd {
  color: #00303a;
  text-shadow: 0 1px 1px rgba(255,255,255,0.45);

  background: linear-gradient(180deg, #6ff0ff, #28e7ff);
  border: 1px solid rgba(40,231,255,0.7);
}

/* Action / 行動：#FF0000 */
.action-hint-action {
  background: linear-gradient(180deg, #ff4a4a, #ff0000);
  border: 1px solid rgba(255,0,0,0.6);
}

/* Vote / 投票：#CC3300 */
.action-hint-vote {
  color: #fffafa;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  background: linear-gradient(180deg, #ff6633, #cc3300);
  border: 1px solid rgba(204,51,0,0.6);
}

/* Spy：間諜#0f0f0f */
.action-hint-spy {
  background: linear-gradient(180deg, #2a2a2a, #0f0f0f);
  border: 1px solid rgba(15,15,15,0.8);
}