/* 德州视觉增强：只加覆盖层和外发光。
 * 不改牌的大小 / 牌面图片 / 牌的排版，不改座位和公共牌的布局（这是上线前的硬要求）。 */

/* —— 覆盖层：牌桌里最底下的一层，座位和公共牌永远盖在它上面 —— */
.poker-page .pv-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
/* 毡面质感：中心聚光 + 边缘暗角 + 下注线 + 水印（都在座位和牌的下面） */
.poker-page .pv-layer::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120'%3E%3Ctext x='100' y='66' text-anchor='middle' font-size='66' fill='white' fill-opacity='.06' font-family='Georgia,serif'%3E%E2%99%A0%3C/text%3E%3Ctext x='100' y='104' text-anchor='middle' font-size='15' letter-spacing='7' fill='white' fill-opacity='.055' font-family='system-ui,sans-serif'%3EYGAMES%3C/text%3E%3C/svg%3E") 50% 74% / min(46%, 190px) auto no-repeat,
    radial-gradient(ellipse 58% 46% at 50% 40%, rgba(255,255,255,.085), transparent 72%),
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 56%, rgba(0,0,0,.34) 100%);
}
.poker-page .pv-layer::after {   /* 下注线 */
  content: ''; position: absolute; inset: 7% 6%; border: 1px solid rgba(255,255,255,.07); border-radius: 999px;
}

/* —— 覆盖层里的元素 —— */
.poker-page .pv-item { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: left .35s ease, top .35s ease; }
.poker-page .pv-in { animation: pv-pop .3s ease-out backwards; }
@keyframes pv-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* 筹码堆 */
/* 俯视圆形筹码：外圈白色缺口 + 内圈带环，同面额叠成一小摞（每枚错开 4px，下缘留一道厚度） */
.poker-page .pv-cols { display: flex; align-items: flex-end; gap: 5px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.poker-page .pv-col { display: flex; flex-direction: column-reverse; align-items: center; }
.poker-page .pv-col i { position: relative; display: block; width: 22px; height: 22px; margin-bottom: -18px; border-radius: 50%;
  background: repeating-conic-gradient(from 8deg, #fff 0 16deg, var(--c) 16deg 45deg);
  box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 2px 0 1px rgba(0,0,0,.6); }
.poker-page .pv-col i:first-child { margin-bottom: 0; }
.poker-page .pv-col i::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 1px rgba(255,255,255,.9), inset 0 -2px 3px rgba(0,0,0,.35), inset 0 2px 2px rgba(255,255,255,.3); }
.poker-page .pv-amt { padding: 2px 6px; border-radius: 9px; background: rgba(0,0,0,.5); box-shadow: inset 0 0 0 1px rgba(232,196,104,.35); font-size: 11px; line-height: 1; font-weight: 800; color: #f5deaa; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 固定下注区：金额统一在底部，换面额/叠高不改变每家的摆放位置。 */
.poker-page .pv-wager { min-width: 49px; min-height: 59px; justify-content: flex-end; transition: none; }
.poker-page .pv-wager .pv-cols { min-height: 42px; }
.poker-page .pv-pot .pv-col i { width: 24px; height: 24px; margin-bottom: -20px; }
.poker-page .pv-pot .pv-col i:first-child { margin-bottom: 0; }

/* 庄家 / 小盲 / 大盲沿用座位内的原标记，不散落在下注区。 */

/* —— 行动倒计时条（座位信息框底边）—— */
.poker-page.pv-on .seat[data-player-state="acting"] .seat-info { position: relative; }
.poker-page.pv-on .seat[data-player-state="acting"] .seat-info::after {
  content: ''; position: absolute; left: 9px; right: 9px; bottom: 3px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--pv-col, #e8c468) calc(var(--pv-pct, 0) * 1%), rgba(255,255,255,.14) 0);
  transition: background .2s linear;
}

.poker-page.pv-on #heroPanel.pv-acting { position: relative; }
.poker-page.pv-on #heroPanel.pv-acting::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -5px; height: 3px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--pv-col, #e8c468) calc(var(--pv-pct, 0) * 1%), rgba(255,255,255,.12) 0); }

/* —— 赢牌：外发光（不改大小）；没用到的公共牌调暗 —— */
.poker-page .card.pv-win { box-shadow: 0 0 0 2px #ffd24d, 0 0 14px 2px rgba(255,210,77,.7) !important; }
.poker-page #community .card.pv-dim { opacity: .72; }
.poker-page #community .card { transition: opacity .25s; }

/* —— 赢家横幅（盖在公共牌上方，几秒后淡出）—— */
.poker-page .pv-banner { position: absolute; transform: translate(-50%, -100%); z-index: 9; max-width: 92%; padding: 6px 16px 7px; text-align: center; border-radius: 14px; pointer-events: none;
  background: rgba(10,14,12,.88); border: 1px solid rgba(232,196,104,.55); box-shadow: 0 4px 16px rgba(0,0,0,.5); animation: pv-banner-in .35s ease-out; transition: opacity .4s; }
.poker-page .pv-banner b { display: block; font-size: 16px; line-height: 1.25; color: #e8c468; }
.poker-page .pv-banner small { display: block; margin-top: 1px; font-size: 12px; color: #cfdae5; }
.poker-page .pv-banner.you { border-color: rgba(148,223,186,.7); }
.poker-page .pv-banner.you b { color: #94dfba; }
.poker-page .pv-banner.out { opacity: 0; }
.poker-page .pv-banner em { display: block; font-style: normal; font-weight: 800; font-size: 13px; letter-spacing: .08em; color: #fff0b0; }
.poker-page .pv-banner.rare { border-color: #ffd24d; box-shadow: 0 0 0 1px #ffd24d88, 0 0 22px rgba(255,210,77,.45), 0 4px 16px rgba(0,0,0,.5); }
.poker-page .pv-banner.rare-royal { border-color: #b28cff; box-shadow: 0 0 0 1px #b28cff88, 0 0 26px rgba(178,140,255,.55), 0 4px 16px rgba(0,0,0,.5); }
@keyframes pv-banner-in { 0% { opacity: 0; transform: translate(-50%, calc(-100% + 10px)) scale(.92); } 100% { opacity: 1; transform: translate(-50%, -100%); } }

/* 稀有牌型的彩屑：在座位和牌的下面飘，不遮牌 */
.poker-page .pv-confetti { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.poker-page .pv-confetti i { position: absolute; top: -8px; width: 7px; height: 11px; border-radius: 1px; opacity: 0; animation: pv-fall var(--d) ease-in var(--w) forwards; }
@keyframes pv-fall { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), 420px) rotate(var(--dr)); } }

/* —— 头像边框：按这个人最高的成就等级 —— */
.poker-page .pk-seat-avatar[data-pv-tier="1"] { box-shadow: 0 0 0 2px #cd7f32; }
.poker-page .pk-seat-avatar[data-pv-tier="2"] { box-shadow: 0 0 0 2px #c0c8d0; }
.poker-page .pk-seat-avatar[data-pv-tier="3"] { box-shadow: 0 0 0 2px #e8c468; }
.poker-page .pk-seat-avatar[data-pv-tier="4"] { box-shadow: 0 0 0 2px #7fe0e8, 0 0 7px #7fe0e8aa; }
.poker-page .pk-seat-avatar[data-pv-tier="5"] { box-shadow: 0 0 0 2px #b28cff, 0 0 9px #b28cffcc; }

/* —— 成就弹窗：按等级配色 —— */
.pv-ach-box { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 360px); pointer-events: none; }
.pv-ach { --tc: #e8c468; display: flex; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(18,22,28,.96); border: 1px solid color-mix(in srgb, var(--tc) 70%, transparent);
  box-shadow: 0 8px 24px rgba(0,0,0,.55); animation: pv-ach-in .4s cubic-bezier(.2,.9,.3,1); transition: opacity .4s, transform .4s; }
.pv-ach.rare { box-shadow: 0 0 0 1px var(--tc), 0 0 20px color-mix(in srgb, var(--tc) 55%, transparent), 0 8px 24px rgba(0,0,0,.55); }
.pv-ach.out { opacity: 0; transform: translateY(-10px); }
.pv-ach-ico { flex: none; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 26px; border-radius: 50%; border: 2px solid var(--tc); background: rgba(0,0,0,.35); }
.pv-ach small { display: block; font-size: 11px; font-weight: 700; color: var(--tc); letter-spacing: .04em; }
.pv-ach b { display: block; font-size: 16px; color: #fff; line-height: 1.3; }
.pv-ach .pv-ach-d { display: block; font-size: 12px; color: #aab9c6; line-height: 1.4; }
.pv-ach em { display: block; margin-top: 2px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--tc); }
@keyframes pv-ach-in { 0% { opacity: 0; transform: translateY(-22px) scale(.94); } 100% { opacity: 1; transform: none; } }

/* —— 外观：桌布颜色（只换颜色，木框、布局、牌都不动）—— */
.poker-page[data-pv-felt="blue"] .table { background: repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 3px, transparent 3px 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,.03) 0 3px, transparent 3px 6px), radial-gradient(ellipse 70% 75% at 50% 38%, #2f6fb5 0%, #1f4f8c 55%, #143761 100%); }
.poker-page[data-pv-felt="wine"] .table { background: repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 3px, transparent 3px 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,.03) 0 3px, transparent 3px 6px), radial-gradient(ellipse 70% 75% at 50% 38%, #a83a4b 0%, #7a2332 55%, #531722 100%); }
.poker-page[data-pv-felt="black"] .table { background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 3px, transparent 3px 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,.04) 0 3px, transparent 3px 6px), radial-gradient(ellipse 70% 75% at 50% 38%, #3a362d 0%, #26241f 55%, #151410 100%); border-color: #4a3a1c; }
.poker-page[data-pv-felt="violet"] .table { background: repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 3px, transparent 3px 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,.03) 0 3px, transparent 3px 6px), radial-gradient(ellipse 70% 75% at 50% 38%, #6a46a8 0%, #4a2f7a 55%, #2f1c52 100%); }
/* 牌背颜色：只对牌背（对手没亮的牌）生效，牌面一律不碰 */
.poker-page[data-pv-back="red"] .card.back { filter: hue-rotate(150deg) saturate(1.1); }
.poker-page[data-pv-back="green"] .card.back { filter: hue-rotate(-78deg) saturate(1.05); }
.poker-page[data-pv-back="gold"] .card.back { filter: hue-rotate(-170deg) saturate(1.35) brightness(1.1); }
.poker-page[data-pv-back="black"] .card.back { filter: grayscale(1) brightness(.5) contrast(1.15); }

/* 外观面板 */
.pv-cos-h { margin: 16px 0 8px; font-size: 14px; color: #cfdae5; }
.pv-cos-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.pv-cos-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 64px; padding: 9px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e8edf2; font: inherit; text-align: left; cursor: pointer; }
.pv-cos-chip i { display: block; width: 100%; height: 14px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.pv-cos-chip b { font-size: 13px; }
.pv-cos-chip small { font-size: 11px; color: #9ab; line-height: 1.3; min-height: 14px; }
.pv-cos-chip.on { border-color: #e8c468; background: rgba(232,196,104,.1); }
.pv-cos-chip.on small { color: #e8c468; }
.pv-cos-chip.locked { opacity: .55; cursor: not-allowed; }

/* —— 手机：筹码和标记小一号 —— */
@media (max-width: 720px), (max-height: 500px) and (max-width: 1100px) {
  .poker-page .pv-wager { min-width: 49px; min-height: 49px; }
  .poker-page .pv-wager .pv-cols { min-height: 33px; }
  .poker-page .pv-dense-wager { min-width: 26px; min-height: 44px; }
  .poker-page .pv-dense-wager .pv-cols { min-height: 28px; }
  .poker-page .pv-dense-wager .pv-col i { margin-bottom: -16px; }
  .poker-page .pv-dense-wager .pv-col i:first-child { margin-bottom: 0; }
  .poker-page .pv-col i { width: 18px; height: 18px; margin-bottom: -15px; }
  .poker-page .pv-col i::before { inset: 3px; }
  .poker-page .pv-pot .pv-col i { width: 19px; height: 19px; margin-bottom: -16px; }
  .poker-page .pv-col i:first-child, .poker-page .pv-pot .pv-col i:first-child { margin-bottom: 0; }
  .poker-page .pv-amt { font-size: 10px; padding: 2px 5px; }
  .poker-page .pv-banner b { font-size: 14px; }
  .poker-page .pv-banner small { font-size: 11px; }
}

/* —— 特效档位 / 系统减少动态：只保留静态效果，不播放任何动画 —— */
.poker-page[data-pk-fx-mode="lite"] .pv-in, .poker-page[data-pk-fx-mode="off"] .pv-in,
.poker-page[data-pk-fx-mode="lite"] .pv-banner, .poker-page[data-pk-fx-mode="off"] .pv-banner,
.poker-page[data-pk-fx-mode="lite"] .pv-ach, .poker-page[data-pk-fx-mode="off"] .pv-ach { animation: none; }
.poker-page[data-pk-fx-mode="lite"] .pv-item, .poker-page[data-pk-fx-mode="off"] .pv-item { transition: none; }
.poker-page[data-pk-fx-mode="lite"] .pv-confetti, .poker-page[data-pk-fx-mode="off"] .pv-confetti { display: none; }
@media (prefers-reduced-motion: reduce) {
  .poker-page .pv-in, .poker-page .pv-banner, .pv-ach { animation: none; }
  .poker-page .pv-item { transition: none; }
  .poker-page .pv-confetti { display: none; }
}
