/* style.css - Crazy Eights Styling & Visual Design */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-gradient: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 100%);
  --panel-bg: rgba(30, 41, 59, 0.45);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-pink: #f43f5e;
  --neon-red: #ff3b30;
  --neon-blue: #00c7fc;
  --gold: #fbbf24;
  
  --card-width: 80px;
  --card-height: 120px;
  --card-border-radius: 8px;
  --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Header/Navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-border);
  z-index: 10;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  font-weight: 300;
  color: var(--text-secondary);
}

.game-status-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.suit-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--panel-border);
}

.suit-indicator .indicator-symbol {
  font-size: 1.2rem;
  font-weight: 700;
}

.header-buttons {
  display: flex;
  gap: 0.75rem;
}

button.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

button.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Play Area Layout */
.table-container {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr 1.5fr 1fr;
  grid-template-columns: 1fr 1.5fr 1fr;
  grid-template-areas:
    "top-left top-center top-right"
    "middle-left middle-center middle-right"
    "bottom-left bottom-center bottom-right";
  padding: 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Player Panels */
.player-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.player-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  padding: 0.75rem 1rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 5;
  transition: all 0.3s ease;
  position: relative;
}

.player-panel.active-turn {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4), inset 0 0 10px rgba(6, 182, 212, 0.1);
  animation: pulseActive 2s infinite ease-in-out;
}

@keyframes pulseActive {
  0%, 100% { border-color: rgba(6, 182, 212, 0.6); }
  50% { border-color: rgba(6, 182, 212, 1); }
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.player-panel.active-turn .avatar {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.player-info {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.player-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.thinking-dots {
  display: inline-flex;
  gap: 2px;
}

.thinking-dots span {
  width: 4px;
  height: 4px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  animation: bounceDot 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounceDot {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Specific Positions */
.top-player {
  grid-area: top-center;
  flex-direction: column;
}
.top-player .hand-container {
  margin-top: 0.5rem;
}

.left-player {
  grid-area: middle-left;
  flex-direction: row;
}
.left-player .hand-container {
  margin-left: 0.5rem;
}

.right-player {
  grid-area: middle-right;
  flex-direction: row-reverse;
}
.right-player .hand-container {
  margin-right: 0.5rem;
}

.bottom-player {
  grid-area: bottom-center;
  flex-direction: column-reverse;
}
.bottom-player .hand-container {
  margin-bottom: 0.5rem;
}

/* Center Play Area */
.center-board {
  grid-area: middle-center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 1.5rem;
}

.pile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pile-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Drawing Deck / Discard Pile placeholders */
.deck-pile, .discard-pile-container {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-border-radius);
  position: relative;
  perspective: 1000px;
}

.deck-pile {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.deck-pile.pulse-draw-hint {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5), inset 0 0 10px rgba(6, 182, 212, 0.2);
  animation: pulseDraw 1.5s infinite;
}

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

/* Card representation styling */
.card {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-border-radius);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--panel-border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem;
  user-select: none;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  aspect-ratio: 2/3;
}

/* Card Suits & Colors */
.card[data-suit="H"], .card[data-suit="D"] {
  color: var(--neon-red);
  text-shadow: 0 0 3px rgba(255, 59, 48, 0.3);
}

.card[data-suit="C"], .card[data-suit="S"] {
  color: var(--text-primary);
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.2);
}

.card-top {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.card-rank {
  font-weight: 700;
  font-size: 1.2rem;
}

.card-suit-mini {
  font-size: 0.8rem;
}

.card-center {
  align-self: center;
  font-size: 2rem;
  font-weight: 500;
}

.card-bottom {
  display: flex;
  flex-direction: column;
  align-self: flex-end;
  transform: rotate(180deg);
  line-height: 1;
}

/* Wild 8 Card gradient glow */
.card[data-rank="8"] {
  border: 1.5px solid transparent;
  background-image: linear-gradient(rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.95)), 
                    linear-gradient(135deg, #3b82f6, #ec4899, #eab308, #22c55e);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.card[data-rank="8"] .card-center {
  background: linear-gradient(135deg, #60a5fa, #f472b6, #fbbf24, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* Card Back Design */
.card.back {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card.back::after {
  content: '';
  width: 80%;
  height: 85%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  background: repeating-linear-gradient(
    45deg,
    rgba(6, 182, 212, 0.05),
    rgba(6, 182, 212, 0.05) 5px,
    rgba(244, 63, 94, 0.05) 5px,
    rgba(244, 63, 94, 0.05) 10px
  );
}

/* Card in Hand Stack Containers */
.hand-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 130px;
}

/* Human Hand horizontal stack layout */
.player-hand {
  display: flex;
  padding: 0 1rem;
}

.player-hand .card {
  margin-left: -25px; /* Overlap cards */
  cursor: pointer;
}

.player-hand .card:first-child {
  margin-left: 0;
}

.player-hand .card:hover {
  transform: translateY(-20px) rotate(2deg) scale(1.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  z-index: 20 !important;
}

/* Playable state highlight */
.player-hand .card.playable {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

/* Unplayable states: slightly dim */
.player-hand .card:not(.playable) {
  opacity: 0.7;
}

.player-hand .card:not(.playable):hover {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.2);
}

/* AI Hands - simplified representation */
.ai-hand-cards {
  display: flex;
  gap: 0.25rem;
}

.ai-hand-cards .card-mini {
  width: 14px;
  height: 20px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Stack styling for deck cards left */
.deck-card-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.deck-card-layer:nth-child(2) { transform: translate(-2px, -2px); }
.deck-card-layer:nth-child(3) { transform: translate(-4px, -4px); }
.deck-card-layer:nth-child(4) { transform: translate(-6px, -6px); }

/* Discard pile stacked cards details */
.discard-pile-container .card {
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Control buttons below player hand */
.action-panel {
  grid-area: bottom-right;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 0.75rem;
  padding-right: 1.5rem;
}

.btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}

.btn:hover:not(:disabled) {
  background: var(--text-primary);
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #2563eb);
  border: none;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #fff;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

/* Modals & Overlays */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--panel-border);
  padding: 2.5rem;
  border-radius: 24px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.overlay.visible .modal {
  transform: scale(1);
}

/* Suit Selector Specifics */
.suit-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.suit-select-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  padding: 1.5rem;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.suit-select-btn .symbol {
  font-size: 2.5rem;
  font-weight: 700;
}

.suit-select-btn .label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Suit colors & glowing states */
.suit-select-btn[data-suit="H"]:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: var(--accent-pink);
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
}
.suit-select-btn[data-suit="H"] .symbol { color: var(--accent-pink); }

.suit-select-btn[data-suit="D"]:hover {
  background: rgba(251, 191, 36, 0.1);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}
.suit-select-btn[data-suit="D"] .symbol { color: var(--gold); }

.suit-select-btn[data-suit="C"]:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}
.suit-select-btn[data-suit="C"] .symbol { color: var(--accent-cyan); }

.suit-select-btn[data-suit="S"]:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}
.suit-select-btn[data-suit="S"] .symbol { color: #fff; }

/* Settings Modal Specifics */
.modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--panel-border);
}

.setting-row:last-of-type {
  border-bottom: none;
  margin-bottom: 1.5rem;
}

.setting-info {
  text-align: left;
}

.setting-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.setting-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Switch Toggle Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid var(--panel-border);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-cyan);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Game Over Modal Elements */
.game-over-banner {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.game-over-banner.win {
  background: linear-gradient(135deg, var(--accent-cyan), #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-over-banner.lose {
  background: linear-gradient(135deg, var(--accent-pink), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-over-details {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* Confetti canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}

/* Footer rules summary */
footer {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--panel-border);
  background: rgba(15, 23, 42, 0.2);
}

/* Card Dealing/Moving Animations */
.card.dealing {
  z-index: 100;
  pointer-events: none;
  animation: dealCard 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes dealCard {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5) rotate(0);
  }
  100% {
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  :root {
    --card-width: 65px;
    --card-height: 97px;
  }
  
  .table-container {
    padding: 0.5rem;
    grid-template-rows: 1fr 1.8fr 1fr;
  }

  .player-panel {
    padding: 0.5rem 0.75rem;
  }
  
  .avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  
  .center-board {
    gap: 1rem;
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  :root {
    --card-width: 55px;
    --card-height: 82px;
  }
  
  header {
    padding: 0.75rem 1rem;
  }
  
  .logo h1 {
    font-size: 1.2rem;
  }
  
  .table-container {
    grid-template-columns: 0.8fr 1.4fr 0.8fr;
  }

  .player-hand {
    padding: 0 0.5rem;
  }

  .player-hand .card {
    margin-left: -20px;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .action-panel {
    padding-right: 0.5rem;
  }
}

/* ============================================================
   CHAOS MODE
   ============================================================ */

/* Mode tag next to the title: vivid gradient text (clipped to the glyphs). */
#mode-tag.mode-tag-chaos {
  font-weight: 700;
  background: linear-gradient(135deg, #f472b6, #a78bfa, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Mode-select overlay */
.mode-select-modal {
  max-width: 640px;
}

.mode-options {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.mode-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid var(--panel-border);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  text-align: center;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
}

.mode-card-chaos:hover {
  border-color: #ec4899;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
}

.mode-emoji {
  font-size: 2.6rem;
  line-height: 1;
}

.mode-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.mode-card-chaos .mode-name {
  background: linear-gradient(135deg, #f472b6, #a78bfa, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mode-blurb {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Direction indicator */
.direction-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--panel-border);
}

.direction-indicator .dir-arrow {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  line-height: 1;
}

/* Pending forced-draw banner */
.pending-draw-banner {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f43f5e, #b91c1c);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
  white-space: nowrap;
  animation: pending-pulse 1s ease-in-out infinite;
}

#pending-draw-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.pending-draw-hint {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.85);
}

@keyframes pending-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}

/* Action cards: subtle tint so 2/J/A read as "special" in Chaos */
.card[data-rank="2"], .card[data-rank="J"], .card[data-rank="A"] {
  box-shadow: var(--card-shadow), inset 0 0 0 1.5px rgba(251, 191, 36, 0.35);
}

/* Joker cards */
.joker-card {
  border: 1.5px solid transparent;
  background-image: linear-gradient(rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.95)),
                    linear-gradient(135deg, #ec4899, #8b5cf6, #f59e0b, #06b6d4);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
  color: var(--text-primary);
}

.joker-card .card-rank {
  color: var(--gold);
}

.joker-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 1rem;
}

.joker-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.joker-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #f472b6, #a78bfa, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.joker-blurb {
  font-size: 0.58rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Effect toasts */
.toast-stack {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(-12px);
  animation: toast-in 0.25s ease forwards;
}

.toast-emoji { font-size: 1.2rem; }

.toast.toast-out {
  animation: toast-out 0.5s ease forwards;
}

@keyframes toast-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(-12px); }
}
