/**
 * Monopoli Nusantara - Board Stylesheet
 * Tata Letak Luas 11x11 Grid (960px x 960px), Tema Papan Klasik Cerah, & Watermark Nusantara
 */

/* Viewport Papan Utama (Transparan menampilkan Background Art Nusantara) */
.board-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.35) 0%, rgba(186, 230, 253, 0.25) 100%);
  display: block;
}

/* Virtual Camera Rig (960px x 960px) */
.camera-rig {
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 960px;
  transform-origin: 0 0;
  will-change: transform;
}

/* Frame Papan Utama 960px x 960px (115 + 9*76 + 115 + 30 gap + 8 pad + 8 border = 960) */
.board-container {
  width: 960px;
  height: 960px;
  background: linear-gradient(135deg, #D8EFE0 0%, #E8F5E9 50%, #FEF9E7 100%);
  border: 4px solid #D97706;
  border-radius: 24px;
  box-shadow:
    0 20px 55px rgba(15, 23, 42, 0.22),
    0 4px 16px rgba(217, 119, 6, 0.25),
    inset 0 0 0 2px rgba(255, 255, 255, 0.7);
  display: grid;
  grid-template-columns: 115px repeat(9, 76px) 115px;
  grid-template-rows: 115px repeat(9, 76px) 115px;
  gap: 3px;
  padding: 4px;
  box-sizing: border-box;
}

/* --- Petak Papan Umum (Crisp Ivory Card) --- */
.board-tile {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1.5px solid #94A3B8;
  border-radius: 8px;
  display: flex;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
  transition: transform 0.14s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.board-tile:hover {
  background: #FFFBEB;
  border-color: #D97706;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
  z-index: 6;
}

.board-tile.tile-highlighted {
  border: 2.5px solid #F59E0B !important;
  background: #FEF3C7 !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.65), inset 0 0 10px rgba(245, 158, 11, 0.25);
  z-index: 10;
}

.board-tile.has-owner {
  border: 2.5px solid var(--owner-color, #D97706);
  box-shadow: inset 0 0 0 1px var(--owner-color, #D97706);
}

.board-tile.is-mortgaged {
  opacity: 0.72;
  filter: grayscale(0.65);
  position: relative;
}

.board-tile.is-mortgaged::after {
  content: "TERGADAI";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-22deg);
  font-size: 0.65rem;
  font-weight: 900;
  color: #FFFFFF;
  border: 1.5px solid #FFFFFF;
  padding: 2px 6px;
  background: rgba(225, 29, 72, 0.92);
  border-radius: 5px;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 8;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* --- Orientasi Garis Warna Petak (4 Arah, Lebih Tebal & Jelas) --- */
.board-tile.side-bottom {
  flex-direction: column;
}
.tile-color-bar.bar-bottom {
  height: 18px;
  width: 100%;
  border-bottom: 1.5px solid rgba(15, 23, 42, 0.22);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.board-tile.side-top {
  flex-direction: column-reverse;
}
.tile-color-bar.bar-top {
  height: 18px;
  width: 100%;
  border-top: 1.5px solid rgba(15, 23, 42, 0.22);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.board-tile.side-left {
  flex-direction: row-reverse;
}
.tile-color-bar.bar-left {
  width: 18px;
  height: 100%;
  border-left: 1.5px solid rgba(15, 23, 42, 0.22);
  box-shadow: inset -2px 0 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.board-tile.side-right {
  flex-direction: row;
}
.tile-color-bar.bar-right {
  width: 18px;
  height: 100%;
  border-right: 1.5px solid rgba(15, 23, 42, 0.22);
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* Konten Dalam Petak (Lega & Tidak Berdempetan) */
.tile-inner {
  flex: 1;
  padding: 5px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  overflow: hidden;
  gap: 2px;
}

.tile-region-tag {
  font-size: 9px;
  font-weight: 800;
  color: #0369A1;
  background: #E0F2FE;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1.1;
}

.tile-icon-img {
  font-size: 18px;
  line-height: 1;
  margin: 1px 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.tile-title-clean {
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0F172A;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 98%;
  word-break: break-word;
}

.tile-price-pill {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #92400E;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(217, 119, 6, 0.12);
}

.tile-sub-clean {
  font-size: 0.66rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

/* Miniatur Rumah & Hotel */
.tile-houses-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 13px;
}

.house-chip {
  font-size: 9.5px;
  background: #D1FAE5;
  border: 1px solid #059669;
  color: #065F46;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
}

.hotel-chip {
  font-size: 9.5px;
  background: #FFE4E6;
  border: 1px solid #E11D48;
  color: #9F1239;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
}

.tile-owner-indicator {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* --- Petak Sudut (Corners) 115px x 115px --- */
.board-tile.tile-corner {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 2px solid #D97706;
}

.corner-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  gap: 3px;
}

.corner-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.corner-title {
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: #92400E;
  letter-spacing: 0.5px;
}

.corner-sub {
  font-size: 0.7rem;
  color: #334155;
  font-weight: 700;
  margin-top: 1px;
}

.tile-jackpot-chip {
  background: #059669;
  color: #FFFFFF;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
}

/* Container Pion dalam Petak */
.tile-pawns-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px;
  z-index: 15;
}

/* --- Center Hub Nusantara (Dengan Watermark Art Transparan) --- */
.board-center-hub {
  position: relative;
  background-color: #F8FAFC;
  background-image:
    url('../assets/hub-watermark.svg'),
    radial-gradient(circle at center, #FFFFFF 0%, #EFF6FF 65%, #E0F2FE 100%);
  background-size: cover, cover;
  background-position: center, center;
  border-radius: 20px;
  border: 2.5px solid #F59E0B;
  margin: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px;
  box-shadow:
    inset 0 0 35px rgba(2, 132, 199, 0.08),
    0 6px 20px rgba(15, 23, 42, 0.06);
  z-index: 2;
}

.center-hub-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.center-logo-badge {
  font-size: 36px;
  margin-bottom: 4px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
}

.center-logo-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  background: linear-gradient(135deg, #0369A1 0%, #D97706 60%, #B45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.center-logo-sub {
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: #B45309;
  text-transform: uppercase;
  font-weight: 800;
  margin-top: 2px;
}

.center-dice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: auto 0;
  width: 100%;
  max-width: 290px;
}

.center-event-banner {
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid #CBD5E1;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1E293B;
  text-align: center;
  width: 94%;
  max-width: 94%;
  white-space: normal;
  line-height: 1.35;
  overflow-wrap: break-word;
}

/* Floating Camera Controls */
.viewport-controls {
  position: absolute;
  bottom: 16px;
  right: 18px;
  display: flex;
  gap: 10px;
  z-index: 25;
}

.cam-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #0284C7;
  color: #0369A1;
  border-radius: 24px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.cam-btn:hover {
  background: #E0F2FE;
  transform: translateY(-2px);
}

.cam-btn:active {
  transform: scale(0.95);
  background: #FEF3C7;
}
