/* Custom Styles for Catan: Villes & Chevaliers Assistant */
:root {
  --font-heading: 'Cinzel', serif, Georgia;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  --bg-dark: #0f0907;
  --bg-card: rgba(28, 18, 14, 0.85);
  --border-gold: rgba(234, 179, 8, 0.4);
  --gold-glow: rgba(234, 179, 8, 0.25);
  
  --catan-red: #dc2626;
  --catan-yellow: #eab308;
  --catan-blue: #2563eb;
  --catan-green: #16a34a;
  --catan-orange: #ea580c;
  --catan-white: #f8fafc;
  --catan-brown: #78350f;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(201, 59, 43, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(234, 179, 8, 0.08) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: #f3f4f6;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.font-heading {
  font-family: var(--font-heading);
}

/* Glassmorphism Card */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(234, 179, 8, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  border-radius: 1rem;
}

.glass-panel-glow {
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.2), 0 8px 32px 0 rgba(0, 0, 0, 0.6);
  border-color: rgba(234, 179, 8, 0.5);
}

/* Custom Gold Button */
.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gold:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.6);
}

.btn-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-red:active {
  transform: scale(0.96);
}

/* 3D Dice Canvas Overlay */
#dice-canvas-container {
  width: 100%;
  height: 180px;
  min-height: 165px;
  position: relative;
  touch-action: none;
}

#dice-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Barbarian Ship Track animations */
.barbarian-step {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.barbarian-step.active {
  transform: scale(1.15);
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8));
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
  }
  50% {
    box-shadow: 0 0 35px rgba(220, 38, 38, 0.9);
  }
}

.animate-pulse-danger {
  animation: pulseGlow 1.5s infinite;
}

@keyframes diceShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-4px, 4px) rotate(-5deg); }
  40% { transform: translate(4px, -4px) rotate(5deg); }
  60% { transform: translate(-4px, -4px) rotate(-3deg); }
  80% { transform: translate(4px, 4px) rotate(3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.shake-animation {
  animation: diceShake 0.4s ease-in-out;
}

/* Card Shuffle Animation */
@keyframes cardShuffle {
  0% { transform: scale(1) translateY(0); opacity: 1; }
  35% { transform: scale(0.96) translateX(-8px) rotate(-1.5deg); opacity: 0.75; }
  65% { transform: scale(1.02) translateX(8px) rotate(1.5deg); opacity: 0.9; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.shuffle-card-anim {
  animation: cardShuffle 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes spinIcon {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

.spin-icon-anim {
  animation: spinIcon 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 9, 7, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(234, 179, 8, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(234, 179, 8, 0.6);
}
