/*    JavaScript 7th Edition
      Chapter 10
      Project 10-04

      Chess Board Move Builder Style Sheet
      Author: Your Name
      Date:   November 5, 2026

      Filename: project10-04_styles.css
*/

/* Reset basic spacing styles */
* {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}

body {
   background-color: #f4f4f6;
   font-family: Arial, sans-serif;
   color: #333;
}

header {
   background-color: #2b2b2b;
   color: #ffffff;
   padding: 20px;
   text-align: center;
}

header h1 {
   font-size: 2rem;
   letter-spacing: 1px;
}

/* Flex layout containing the main interface elements */
section {
   display: flex;
   justify-content: center;
   align-items: flex-start;
   gap: 30px;
   max-width: 1200px;
   margin: 40px auto;
   padding: 0 20px;
}

/* White Box and Black Box containers holding spare/captured pieces */
#whiteBox, #blackBox {
   width: 220px;
   min-height: 400px;
   background-color: #ffffff;
   border: 2px solid #cbd5e1;
   border-radius: 8px;
   padding: 15px;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
   text-align: center;
}

#whiteBox h2, #blackBox h2 {
   font-size: 1.1rem;
   margin-bottom: 15px;
   padding-bottom: 5px;
   border-bottom: 2px solid #e2e8f0;
}

#whiteBox h2 { color: #475569; }
#blackBox h2 { color: #0f172a; }

/* Styles for individual draggable pieces */
span.pieces {
   display: inline-block;
   font-size: 42px;
   width: 45px;
   height: 45px;
   line-height: 45px;
   text-align: center;
   cursor: grab;
   user-select: none;
   transition: transform 0.1s ease;
}

span.pieces:active {
   cursor: grabbing;
   transform: scale(1.1);
}

/* Table layout styling for the 8x8 chessboard matrix */
table#chessboard {
   border-collapse: collapse;
   border: 4px solid #475569;
   box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

table#chessboard td {
   width: 65px;
   height: 65px;
   text-align: center;
   vertical-align: middle;
   padding: 0;
}

/* Standard Chessboard alternating grid colors using structural CSS pseudo-selectors */
table#chessboard tr:nth-child(odd) td:nth-child(odd),
table#chessboard tr:nth-child(even) td:nth-child(even) {
   background-color: #f0d9b5; /* Light square tone */
}

table#chessboard tr:nth-child(odd) td:nth-child(even),
table#chessboard tr:nth-child(even) td:nth-child(odd) {
   background-color: #b58863; /* Dark square tone */
}