@charset "utf-8";
/*    JavaScript 7th Edition
      Chapter 9
      Project 09-04

      Author: [Your Name]
      Date:   [Current Date]

      Filename: styles.css
*/

/* General Page Layout */
html {
   background-color: #f1f1f1;
   font-family: Arial, Helvetica, sans-serif;
}

body {
   width: 100%;
   max-width: 480px;
   margin: 20px auto;
   background-color: white;
   box-shadow: 0px 0px 20px rgb(120, 120, 120);
}

header {
   background-color: #3b5998;
   color: white;
   padding: 10px;
   text-align: center;
}

header h1 {
   font-size: 1.6em;
   margin: 0;
}

article {
   padding: 20px;
}

/* Controls and Timer Styling */
#puzzleButtons {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 20px;
   background-color: #e9ebee;
   padding: 10px;
   border-radius: 5px;
}

#startBtn {
   font-size: 1.1em;
   padding: 8px 16px;
   cursor: pointer;
   background-color: #42b72a;
   color: white;
   border: none;
   border-radius: 4px;
   font-weight: bold;
}

#startBtn:hover {
   background-color: #36a420;
}

#timer {
   width: 60px;
   font-size: 1.2em;
   text-align: center;
   padding: 4px;
   border: 1px solid #ccc;
   background-color: #fff;
}

/* Grid Layout for the Sliding Puzzle Pieces */
#puzzleGrid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   grid-gap: 4px;
   width: 360px;
   height: 360px;
   margin: 0 auto 20px auto;
   background-color: #333;
   border: 4px solid #333;
}

.pieces {
   background-color: #cbd5e1;
   background-size: cover;
   background-position: center;
   cursor: pointer;
   user-select: none;
   transition: background-color 0.2s;
}

.pieces:hover {
   filter: brightness(0.9);
}

/* Footer & High Score Display */
footer {
   margin-top: 20px;
   padding: 15px;
   background-color: #f6f7f9;
   border-top: 1px solid #ddd;
   text-align: center;
   font-size: 1.1em;
   color: #4b4f56;
}

#bestText {
   font-weight: bold;
   color: #3b5998;
}