:root{
  --border: rgba(255,255,255,0.18);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);
  --shadow: 0 10px 25px rgba(0,0,0,0.35);
}

html, body{ height: 100%; }

body{
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 20% 10%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(1200px 900px at 90% 30%, rgba(255,0,0,0.06), transparent 60%),
    radial-gradient(900px 700px at 45% 90%, rgba(0,255,180,0.05), transparent 55%),
    linear-gradient(180deg, #0b1f14 0%, #07150e 100%);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.tiny{ font-size: 0.92rem; color: var(--muted); }

.brand-badge{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.dot{ width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-red{ background: #ff4d4d; box-shadow: 0 0 0 3px rgba(255,77,77,0.15); }
.dot-green{ background: #3cffb4; box-shadow: 0 0 0 3px rgba(60,255,180,0.15); }

.table-box{
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.btn-santa{
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn-santa:hover{ background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.35); transform: translateY(-1px); }
.btn-santa:active{ transform: translateY(0px); }
.btn-santa:disabled{ opacity: .55; transform: none; }

/* === Hand card sizing (desktop-friendly, bigger on mobile) === */
.card-img{
  width: clamp(56px, 9vw, 86px);
  height: auto;
  max-width: none;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
}

@media (max-width: 576px){
  .card-img{ width: clamp(72px, 18vw, 96px); }
}

#visRow, #aiRow{
  gap: clamp(6px, 1.3vw, 10px);
  justify-content: center;
}

/* Visitor card buttons */
.card-btn{
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 10px;
  line-height: 0;
}
.card-btn:focus{
  outline: 2px solid rgba(255,255,255,0.35);
  outline-offset: 3px;
}
.card-btn.held img{
  transform: translateY(-4px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.40);
}

/* HOLD tag */
.hold-tag{
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.9);
  opacity: 0;
  pointer-events: none;
}
.card-btn.held .hold-tag{ opacity: 1; }

/* Deck + discard */
.stack{
  position: relative;
  min-height: 110px;
  display: grid;
  place-items: center;
}

/* Deck fixed size */
#deckTop, #deckStack img{
  width: 56px !important;
  height: auto !important;
  max-width: 56px !important;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
}
#deckStack.shuffling{ animation: deckWiggle .65s ease-in-out; }
@keyframes deckWiggle{
  0%{ transform: rotate(0deg); }
  25%{ transform: rotate(-3deg); }
  50%{ transform: rotate(3deg); }
  75%{ transform: rotate(-2deg); }
  100%{ transform: rotate(0deg); }
}

/* Santa hat */
.hat{
  position:absolute;
  top:-14px;
  left: 50%;
  transform: translateX(-50%) rotate(-10deg);
  width: 46px;
  height: 24px;
  background: #c91515;
  border-radius: 16px 16px 10px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 8px 14px rgba(0,0,0,0.25);
}
.hat::before{
  content:"";
  position:absolute;
  bottom:-8px;
  left: -6px;
  width: 58px;
  height: 12px;
  background: #f3f3f3;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.hat::after{
  content:"";
  position:absolute;
  right:-10px;
  top: 2px;
  width: 14px;
  height: 14px;
  background:#f3f3f3;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

/* Discard pile cards */
#discardStack{ min-height: 110px; }
#discardStack img{
  position: absolute;
  width: 46px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 18px rgba(0,0,0,0.35);
}

/* Result banner styles */
#resultLabel.alert{ text-align: left; }

/* Snow overlay */
.snow{
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.14) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 20%, rgba(255,255,255,0.10) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.10) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 70%, rgba(255,255,255,0.12) 0 2px, transparent 3px);
  opacity: .35;
  mix-blend-mode: screen;
}
/* === Mobile UX: move action buttons under Visitor hand === */
.mobile-only { display: none; }
.mobile-hide { display: flex; }

@media (max-width: 576px) {
  .mobile-only { 
    display: flex; 
  }
  .mobile-hide { 
    display: none !important; 
  }
}
