/* ==========================================================================
   Couples Beer Card Game: New Couple Edition
   สไตล์การ์ตูนคอมิกส์สายฮา (Funny Webtoon Comic) & บาร์คราฟต์เบียร์
   ========================================================================== */

:root {
  --bg-main: #0f172a;
  --bg-pub: #1e293b;
  --beer-gold: #f59e0b;
  --beer-amber: #d97706;
  --beer-foam: #fef3c7;
  --accent-talk: #3b82f6;
  --accent-dare: #ef4444;
  --accent-flirt: #ec4899;
  --accent-drink: #f59e0b;
  --accent-game: #8b5cf6;
  --comic-black: #0f172a;
  --comic-border: 3px solid #0f172a;
  --comic-shadow: 4px 4px 0px #0f172a;
  --font-main: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* ภาพพื้นหลังฟองเบียร์ลอยดุ๊กดิ๊ก */
.beer-bubbles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-bubble {
  position: absolute;
  bottom: -50px;
  background: radial-gradient(circle at 30% 30%, rgba(254, 243, 199, 0.4), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(254, 243, 199, 0.3);
  border-radius: 50%;
  animation: floatUp 8s infinite linear;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { transform: translateY(-110vh) scale(1.2); opacity: 0; }
}

/* ส่วนคอนเทนเนอร์หลัก */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  padding: 16px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   1. หน้าจอ Setup ผู้เล่น (Setup Screen)
   ========================================================================== */
.setup-card {
  background: #ffffff;
  color: var(--comic-black);
  border-radius: 24px;
  border: var(--comic-border);
  box-shadow: var(--comic-shadow);
  padding: 24px;
  text-align: center;
  margin: auto 0;
}

.comic-banner {
  background: var(--beer-gold);
  border: var(--comic-border);
  border-radius: 12px;
  padding: 8px 16px;
  display: inline-block;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
}

.app-main-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.app-sub-title {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.comic-hero-illustration {
  margin: 12px 0 20px;
}

.hero-emoji {
  font-size: 64px;
  display: inline-block;
  animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.input-group {
  text-align: left;
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  border: var(--comic-border);
  border-radius: 12px;
  background: #f8fafc;
  outline: none;
  transition: all 0.2s;
}

.input-group input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
  border-color: var(--beer-amber);
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-pill {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ปุ่มหลัก */
.btn-action {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  border-radius: 16px;
  border: var(--comic-border);
  box-shadow: var(--comic-shadow);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-action:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #0f172a;
}

.btn-primary {
  background: var(--beer-gold);
  color: var(--comic-black);
}

.btn-success {
  background: #10b981;
  color: #ffffff;
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
}

.btn-minigame {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #ffffff;
}

/* ==========================================================================
   2. หน้าจอ Game Table (หน้าเล่นเกม)
   ========================================================================== */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stats-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-box {
  background: rgba(30, 41, 59, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.stat-box.active-stat {
  border-color: var(--beer-gold);
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.stat-name {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-sips {
  font-size: 18px;
  font-weight: 800;
  color: var(--beer-foam);
  margin-top: 2px;
}

.header-tools {
  display: flex;
  gap: 8px;
}

.btn-tool {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-tool:hover {
  background: rgba(51, 65, 85, 0.9);
}

/* แถบแจ้งตาผู้เล่น */
.turn-banner {
  background: rgba(254, 243, 199, 0.95);
  color: var(--comic-black);
  border: var(--comic-border);
  border-radius: 14px;
  box-shadow: var(--comic-shadow);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.turn-banner .active-player-name {
  color: #b45309;
  text-decoration: underline;
}

/* ==========================================================================
   3. 3D Card Stage & Card Animation
   ========================================================================== */
.card-stage {
  perspective: 1200px;
  width: 100%;
  max-width: 340px;
  height: 470px;
  margin: 0 auto 16px;
}

.card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.card-3d.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 24px;
  border: var(--comic-border);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), var(--comic-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ด้านหลังการ์ด (ตอนคว่ำหน้า) */
.card-back {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 4px solid var(--beer-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.card-back-pattern {
  width: 100%;
  height: 100%;
  border: 2px dashed rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
}

.card-back-icon {
  font-size: 72px;
  margin-bottom: 12px;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.card-back-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--beer-gold);
  margin-bottom: 4px;
}

.card-back-edition {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 24px;
}

.card-back-hint {
  background: var(--beer-gold);
  color: var(--comic-black);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid #0f172a;
}

/* ด้านหน้าการ์ด (ตอนหงายหน้า) */
.card-front {
  background: #ffffff;
  color: var(--comic-black);
  transform: rotateY(180deg);
}

.card-inner-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: #ffffff;
}

/* ธีมสีขอบบนของการ์ดแต่ละหมวด */
.cat-talk .card-top-bar .card-badge { background: #dbeafe; color: #1e40af; }
.cat-dare .card-top-bar .card-badge { background: #fee2e2; color: #991b1b; }
.cat-flirt .card-top-bar .card-badge { background: #fce7f3; color: #9d174d; }
.cat-drink .card-top-bar .card-badge { background: #fef3c7; color: #92400e; }
.cat-minigame .card-top-bar .card-badge { background: #ede9fe; color: #5b21b6; }

.card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-badge {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid #0f172a;
}

.card-id {
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
}

.card-body {
  text-align: center;
  margin: auto 0;
  padding: 10px 0;
}

.card-big-icon {
  font-size: 56px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--comic-black);
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-task {
  font-size: 15px;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 16px;
  padding: 0 4px;
}

.penalty-box {
  background: #fef2f2;
  border: 2px dashed #ef4444;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.penalty-label {
  font-size: 12px;
  font-weight: 800;
  color: #b91c1c;
}

.penalty-desc {
  font-size: 13px;
  font-weight: 700;
  color: #991b1b;
}

.penalty-tag {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-top: 8px;
}

.card-footer {
  margin-top: auto;
}

.action-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn-group .btn-action {
  padding: 10px 12px;
  font-size: 13px;
}

.pulse-btn {
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(139, 92, 246, 0.4); }
  50% { box-shadow: 0 0 16px rgba(236, 72, 153, 0.8); }
}

/* แถบด้านล่างบอกสถานะสำรับ */
.deck-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

/* ==========================================================================
   4. Modals & Mini-Games Screen
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-content {
  background: #ffffff;
  color: var(--comic-black);
  border: var(--comic-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--comic-shadow);
  border-radius: 24px;
  width: 100%;
  max-width: 400px;
  padding: 24px;
  text-align: center;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.minigame-header {
  margin-bottom: 16px;
}

.minigame-badge {
  background: #ede9fe;
  color: #6d28d9;
  border: 2px solid #0f172a;
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 8px;
}

.bomb-badge {
  background: #fee2e2;
  color: #b91c1c;
}

.gift-badge {
  background: #fef3c7;
  color: #b45309;
}

.minigame-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.minigame-subtitle {
  font-size: 14px;
  color: #64748b;
  line-height: 1.4;
}

.turn-indicator {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 14px;
  margin-top: 10px;
  display: inline-block;
}

.text-highlight {
  color: #b45309;
}

/* วงล้อชะตากรรม */
.wheel-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 10px auto 16px;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: #ef4444;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

#wheelCanvas {
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ฟองเบียร์ระเบิด Grid */
.bubbles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.bubble-item {
  background: #fef3c7;
  border: var(--comic-border);
  box-shadow: 3px 3px 0px #0f172a;
  border-radius: 16px;
  padding: 16px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.bubble-item:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #0f172a;
}

.bubble-item.popped {
  pointer-events: none;
}

.bubble-item.is-safe {
  background: #dcfce7;
  border-color: #10b981;
}

.bubble-item.is-bomb {
  background: #fee2e2;
  border-color: #ef4444;
  animation: shake 0.5s;
}

.bubble-inner {
  font-size: 28px;
}

.bubble-num {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

/* กล่องสุ่ม Grid */
.boxes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.mystery-box-item {
  background: #f8fafc;
  border: var(--comic-border);
  box-shadow: 3px 3px 0px #0f172a;
  border-radius: 16px;
  padding: 16px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.mystery-box-item:hover {
  transform: translateY(-4px);
}

.mystery-box-item.opened {
  background: #fef3c7;
  pointer-events: none;
}

.box-visual {
  font-size: 40px;
  margin-bottom: 6px;
}

.box-label {
  font-size: 13px;
  font-weight: 800;
}

/* ผลลัพธ์มินิเกม */
.minigame-result {
  margin: 14px 0;
}

.result-card {
  background: #f8fafc;
  border: var(--comic-border);
  border-radius: 16px;
  padding: 14px;
}

.result-card.bomb-exploded {
  background: #fee2e2;
  border-color: #ef4444;
}

.result-icon {
  font-size: 36px;
  margin-bottom: 6px;
}

.result-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.result-desc {
  font-size: 14px;
  color: #334155;
  line-height: 1.4;
}

.shake-effect {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

.animate-pop {
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* สรุปผลตอนจบเกม */
.summary-card {
  padding: 10px 0;
}

.summary-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.summary-winner {
  font-size: 15px;
  color: #334155;
  margin: 12px 0;
  line-height: 1.4;
}

.summary-stats {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

/* ==========================================================================
   5. Print Stylesheet (สำหรับพิมพ์ A4 การ์ด 50 ใบ)
   ========================================================================== */
#printContainer {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app-container, .modal-overlay, .beer-bubbles-bg {
    display: none !important;
  }

  #printContainer {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .print-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
  }

  .print-header h1 {
    font-size: 20px;
  }

  .print-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .print-card {
    border: 2px dashed #475569;
    border-radius: 12px;
    padding: 12px;
    page-break-inside: avoid;
    height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
  }

  .print-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
  }

  .print-card-title {
    font-size: 14px;
    font-weight: 800;
    margin: 6px 0;
  }

  .print-card-task {
    font-size: 12px;
    line-height: 1.3;
    color: #334155;
  }

  .print-penalty {
    font-size: 11px;
    border-top: 1px solid #cbd5e1;
    padding-top: 6px;
    margin-top: 6px;
  }
}

/* ==========================================================================
   6. PWA Install UI Styles
   ========================================================================== */
.setup-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.btn-install-pwa {
  background: #ec4899;
  color: #ffffff;
  border: 2px solid #0f172a;
  box-shadow: 2px 2px 0px #0f172a;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-install-pwa:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #0f172a;
}

.btn-install-tool {
  background: #ec4899 !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
  font-weight: 800 !important;
}

.pwa-badge-hint {
  margin-top: 14px;
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ios-install-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 16px 0;
}

.ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
}

.step-num {
  background: var(--beer-gold);
  color: var(--comic-black);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  border: 2px solid #0f172a;
  flex-shrink: 0;
}

.step-desc {
  font-size: 13px;
  color: #334155;
  line-height: 1.4;
}

.ios-share-icon {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 14px;
}


/* ==========================================================================
   7. สไตล์หน้ารวมเมนูหลัก (Main Menu Hub) & โหมดปาร์ตี้ (Party Mode)
   ========================================================================== */

/* การ์ดเลือกโหมดในเมนูหลัก */
.menu-mode-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.mode-select-card {
  background: #f8fafc;
  border: var(--comic-border);
  box-shadow: var(--comic-shadow);
  border-radius: 20px;
  padding: 18px;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.mode-select-card:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px #0f172a;
}

.mode-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.mode-badge {
  background: #ec4899;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1.5px solid #0f172a;
}

.mode-badge.party-badge {
  background: #8b5cf6;
}

.mode-count-badge {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 8px;
}

.mode-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.mode-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--comic-black);
  margin-bottom: 6px;
}

.mode-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
  margin-bottom: 14px;
}

.btn-accent {
  background: #8b5cf6 !important;
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   8. ตัวเลือกจำนวนผู้เล่นในปาร์ตี้ล็อบบี้ (Player Count Selector)
   -------------------------------------------------------------------------- */
.player-count-selector {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  margin: 16px 0;
  text-align: left;
}

.selector-label {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  display: block;
  margin-bottom: 8px;
}

.player-count-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-pcount {
  flex: 1;
  min-width: 42px;
  height: 38px;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-pcount.active {
  background: var(--beer-gold);
  color: var(--comic-black);
  border-color: #0f172a;
  box-shadow: 2px 2px 0px #0f172a;
  transform: translateY(-1px);
}

.lobby-chips-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 2px solid;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   9. รายการเกมปาร์ตี้ (Party Games Grid)
   -------------------------------------------------------------------------- */
.party-games-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.party-game-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  border: var(--comic-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--comic-shadow);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.party-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px #0f172a;
}

.pgame-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pgame-icon {
  font-size: 34px;
  line-height: 1;
  flex-shrink: 0;
}

.pgame-info {
  flex: 1;
}

.pgame-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  line-height: 1.3;
}

.pgame-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}

.btn-play-party {
  width: 100%;
  font-size: 14px !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   10. สไตล์เวทีเกมปาร์ตี้ (Party Arena & Games)
   -------------------------------------------------------------------------- */
.party-arena-container {
  width: 100%;
  margin-top: 10px;
}

/* ครอบกล่องขาวสไตล์คอมิกส์สำหรับทุกมินิเกมในโหมดปาร์ตี้ */
.party-arena-container .minigame-wrapper {
  background: #ffffff;
  color: var(--comic-black);
  border: var(--comic-border);
  box-shadow: var(--comic-shadow);
  border-radius: 24px;
  padding: 20px 16px;
  text-align: center;
  margin: 0 auto;
  max-width: 460px;
  transition: all 0.25s ease;
}

/* ลานแตะนิ้วสุ่มคนดื่ม ให้กว้างเต็มจอและปรับขนาดตามหน้าจอแท็บเล็ต/มือถือ */
.party-arena-container .finger-roulette-wrapper {
  max-width: 100% !important;
  width: 100%;
  padding: 14px 10px;
  position: relative;
}

.party-arena-container .minigame-wrapper .minigame-title {
  color: var(--comic-black);
  font-size: 22px;
  font-weight: 800;
  margin: 8px 0 4px 0;
}

.party-arena-container .minigame-wrapper .minigame-subtitle {
  color: #475569;
  font-size: 13px;
  margin-bottom: 14px;
}

.party-arena-container .turn-indicator {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 14px;
}

/* แก้ไข Contrast สำหรับกล่องแจ้งผลลัพธ์ระเบิด/บทลงโทษ */
.result-card.bomb-exploded {
  background: #fef2f2;
  border: 2px solid #ef4444;
}

.result-card.bomb-exploded .result-title {
  color: #dc2626 !important;
  font-size: 16px;
  font-weight: 800;
}

.result-card.bomb-exploded .result-desc {
  color: #1e293b !important;
  font-size: 13px;
  line-height: 1.4;
}

/* 🏰 บอร์ดเกมกระดานเศรษฐี 16 ช่อง 5x5 Grid */
.monopoly-wrapper {
  background: #ffffff;
  border: var(--comic-border);
  box-shadow: var(--comic-shadow);
  border-radius: 20px;
  padding: 12px;
  text-align: center;
  color: var(--comic-black);
}

.monopoly-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 3px;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  margin: 10px auto;
  background: #f1f5f9;
  border: 2px solid #0f172a;
  border-radius: 12px;
  padding: 3px;
  position: relative;
}

.mono-cell {
  background: #ffffff;
  border: 1px solid #0f172a;
  border-radius: 6px;
  padding: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 7.5px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  min-height: 38px;
}

.mono-cell-icon {
  font-size: 13px;
  line-height: 1;
}

.mono-cell-title {
  font-size: 7px;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  max-width: 100%;
}

.mono-tokens {
  display: flex;
  gap: 2px;
  position: absolute;
  bottom: 1px;
  left: 1px;
  right: 1px;
  justify-content: center;
  flex-wrap: wrap;
}

.mono-token {
  font-size: 6.5px;
  font-weight: 800;
  color: #ffffff;
  padding: 0.5px 2.5px;
  border-radius: 3px;
  border: 1px solid #0f172a;
}

/* จัดตำแหน่ง 28 ช่องรอบขอบ 8x8 Grid */
/* แถวบน (Row 1): ช่อง 0 - 7 */
.cell-0 { grid-column: 1; grid-row: 1; background: #fef08a; } /* START */
.cell-1 { grid-column: 2; grid-row: 1; }
.cell-2 { grid-column: 3; grid-row: 1; }
.cell-3 { grid-column: 4; grid-row: 1; }
.cell-4 { grid-column: 5; grid-row: 1; }
.cell-5 { grid-column: 6; grid-row: 1; }
.cell-6 { grid-column: 7; grid-row: 1; }
.cell-7 { grid-column: 8; grid-row: 1; background: #fed7aa; } /* คุกวงเหล้า */

/* เสาขวา (Col 8): ช่อง 8 - 13 */
.cell-8 { grid-column: 8; grid-row: 2; }
.cell-9 { grid-column: 8; grid-row: 3; }
.cell-10 { grid-column: 8; grid-row: 4; }
.cell-11 { grid-column: 8; grid-row: 5; background: #bbf7d0; } /* ชิว */
.cell-12 { grid-column: 8; grid-row: 6; }
.cell-13 { grid-column: 8; grid-row: 7; }

/* แถวล่าง (Row 8): ช่อง 14 - 21 */
.cell-14 { grid-column: 8; grid-row: 8; background: #fecaca; } /* หีบเสี่ยงดวง */
.cell-15 { grid-column: 7; grid-row: 8; }
.cell-16 { grid-column: 6; grid-row: 8; }
.cell-17 { grid-column: 5; grid-row: 8; }
.cell-18 { grid-column: 4; grid-row: 8; }
.cell-19 { grid-column: 3; grid-row: 8; background: #fed7aa; } /* คุกชั้นใน */
.cell-20 { grid-column: 2; grid-row: 8; }
.cell-21 { grid-column: 1; grid-row: 8; background: #fef08a; } /* ตะโกนไชโย */

/* เสาซ้าย (Col 1): ช่อง 22 - 27 */
.cell-22 { grid-column: 1; grid-row: 7; }
.cell-23 { grid-column: 1; grid-row: 6; }
.cell-24 { grid-column: 1; grid-row: 5; background: #bbf7d0; } /* ฟรีบาร์ */
.cell-25 { grid-column: 1; grid-row: 4; }
.cell-26 { grid-column: 1; grid-row: 3; }
.cell-27 { grid-column: 1; grid-row: 2; }

/* ลานตรงกลางกระดาน (6x6 ตรงกลาง) */
.mono-center {
  grid-column: 2 / 8;
  grid-row: 2 / 8;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
}

.mono-dice-box {
  font-size: 36px;
  margin-bottom: 4px;
}

.rolling-dice {
  animation: diceRoll 0.2s infinite alternate;
}

@keyframes diceRoll {
  0% { transform: scale(0.9) rotate(-10deg); }
  100% { transform: scale(1.1) rotate(10deg); }
}

.mono-event-text {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  min-height: 32px;
  line-height: 1.3;
}

.mono-players-list {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* 🎲 ลูกเต๋า 7-8-9 */
.dice-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.dice-pair {
  display: flex;
  gap: 16px;
}

.dice-cube {
  width: 72px;
  height: 72px;
  background: #ffffff;
  border: 3px solid #0f172a;
  border-radius: 18px;
  box-shadow: 4px 4px 0px #0f172a;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.dice-sum-display {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--beer-gold);
}

/* 🃏 King's Cup */
.kings-cup-center {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.cup-graphic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, #f59e0b, #b45309);
  border: 4px solid #ffffff;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), var(--comic-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cup-foam {
  font-size: 40px;
}

.cup-label {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
}

/* 🍾 หมุนขวดเบียร์ */
.bottle-arena {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottle-players-ring {
  position: absolute;
  width: 100%;
  height: 100%;
}

.bottle-player-node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-115px) rotate(calc(-1 * var(--angle)));
}

.node-chip {
  display: inline-block;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  border: 2px solid #0f172a;
  box-shadow: 2px 2px 0px #0f172a;
}

.bottle-graphic {
  font-size: 70px;
  cursor: pointer;
  transition: transform 0.1s;
  user-select: none;
}

/* 👆 แตะนิ้วสุ่มคนดื่ม (Finger Roulette - Expanded Touch Canvas) */
.finger-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  text-align: left;
}

.finger-header-bar .minigame-header-text {
  flex: 1;
}

.finger-header-bar .minigame-badge {
  font-size: 11px;
}

.finger-header-bar .minigame-title {
  margin: 2px 0 !important;
  font-size: 20px !important;
}

.finger-header-bar .minigame-subtitle {
  margin-bottom: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.3;
}

.btn-fullscreen-toggle {
  background: #0f172a;
  color: #f8fafc;
  border: 2px solid #0f172a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.25);
  transition: all 0.15s ease;
}

.btn-fullscreen-toggle:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.finger-touch-area {
  width: 100%;
  height: clamp(480px, 68vh, 850px);
  min-height: 460px;
  background: radial-gradient(circle at center, #1e293b 0%, #080c14 100%);
  border: 3px solid #3b82f6;
  border-radius: 20px;
  position: relative;
  touch-action: none;
  overflow: hidden;
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(59, 130, 246, 0.25);
  user-select: none;
  -webkit-user-select: none;
}

/* ลวดลายเรดาร์นีออนตารางไฮเทคบนลานสัมผัส */
.finger-touch-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  pointer-events: none;
}

.touch-hint {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  z-index: 2;
}

.touch-hint-icon {
  font-size: 36px;
  animation: bounceTouch 1.2s infinite ease-in-out;
}

.touch-hint-text {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.touch-hint-sub {
  font-size: 12.5px;
  color: #94a3b8;
  max-width: 280px;
  line-height: 1.4;
}

@keyframes bounceTouch {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.touch-ring {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulseTouchRing 1.2s infinite alternate ease-in-out;
  z-index: 4;
}

@keyframes pulseTouchRing {
  0% { transform: translate(-50%, -50%) scale(0.9); }
  100% { transform: translate(-50%, -50%) scale(1.15); }
}

.loser-ring {
  background: rgba(239, 68, 68, 0.45) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 40px #ef4444, 0 0 15px #f59e0b !important;
  animation: boomLoser 0.35s infinite alternate;
  z-index: 8;
}

@keyframes boomLoser {
  0% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.35); }
}

.loser-text {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 800;
  color: #ef4444;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(0,0,0,0.9);
  padding-top: 4px;
}

/* ลอยการ์ดแจ้งผลลัพธ์ระเบิดทับบนลานสัมผัส ไม่ดันให้ลานหดตัว */
.finger-roulette-wrapper .minigame-result {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 360px;
  z-index: 20;
}

/* ⛶ โหมดขยายเต็มจอ (Fullscreen Touch Surface) */
.finger-roulette-wrapper.touch-arena-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  z-index: 99999 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  padding: 12px 10px 10px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  background: #080c14 !important;
}

.finger-roulette-wrapper.touch-arena-fullscreen .minigame-header-text .minigame-title {
  color: #f8fafc !important;
}

.finger-roulette-wrapper.touch-arena-fullscreen .minigame-header-text .minigame-subtitle {
  color: #94a3b8 !important;
}

.finger-roulette-wrapper.touch-arena-fullscreen .finger-touch-area {
  flex: 1 !important;
  height: auto !important;
  max-height: none !important;
  border-color: #60a5fa !important;
  border-radius: 14px !important;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(96, 165, 250, 0.4) !important;
}

/* ==========================================================================
   11. 3D Realistic Animations (Dice 3D, Step Hopping, Bottle Pointer, Card Flip)
   ========================================================================== */

/* 🎲 3D Tumbling Dice System (Fully WebKit & iOS Safari Compatible) */
.dice-scene {
  width: 68px;
  height: 68px;
  -webkit-perspective: 600px;
  perspective: 600px;
  margin: 12px auto;
  display: inline-block;
  position: relative;
}

.dice-scene.throwing {
  animation: diceThrowBounce 1.35s cubic-bezier(0.18, 0.89, 0.32, 1.15);
}

@keyframes diceThrowBounce {
  0% { transform: scale(0.65) translateY(-40px) rotate(-15deg); opacity: 0.9; }
  35% { transform: scale(1.25) translateY(-25px) rotate(15deg); opacity: 1; }
  65% { transform: scale(0.9) translateY(12px) rotate(-8deg); }
  85% { transform: scale(1.06) translateY(-5px) rotate(3deg); }
  100% { transform: scale(1) translateY(0) rotate(0deg); }
}

.dice-cube-3d {
  width: 100%;
  height: 100%;
  position: relative;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transition: transform 1.35s cubic-bezier(0.18, 0.89, 0.32, 1.15);
}

.dice-face-3d {
  position: absolute;
  width: 68px;
  height: 68px;
  background: #ffffff;
  border: 3px solid #0f172a;
  border-radius: 16px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.12), 2px 2px 0px #0f172a;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 6px;
  box-sizing: border-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.pip {
  width: 11px;
  height: 11px;
  background: #0f172a;
  border-radius: 50%;
  margin: auto;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}

.pip.pip-red {
  background: #ef4444;
  width: 20px;
  height: 20px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* 6 Faces Positioning (Z = 34px = 68px / 2) */
.dice-face-1 { transform: rotateY(0deg) translateZ(34px); }
.dice-face-2 { transform: rotateX(-90deg) translateZ(34px); }
.dice-face-3 { transform: rotateY(90deg) translateZ(34px); }
.dice-face-4 { transform: rotateY(-90deg) translateZ(34px); }
.dice-face-5 { transform: rotateX(90deg) translateZ(34px); }
.dice-face-6 { transform: rotateY(180deg) translateZ(34px); }

/* 🏰 Step-by-Step Hopping Token in Monopoly */
.mono-token.hopping {
  animation: tokenHop 0.32s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes tokenHop {
  0% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.6) translateY(-22px); box-shadow: 0 12px 16px rgba(0,0,0,0.35); }
  100% { transform: scale(1) translateY(0); }
}

.mono-cell.cell-stepping {
  background: #fef9c3 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.85) !important;
  transform: scale(1.06);
  transition: all 0.15s ease;
}

.mono-cell.cell-landed {
  animation: cellPulse 0.5s 3 alternate ease-in-out;
  background: #fef08a !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 1) !important;
}

@keyframes cellPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

/* 🍾 SVG Craft Beer Bottle & Accurate Laser Pointer */
.svg-bottle-wrapper {
  position: relative;
  width: 64px;
  height: 160px;
  margin: 0 auto;
  transform-origin: 50% 50%;
  transition: transform 3.8s cubic-bezier(0.12, 0.88, 0.22, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bottle-laser-beam {
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 55px;
  background: linear-gradient(to top, #ef4444, rgba(239, 68, 68, 0));
  border-radius: 999px;
  box-shadow: 0 0 14px #ef4444;
  opacity: 0;
  transition: opacity 0.3s;
}

.bottle-laser-beam.active {
  opacity: 1;
  animation: beamPulse 0.4s infinite alternate;
}

@keyframes beamPulse {
  0% { box-shadow: 0 0 8px #ef4444; width: 4px; }
  100% { box-shadow: 0 0 24px #ef4444, 0 0 10px #f59e0b; width: 6px; }
}

.bottle-player-node .node-chip {
  transition: all 0.3s ease;
}

.bottle-player-node .node-chip.target-hit {
  transform: scale(1.4) !important;
  box-shadow: 0 0 30px #ef4444, 0 0 15px #f59e0b !important;
  animation: targetPulse 0.4s infinite alternate;
  z-index: 10;
}

@keyframes targetPulse {
  0% { transform: scale(1.25); }
  100% { transform: scale(1.45); }
}

/* 🃏 King's Cup 3D Card Stage */
.kings-card-stage {
  -webkit-perspective: 800px;
  perspective: 800px;
  width: 175px;
  height: 235px;
  margin: 14px auto;
  cursor: pointer;
}

.kings-card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.kings-card-3d.flipped {
  transform: rotateY(180deg);
}

.kings-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 3px solid #0f172a;
  box-shadow: var(--comic-shadow);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px;
}

.kings-card-back {
  background: radial-gradient(circle, #f59e0b 0%, #b45309 100%);
  color: #ffffff;
}

.kings-card-front {
  background: #ffffff;
  color: #0f172a;
  transform: rotateY(180deg);
}

/* 👆 Finger Roulette Countdown Overlay */
.countdown-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 72px;
  font-weight: 900;
  color: #f59e0b;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.9), 3px 3px 0 #0f172a;
  animation: countdownPop 0.8s infinite ease-out;
  pointer-events: none;
  z-index: 5;
}

@keyframes countdownPop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.2; }
  50% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
}

/* ✨ Version Badge & Cache Refresh Button */
.version-badge-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 14px;
  flex-wrap: wrap;
}

.version-tag {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  color: #f59e0b;
  border: 1.5px solid #f59e0b;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.btn-refresh-cache {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #0f172a;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 1.5px 1.5px 0px #0f172a;
  transition: transform 0.1s;
}

.btn-refresh-cache:active {
  transform: scale(0.95);
}

/* ==========================================================================
   11.5 สไตล์ 5 เกมปาร์ตี้วงเหล้าใหม่ (v2.5.0)
   ========================================================================== */

/* 💣 1. ระเบิดเวลาส่งต่อ (Beer Bomb Pass) */
.bomb-pass-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(circle, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #0f172a;
  border-radius: 16px;
  margin: 14px 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.bomb-pass-arena.arena-exploded {
  background: radial-gradient(circle, #fef2f2 0%, #fee2e2 100%);
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.bomb-holder-display {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  padding: 6px 18px;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 999px;
  box-shadow: 2px 2px 0px #0f172a;
}

.bomb-visual-box {
  position: relative;
  display: inline-block;
  margin: 16px 0;
}

.bomb-big-icon, .bomb-icon-huge {
  font-size: 80px;
  line-height: 1;
  display: block;
  user-select: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.bomb-spark-fuse, .bomb-fuse-spark {
  position: absolute;
  top: -14px;
  right: 8px;
  font-size: 32px;
  animation: sparkFlicker 0.15s infinite alternate;
}

@keyframes sparkFlicker {
  0% { transform: scale(0.9) rotate(-15deg); filter: drop-shadow(0 0 4px #f59e0b); }
  100% { transform: scale(1.2) rotate(15deg); filter: drop-shadow(0 0 10px #ef4444); }
}

.bomb-status-hint {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-align: center;
  max-width: 280px;
  margin-top: 4px;
}

.bomb-action-big {
  font-size: 18px !important;
  padding: 16px 28px !important;
}

/* 🎯 2. รูเล็ตวงล้อมรณะ (Punisher Beer Roulette) */
.roulette-arena {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roulette-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  color: #ef4444;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  line-height: 1;
}

.roulette-wheel-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 0 4px #0f172a;
  cursor: pointer;
  overflow: hidden;
  background: #0f172a;
}

.roulette-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ⚔️ 3. สังเวียนดวลเป่ายิ้งฉุบวงเหล้า (RPS Beer Duel) */
.rps-duel-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
  border: 2px solid #0f172a;
  border-radius: 16px;
  padding: 14px;
  margin: 14px 0;
}

.rps-fighter-zone {
  background: #ffffff;
  border: 1.5px solid #0f172a;
  border-radius: 12px;
  padding: 10px;
  transition: all 0.2s;
}

.fighter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.fighter-header .player-badge {
  color: #ffffff !important;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1.5px solid #0f172a;
  box-shadow: 1.5px 1.5px 0px #0f172a;
}

.fighter-score {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
}

.rps-buttons-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-rps {
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 10px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  box-shadow: 2px 2px 0px #0f172a;
  transition: all 0.15s ease;
}

.btn-rps:active, .btn-rps.selected {
  background: #fef08a;
  transform: translateY(2px);
  box-shadow: 0 0 0 #0f172a;
  border-color: #ca8a04;
}

.rps-icon {
  font-size: 26px;
  line-height: 1;
}

.rps-label {
  font-size: 12px;
  color: #0f172a;
}

.rps-clash-divider {
  display: flex;
  justify-content: center;
  align-items: center;
}

.clash-icon {
  font-size: 16px;
  font-weight: 900;
  color: #dc2626;
  background: #fee2e2;
  border: 2px solid #dc2626;
  padding: 4px 16px;
  border-radius: 999px;
  box-shadow: 2px 2px 0px #dc2626;
}

/* 🐉 4. ไพ่เสือมังกรวงเหล้า (Tiger Dragon Quick Duel) */
.tiger-dragon-arena {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 18px 10px;
  background: #0f172a;
  border: 2px solid #0f172a;
  border-radius: 16px;
  margin: 14px 0;
  position: relative;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.side-card-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.side-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid #ffffff;
  color: #ffffff;
}

.side-tiger .side-badge {
  background: #2563eb;
}

.side-dragon .side-badge {
  background: #dc2626;
}

.side-card-box {
  width: 90px;
  height: 130px;
  perspective: 1000px;
}

.side-val {
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}

.td-vs-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.td-vs-text {
  font-size: 22px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

/* 💥 5. เปิดแผ่นป้ายระเบิดวงเหล้า (Beer Minefield 4x4) */
.minefield-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 320px;
  margin: 14px auto;
  perspective: 1000px;
}

.mine-tile {
  aspect-ratio: 1 / 1;
  cursor: pointer;
  position: relative;
}

.mine-tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.5s;
  transform-style: preserve-3d;
  border-radius: 10px;
}

.mine-tile.revealed .mine-tile-inner {
  transform: rotateY(180deg);
}

.mine-tile-front, .mine-tile-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
  border: 2px solid #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.mine-tile-front {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 2px 2px 0px #0f172a;
}

.mine-tile-back {
  background: #ffffff;
  transform: rotateY(180deg);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.mine-tile-back.tile-bomb {
  background: #fee2e2;
  border-color: #dc2626;
}

.tile-icon {
  font-size: 20px;
  line-height: 1;
}

.tile-label {
  font-size: 8px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  text-align: center;
  margin-top: 2px;
}

/* ==========================================================================
   12. Responsive Media Queries (Tablet & Large Screen Optimization)
   ========================================================================== */
@media (min-width: 600px) {
  .app-container {
    max-width: 680px;
    padding: 20px;
  }

  .party-arena-container .minigame-wrapper {
    max-width: 640px;
    padding: 24px 20px;
  }

  .monopoly-board {
    max-width: 520px;
  }

  .mono-cell {
    min-height: 50px;
    font-size: 9.5px;
  }

  .mono-cell-title {
    font-size: 8px;
  }

  .mono-cell-icon {
    font-size: 16px;
  }

  .mono-token {
    font-size: 7.5px;
    padding: 1px 3px;
  }

  .bottle-arena {
    width: 330px;
    height: 330px;
  }

  .bottle-player-node {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-138px) rotate(calc(-1 * var(--angle)));
  }

  .roulette-arena {
    width: 330px;
    height: 330px;
  }

  .minefield-grid {
    max-width: 380px;
    gap: 10px;
  }

  .side-card-box {
    width: 110px;
    height: 155px;
  }
}

@media (min-width: 900px) {
  .app-container {
    max-width: 860px;
  }

  .party-arena-container .minigame-wrapper {
    max-width: 780px;
  }

  .monopoly-board {
    max-width: 600px;
  }

  .mono-cell {
    min-height: 58px;
    font-size: 10.5px;
  }

  .mono-cell-title {
    font-size: 9px;
  }

  .mono-cell-icon {
    font-size: 18px;
  }

  .roulette-arena {
    width: 360px;
    height: 360px;
  }

  .minefield-grid {
    max-width: 420px;
    gap: 12px;
  }
}

/* ==========================================================================
   Drinking Rules & Glass Option System (กติกาการดื่มสไตล์บาร์เบียร์)
   ========================================================================== */
.drink-rules-container {
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0 16px 0;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.drink-rules-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.drink-rules-title {
  font-size: 13px;
  font-weight: 800;
  color: #fef08a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drink-rules-hint {
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.drink-rules-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

@media (max-width: 420px) {
  .drink-rules-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.btn-drink-rule {
  background: #0f172a;
  border: 2px solid #475569;
  border-radius: 10px;
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #cbd5e1;
  text-align: center;
  min-height: 48px;
  touch-action: manipulation;
}

.btn-drink-rule:hover {
  border-color: #f59e0b;
  background: #1e293b;
}

.btn-drink-rule.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #ffffff;
  color: #0f172a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  transform: scale(1.02);
}

.btn-drink-rule.active .drule-title {
  color: #0f172a;
  font-weight: 900;
}

.btn-drink-rule.active .drule-sub {
  color: #78350f;
  font-weight: 800;
}

.drule-title {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.drule-sub {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.1;
}


