/* BSMS Chess Arena Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #302e2b;
  color: #dbd9d6;
  overflow-x: hidden;
}

/* Base Chessboard Grid */
.grid {
  display: grid !important;
}

.grid-cols-8 {
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
}

.grid-rows-8 {
  grid-template-rows: repeat(8, minmax(0, 1fr)) !important;
}

.grid-cols-7 {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

/* Aspect Ratio */
.aspect-square {
  aspect-ratio: 1 / 1 !important;
}

/* Flexbox Layouts */
.flex {
  display: flex !important;
}

.inline-flex {
  display: inline-flex !important;
}

.flex-col {
  flex-direction: column !important;
}

.flex-row {
  flex-direction: row !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.items-center {
  align-items: center !important;
}

.items-start {
  align-items: flex-start !important;
}

.justify-center {
  justify-content: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.justify-end {
  justify-content: flex-end !important;
}

.flex-1 {
  flex: 1 1 0% !important;
}

.shrink-0 {
  flex-shrink: 0 !important;
}

/* Sizing */
.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.w-screen { width: 100vw !important; }
.h-screen { height: 100vh !important; }
.min-h-screen { min-height: 100vh !important; }
.w-3 { width: 0.75rem !important; }
.h-3 { height: 0.75rem !important; }
.w-3\.5 { width: 0.875rem !important; }
.h-3\.5 { height: 0.875rem !important; }
.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.w-5 { width: 1.25rem !important; }
.h-5 { height: 1.25rem !important; }
.w-6 { width: 1.5rem !important; }
.h-6 { height: 1.5rem !important; }
.w-8 { width: 2rem !important; }
.h-8 { height: 2rem !important; }
.w-9 { width: 2.25rem !important; }
.h-9 { height: 2.25rem !important; }
.w-10 { width: 2.5rem !important; }
.h-10 { height: 2.5rem !important; }
.w-14 { width: 3.5rem !important; }
.h-14 { height: 3.5rem !important; }
.min-w-0 { min-width: 0 !important; }

/* Positioning */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed { position: fixed !important; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; !important; }
.inset-0\.5 { top: 0.125rem; right: 0.125rem; bottom: 0.125rem; left: 0.125rem; !important; }
.inset-1 { top: 0.25rem; right: 0.25rem; bottom: 0.25rem; left: 0.25rem; !important; }
.top-0 { top: 0 !important; }
.top-0\.5 { top: 0.125rem !important; }
.bottom-0 { bottom: 0 !important; }
.bottom-0\.5 { bottom: 0.125rem !important; }
.left-0 { left: 0 !important; }
.left-1 { left: 0.25rem !important; }
.right-0 { right: 0 !important; }
.right-0\.5 { right: 0.125rem !important; }
.right-1 { right: 0.25rem !important; }
.z-0 { z-index: 0 !important; }
.z-10 { z-index: 10 !important; }
.z-20 { z-index: 20 !important; }
.z-25 { z-index: 25 !important; }
.z-30 { z-index: 30 !important; }
.z-50 { z-index: 50 !important; }

/* Margins & Paddings */
.p-1 { padding: 0.25rem !important; }
.p-1\.5 { padding: 0.375rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-2\.5 { padding: 0.625rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-3\.5 { padding: 0.875rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
.px-1\.5 { padding-left: 0.375rem !important; padding-right: 0.375rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-3\.5 { padding-left: 0.875rem !important; padding-right: 0.875rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-0\.5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-3\.5 { padding-top: 0.875rem !important; padding-bottom: 0.875rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }

/* Rounded */
.rounded-sm { border-radius: 0.125rem !important; }
.rounded { border-radius: 0.25rem !important; }
.rounded-md { border-radius: 0.375rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-full { border-radius: 9999px !important; }

/* Board Theme Colors */
.bg-\[\#739552\] { background-color: #739552 !important; }
.text-\[\#739552\] { color: #739552 !important; }
.bg-\[\#ebecd0\] { background-color: #ebecd0 !important; }
.text-\[\#ebecd0\] { color: #ebecd0 !important; }

.bg-\[\#b58863\] { background-color: #b58863 !important; }
.text-\[\#b58863\] { color: #b58863 !important; }
.bg-\[\#f0d9b5\] { background-color: #f0d9b5 !important; }
.text-\[\#f0d9b5\] { color: #f0d9b5 !important; }

.bg-\[\#4b7399\] { background-color: #4b7399 !important; }
.text-\[\#4b7399\] { color: #4b7399 !important; }
.bg-\[\#eae9d2\] { background-color: #eae9d2 !important; }
.text-\[\#eae9d2\] { color: #4b7399 !important; }

.bg-\[\#8b1e2f\] { background-color: #8b1e2f !important; }
.text-\[\#8b1e2f\] { color: #8b1e2f !important; }
.bg-\[\#f3e5e8\] { background-color: #f3e5e8 !important; }
.text-\[\#f3e5e8\] { color: #8b1e2f !important; }

/* UI Dark Backgrounds */
.bg-\[\#141310\] { background-color: #141310 !important; }
.bg-\[\#161512\] { background-color: #161512 !important; }
.bg-\[\#1c1b18\] { background-color: #1c1b18 !important; }
.bg-\[\#1b1a17\] { background-color: #1b1a17 !important; }
.bg-\[\#21201d\] { background-color: #21201d !important; }
.bg-\[\#262522\] { background-color: #262522 !important; }
.bg-\[\#302e2b\] { background-color: #302e2b !important; }
.bg-\[\#403d39\] { background-color: #403d39 !important; }
.bg-\[\#81b64c\] { background-color: #81b64c !important; }
.text-\[\#81b64c\] { color: #81b64c !important; }

/* Piece and Board Interactions */
.select-none { user-select: none !important; }
.cursor-pointer { cursor: pointer !important; }
.pointer-events-none { pointer-events: none !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-y-auto { overflow-y: auto !important; }
.truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Animations */
@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}
.animate-ping {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse {
  50% {
    opacity: .5;
  }
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes alienFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-3px) scale(1.04); }
}
.alien-float-anim {
  animation: alienFloat 2.2s ease-in-out infinite;
}
