/* استایل‌های اختصاصی بازی بلوف دادگاهی (Bluff: The Courtroom) */

/* ─── ۱. مرکز میز: پات و بنر ادعا ─── */
.bluff-center-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 50;
  pointer-events: none;
  transform: translateY(-46px);
}

@media (max-width: 560px) {
  .bluff-center-wrap {
    transform: translateY(-68px);
    gap: 8px;
  }
}

/* بنر آخرین ادعای روی میز */
.bluff-claim-badge {
  background: rgba(12, 16, 26, 0.88);
  border: 1px solid rgba(244, 197, 66, 0.35);
  border-radius: 12px;
  padding: 8px 18px;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(244, 197, 66, 0.15);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.bluff-claim-badge.active {
  border-color: #f4c542;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(244, 197, 66, 0.3);
  animation: claimPulse 2.4s infinite ease-in-out;
}

@keyframes claimPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.bluff-claim-title {
  font-size: 11px;
  color: #8fa0b5;
  margin-bottom: 2px;
}

.bluff-claim-value {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.bluff-claim-count {
  color: #f4c542;
  font-size: 18px;
}

.bluff-claim-rank {
  color: #64ffda;
  font-size: 18px;
}

.bluff-claim-author {
  font-size: 11px;
  color: #ffb74d;
  margin-top: 2px;
}

.bluff-claim-idle {
  font-size: 13px;
  color: #7b8a99;
}

/* پات کارت‌های خوابیده روی زمین */
.bluff-pot-wrap {
  position: relative;
  width: 96px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bluff-pot-cards {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bluff-pile-card {
  position: absolute;
  width: 72px;
  height: 104px;
  border-radius: 8px;
  background: #14213d url('/card-back.webp') center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* هاله پات آتشین */
.bluff-pot-heat {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 77, 0.35) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.bluff-pot-wrap.inferno .bluff-pot-heat {
  opacity: 1;
  animation: heatGlow 1.8s infinite alternate ease-in-out;
}

@keyframes heatGlow {
  0% { transform: scale(0.9); opacity: 0.3; }
  100% { transform: scale(1.2); opacity: 0.7; }
}

.bluff-pot-count-badge {
  position: absolute;
  bottom: -22px;
  background: rgba(10, 14, 23, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 11px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.bluff-pot-wrap.inferno .bluff-pot-count-badge {
  border-color: #ff5252;
  color: #ff8a80;
}

@media (max-width: 560px) {
  .bluff-pot-wrap {
    width: 82px;
    height: 110px;
  }
  .bluff-pile-card {
    width: 62px;
    height: 90px;
  }
  .bluff-claim-badge {
    padding: 6px 14px;
    border-radius: 10px;
  }
  .bluff-claim-title {
    font-size: 10px;
  }
  .bluff-claim-value {
    font-size: 14px;
  }
  .bluff-claim-count, .bluff-claim-rank {
    font-size: 15px;
  }
}

/* ─── ۲. نوار وضعیت ۴ نفره اختصاصی ─── */
.bluff-radar-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.bluff-player-pill {
  background: rgba(16, 22, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: all 0.25s ease;
}

.bluff-player-pill.is-turn {
  border-color: #64ffda;
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.25);
}

.bluff-player-pill.is-you {
  border-color: rgba(244, 197, 66, 0.4);
}

.bluff-player-pill.critical {
  border-color: #ff5252;
  animation: dangerPulse 1.2s infinite ease-in-out;
}

@keyframes dangerPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 82, 82, 0.3); }
  50% { box-shadow: 0 0 16px rgba(255, 82, 82, 0.7); }
}

.pill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.pill-name {
  color: #e0e6ed;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-cards-badge {
  color: #64ffda;
  font-weight: 700;
  font-size: 11px;
}

.pill-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.pill-progress-fill {
  height: 100%;
  /* منطقی نه فیزیکی: در RTL نوار از راست پر می‌شود، پس گرادیان هم باید برگردد */
  background: linear-gradient(to left, #64ffda, #f4c542);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.pill-danger-tag {
  font-size: 9px;
  color: #ff5252;
  text-align: center;
  font-weight: 800;
}

.pill-danger-tag[hidden] {
  display: none;
}

/* ۴ ستون در ۳۲۰px یعنی ~۴۸px فضای محتوا؛ نام به یک «…» تبدیل می‌شد. */
@media (max-width: 560px) {
  .bluff-radar-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  .bluff-player-pill {
    padding: 4px 7px;
    gap: 3px;
  }
  .pill-header {
    font-size: 10px;
  }
  .pill-cards-badge {
    font-size: 10px;
    white-space: nowrap;
  }
}

/* ─── ۳. کنترل‌های نوبت: چیپ‌های رنک و دکمه‌ها (همیشه کاملاً بالای بادبزن کارت‌ها) ─── */
.bluff-controls-host {
  position: absolute;
  bottom: 230px;   /* افزایش از ۱۷۵ به ۲۳۰: board-inner از بالا scale می‌شود → hand-strip پایین‌تر می‌رود */
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  max-width: 520px;
  z-index: 350 !important;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  user-select: none;
}

@media (max-width: 560px) {
  .bluff-controls-host {
    bottom: 300px;   /* افزایش از ۲۱۵ به ۳۰۰: موبایل بدون scale، کارت‌ها تا ~۲۶۰ از پایین */
    width: calc(100% - 16px);
    max-width: 100%;
    gap: 6px;
    z-index: 350 !important;
  }
}


.bluff-controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}

.bluff-chip-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 5px 8px;
  scrollbar-width: none;
  max-width: 100%;
  background: rgba(10, 16, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.bluff-chip-strip::-webkit-scrollbar {
  display: none;
}

@media (max-width: 560px) {
  .bluff-chip-strip {
    justify-content: flex-start;
    padding: 4px 6px;
    gap: 4px;
    border-radius: 10px;
  }
}

.bluff-rank-chip {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08);
  color: #cdd9e5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 9px;
  min-width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

.bluff-rank-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.bluff-rank-chip.active {
  background: linear-gradient(135deg, #f4c542, #d49818);
  color: #0b111e;
  border-color: #f4c542;
  box-shadow: 0 0 14px rgba(244, 197, 66, 0.65);
  transform: translateY(-2px) scale(1.06);
}

@media (max-width: 560px) {
  .bluff-rank-chip {
    padding: 4px 7px;
    min-width: 24px;
    font-size: 12px;
  }
}

.bluff-action-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.btn-bluff-challenge {
  background: linear-gradient(135deg, #e53935, #b71c1c);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 9px 18px;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(229, 57, 53, 0.45);
  animation: challengeBeat 1.8s infinite ease-in-out;
  white-space: nowrap;
}

@keyframes challengeBeat {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(229, 57, 53, 0.4); }
  50% { transform: scale(1.03); box-shadow: 0 4px 22px rgba(229, 57, 53, 0.7); }
}

.btn-bluff-play {
  background: linear-gradient(135deg, #0288d1, #01579b);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 9px 20px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(1, 87, 155, 0.4);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex: 1;
  max-width: 320px;
}

.btn-bluff-play.enabled {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border-color: rgba(46, 204, 113, 0.6);
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.45), 0 0 12px rgba(46, 204, 113, 0.35);
  animation: playPulse 2s infinite ease-in-out;
}

@keyframes playPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.btn-bluff-play.disabled {
  opacity: 0.6;
  cursor: pointer;
  filter: grayscale(0.4);
}

@media (max-width: 560px) {
  .btn-bluff-play {
    padding: 8px 12px;
    font-size: 13px;
  }
  .btn-bluff-challenge {
    padding: 8px 12px;
    font-size: 12.5px;
  }
}

/* دکمه قبول ادعا (تأیید برد) و بنر خالی شدن دست حریف */
.btn-bluff-confirm-winner {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 9px 18px;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
  animation: confirmPulse 2s infinite ease-in-out;
  white-space: nowrap;
  flex: 1;
  max-width: 240px;
}

@keyframes confirmPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 4px 22px rgba(16, 185, 129, 0.7); }
}

.bluff-empty-hand-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  padding: 8px 14px;
  text-align: center;
  font-size: 13px;
  color: #fca5a5;
  width: 100%;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
}

.bluff-empty-hand-desc {
  font-size: 11.5px;
  color: #e2e8f0;
  margin-top: 3px;
}

.bluff-empty-hand-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

@media (max-width: 560px) {
  .btn-bluff-confirm-winner {
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .bluff-empty-hand-banner {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* چیپ‌های دوگانه انتخاب رنک (همان رنک یا رنک بعدی) */
.bluff-step-ranks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.bluff-step-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 18px;
  min-width: 95px;
  border-radius: 10px;
}

.bluff-step-chip .chip-title {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}

.bluff-step-chip.active .chip-title {
  color: #0b111e;
  font-weight: 700;
}

.bluff-step-chip .chip-value {
  font-size: 14px;
  font-weight: 800;
}


/* ─── ۴. مدال سینماتیک بازجویی (Showdown Modal) ─── */
.bluff-interrogation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bluff-interrogation-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.bluff-modal-card {
  background: linear-gradient(180deg, #162035, #0d1424);
  border: 1px solid rgba(244, 197, 66, 0.35);
  border-radius: 20px;
  width: 92%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(244, 197, 66, 0.15);
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}

.bluff-modal-header h3 {
  font-size: 20px;
  color: #f4c542;
  margin: 4px 0;
}

.bluff-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

.bluff-duel-stage {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.duel-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.duel-avatar-ring {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.duel-box.accused .duel-avatar-ring {
  border-color: #ff5252;
  color: #ff8a80;
}

.duel-box.challenger .duel-avatar-ring {
  border-color: #64ffda;
  color: #a7ffeb;
}

.duel-vs {
  font-weight: 900;
  font-size: 16px;
  color: #f4c542;
}

.phase-status {
  font-size: 13px;
  color: #e2e8f0;
  margin-bottom: 14px;
}

.bluff-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-confess, .btn-stand-ground, .btn-reveal, .btn-withdraw {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-confess small, .btn-stand-ground small, .btn-reveal small, .btn-withdraw small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
}

.btn-confess {
  background: linear-gradient(135deg, #4b5563, #374151);
  color: #f3f4f6;
}

.btn-stand-ground {
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #fff;
  box-shadow: 0 4px 18px rgba(229, 57, 53, 0.4);
}

.btn-reveal {
  background: linear-gradient(135deg, #e65100, #bf360c);
  color: #fff;
  box-shadow: 0 4px 18px rgba(230, 81, 0, 0.4);
}

.btn-withdraw {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
}

.btn-confess:hover, .btn-stand-ground:hover, .btn-reveal:hover, .btn-withdraw:hover {
  transform: translateY(-2px);
}

.bluff-waiting-note {
  font-size: 13px;
  color: #94a3b8;
  font-style: italic;
  padding: 10px 0;
}

/* راهنمای رنک قفل‌شده */
.bluff-rank-locked-hint {
  font-size: 12.5px;
  color: #cdd9e5;
  background: rgba(10, 16, 28, 0.85);
  border: 1px solid rgba(100, 255, 218, 0.35);
  border-radius: 8px;
  padding: 5px 14px;
  margin-bottom: 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ─── ۵. صحنه نمایش کارت‌های رو شده (Showdown Reveal Stage) ─── */
.bluff-reveal-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: rgba(12, 17, 29, 0.95);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75);
  animation: revealZoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  border: 2px solid #64ffda;
  z-index: 60;
}

.bluff-reveal-stage.honest {
  border-color: #2ecc71;
  box-shadow: 0 0 24px rgba(46, 204, 113, 0.35);
}

.bluff-reveal-stage.bluff {
  border-color: #ff5252;
  box-shadow: 0 0 24px rgba(255, 82, 82, 0.45);
}

@keyframes revealZoom {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.bluff-reveal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bluff-reveal-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.bluff-reveal-stage.honest .bluff-reveal-title {
  color: #2ecc71;
}

.bluff-reveal-stage.bluff .bluff-reveal-title {
  color: #ff5252;
}

.bluff-reveal-sub {
  font-size: 12px;
  color: #f4c542;
}

.bluff-reveal-cards-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.bluff-revealed-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bluff-card-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.bluff-card-badge.badge-truth {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid #2ecc71;
}

.bluff-card-badge.badge-lie {
  background: rgba(255, 82, 82, 0.2);
  color: #ff5252;
  border: 1px solid #ff5252;
}

/* ─── ۶. تایمر و نوار پیشرفت مودال بازجویی ─── */
.bluff-modal-timer-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.bluff-modal-timer-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.bluff-modal-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #64ffda, #00b4d8);
  border-radius: 999px;
  transition: width 0.1s linear, background 0.3s ease;
}

.bluff-modal-timer-fill.urgent {
  background: linear-gradient(90deg, #ff5252, #e53935);
  box-shadow: 0 0 10px rgba(255, 82, 82, 0.8);
}

.bluff-modal-timer-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  color: #94a3b8;
}

.timer-countdown-val {
  font-size: 14px;
  font-weight: 800;
  color: #64ffda;
}

.timer-countdown-val.urgent {
  color: #ff5252;
  animation: timerPulse 0.6s infinite alternate;
}

@keyframes timerPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.2); }
}
