/* Art Deco Meeemopoly Stylesheet */

:root {
  --table-green: #0f2319;
  --board-ivory: #FAF6EE;
  --gold-foil: #D4AF37;
  --gold-light: #F9E79F;
  --navy-district: #1D3557;
  --crimson-district: #E63946;
  --yellow-district: #FFD166;
  --emerald-district: #2A9D8F;
  --pink-district: #D90429;
  --orange-district: #F77F00;
  --brown-district: #7F4F24;
  --blue-district: #005F73;
}

body {
  background-color: var(--table-green);
  background-image: radial-gradient(circle at 50% 50%, #163625 0%, #0c1c14 100%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* Board Grid 11x11 layout */
.monopoly-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(9, 1fr) 1.3fr;
  grid-template-rows: 1.3fr repeat(9, 1fr) 1.3fr;
  width: 100%;
  height: 100%;
}

/* Individual Tile Styling */
.board-tile {
  position: relative;
  border: 0.5px solid rgba(26, 56, 38, 0.4);
  background: #FAF6EE;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  font-family: 'Josefin Sans', sans-serif;
  box-sizing: border-box;
  transition: filter 0.15s ease;
}

.board-tile:hover {
  filter: brightness(0.97);
}

.tile-color-bar {
  width: 100%;
  height: 22%;
  border-bottom: 1px solid rgba(0,0,0,0.2);
}

/* Orientation Specific Bars */
.tile-bottom .tile-color-bar {
  border-bottom: 1px solid rgba(0,0,0,0.3);
}

.tile-top .tile-color-bar {
  border-top: 1px solid rgba(0,0,0,0.3);
  order: 2;
}

.tile-left .tile-color-bar {
  border-right: 1px solid rgba(0,0,0,0.3);
  height: 100%;
  width: 22%;
  order: 2;
}

.tile-right .tile-color-bar {
  border-left: 1px solid rgba(0,0,0,0.3);
  height: 100%;
  width: 22%;
  order: 1;
}

/* Tokens Container inside Tile */
.tile-tokens {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex-wrap: wrap;
  padding: 1px;
  z-index: 15;
}

.player-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  font-size: 11px;
  transform: scale(1);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  background-color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 640px) {
  .player-token {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
}

.player-token.hopping {
  transform: translateY(-8px) scale(1.3);
  box-shadow: 0 8px 12px rgba(0,0,0,0.5);
}

/* Houses on Tiles */
.tile-improvements {
  position: absolute;
  display: flex;
  gap: 1px;
  z-index: 12;
  pointer-events: none;
}

.tile-bottom .tile-improvements {
  top: 1px;
  left: 2px;
  right: 2px;
  justify-content: center;
}

.tile-top .tile-improvements {
  bottom: 1px;
  left: 2px;
  right: 2px;
  justify-content: center;
}

.tile-left .tile-improvements {
  right: 1px;
  top: 2px;
  bottom: 2px;
  flex-direction: column;
  justify-content: center;
}

.tile-right .tile-improvements {
  left: 1px;
  top: 2px;
  bottom: 2px;
  flex-direction: column;
  justify-content: center;
}

.house-cube {
  width: 6px;
  height: 6px;
  background: #10b981;
  border: 0.5px solid #064e3b;
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hotel-cube {
  width: 9px;
  height: 8px;
  background: #ef4444;
  border: 0.5px solid #7f1d1d;
  border-radius: 1.5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* 3D Dice styling */
.dice-cube {
  user-select: none;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.8), 0 4px 8px rgba(0,0,0,0.25);
}

.dice-rolling {
  animation: dice-shake 0.4s infinite linear;
}

@keyframes dice-shake {
  0% { transform: rotate(0deg) scale(1.05); }
  25% { transform: rotate(10deg) scale(0.95); }
  50% { transform: rotate(-8deg) scale(1.08); }
  75% { transform: rotate(6deg) scale(0.98); }
  100% { transform: rotate(0deg) scale(1.05); }
}

/* Card Decks in Center */
.card-deck {
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1), box-shadow 0.2s;
}

.card-deck:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

/* Highlighting Active Destination */
.tile-target-highlight {
  animation: tile-glow 1.2s infinite alternate ease-in-out;
}

@keyframes tile-glow {
  from {
    box-shadow: inset 0 0 0 2px #d4af37;
  }
  to {
    box-shadow: inset 0 0 10px 4px #e63946;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 24, 17, 0.6);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 4px;
}