/**
 * Monopoli Nusantara - Main Stylesheet
 * Tema Kasual Cerah & Segar (Vibrant Nusantara Board Game), Responsif PC & HP
 */

:root {
  --bg-primary: #E0F2FE;
  --bg-secondary: #F0F9FF;
  --bg-surface: rgba(255, 255, 255, 0.94);
  --bg-surface-elevated: #FFFFFF;

  --accent-gold: #D97706;
  --accent-gold-bright: #F59E0B;
  --accent-gold-dark: #B45309;
  --accent-emerald: #059669;
  --accent-danger: #E11D48;
  --accent-blue: #0284C7;

  --text-main: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;

  --border-glass: rgba(15, 23, 42, 0.12);
  --border-gold: rgba(217, 119, 6, 0.45);

  --shadow-luxe: 0 10px 30px rgba(2, 132, 199, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(135deg, #DBEAFE 0%, #E0F2FE 45%, #FEF3C7 100%);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/bg-nusantara.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

#app-container {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow: hidden;
}

/* --- Top Navigation Header (56px) --- */
.neopoly-topbar {
  height: 56px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 2px solid rgba(2, 132, 199, 0.18);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  flex-shrink: 0;
  z-index: 30;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.brand-logo-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #0369A1 0%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.round-pill {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1.5px solid #F59E0B;
  color: #92400E;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.turn-status-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  padding: 4px 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.active-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: #E0F2FE;
  border-color: #0284C7;
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: scale(0.92);
}

/* --- Main Play Stage --- */
.neopoly-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
}

/* --- Bottom Action Deck --- */
.neopoly-bottom-hud {
  min-height: auto;
  height: auto;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 2px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  padding: 10px 16px max(26px, calc(16px + env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 30;
}

.hud-deck-row {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 980px;
}

.hud-deck-row.top-row {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hud-player-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-left: 5px solid var(--player-accent, #F59E0B);
  padding: 6px 14px 6px 10px;
  border-radius: 12px;
  min-width: 195px;
  flex: 1 1 auto;
  max-width: 340px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.hud-player-avatar {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}

.hud-player-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.hud-player-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.hud-player-cash {
  font-size: 0.96rem;
  font-weight: 800;
  color: #047857 !important;
  line-height: 1.25;
  white-space: nowrap;
}

.hud-quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.btn-hud-action {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  color: #0F172A;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
  transition: all 0.15s ease;
}

@media (max-width: 640px) {
  .neopoly-bottom-hud {
    height: auto;
    min-height: auto;
    padding: 8px 10px max(30px, calc(20px + env(safe-area-inset-bottom, 0px)));
    gap: 6px;
  }
  .hud-deck-row {
    width: 100%;
    max-width: 100%;
  }
  .hud-deck-row.top-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }
  .hud-player-badge {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px 6px 10px;
    border-radius: 10px;
    flex: none;
  }
  .hud-player-avatar {
    font-size: 24px;
    margin-right: 6px;
  }
  .hud-player-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
  .hud-player-name {
    font-size: 0.88rem;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hud-player-cash {
    font-size: 0.95rem;
    font-weight: 800;
    color: #047857 !important;
    white-space: nowrap;
  }
  .hud-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    width: 100%;
    justify-content: stretch;
    flex: none;
  }
  .btn-hud-action {
    width: 100%;
    padding: 7px 3px;
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
    justify-content: center;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .btn-hud-primary {
    height: 42px;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 10px;
  }
}

.btn-hud-action:hover {
  background: #F0F9FF;
  border-color: #0284C7;
  color: #0369A1;
  transform: translateY(-1px);
}

.btn-hud-action:active {
  background: #FEF3C7;
  border-color: var(--accent-gold);
}

.btn-hud-primary {
  height: 44px;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* --- Common UI Buttons --- */
.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled,
button:disabled,
.btn[disabled],
button[disabled] {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  box-shadow: none !important;
  filter: grayscale(0.35) !important;
}

.btn-primary-gold {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 55%, #D97706 100%);
  color: #0F172A;
  border: 1.5px solid #B45309;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-secondary {
  background: #F1F5F9;
  color: #1E293B;
  border: 1.5px solid #CBD5E1;
}

.btn-outline {
  background: #FFFBEB;
  color: #B45309;
  border: 1.5px solid #F59E0B;
}

.btn-block {
  width: 100%;
}

.text-gold {
  color: #B45309 !important;
}

.text-success {
  color: #059669 !important;
}

.text-danger {
  color: #E11D48 !important;
}

.text-muted {
  color: #64748B !important;
}

.small {
  font-size: 0.8rem;
}

.mb-2 { margin-bottom: 8px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.text-center { text-align: center; }

@media (max-width: 540px) {
  .neopoly-topbar {
    height: 50px;
    padding: 0 10px;
  }
  .brand-title {
    font-size: 0.9rem;
  }
}
