/* 
   JavaScript 7th Edition
   Chapter 8
   Hands-on Project 8-2

   Author: [Your Name]
   Date: [Current Date]
   Filename: styles.css
*/

/* apply a natural box layout model to all elements */
* {
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;  
}

/* Structural Styles */
html {
   background-color: #f1f1f1;
   font-family: Arial, Helvetica, sans-serif;
}

body {
   max-width: 960px;
   padding: 10px;
   margin: 0px auto;
   background-color: white;
}

header {
   background-color: #3f51b5;
   color: white;
   padding: 10px 20px;
   margin-bottom: 20px;
}

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

section, article {
   padding: 20px;
   display: flex;
   flex-direction: column;
   align-items: center;
}

h1 {
   font-size: 1.8em;
   color: #333;
   margin-top: 0;
}

/* Container Box Style */
#box, #container {
   position: relative;
   border: 5px solid #3f51b5;
   background-color: #e8eaf6;
   margin-bottom: 20px;
   overflow: hidden;
   /* Box initial dimensions are managed dynamically by JS constants, 
      but fallbacks match the 800x400 assignment specifications */
   width: 800px;
   height: 400px;
}

/* Ball Styles dynamically rendered inside the container */
.ball {
   position: absolute;
   border-radius: 50%;
   background-color: #ff4081;
   opacity: 0.85;
   box-shadow: inset -5px -5px 10px rgba(0,0,0,0.3);
}

#ballImage {
   position: absolute;
}

/* UI Control Buttons */
#controls {
   margin-top: 10px;
}

input[type="button"] {
   background-color: #ff4081;
   color: white;
   border: none;
   padding: 12px 24px;
   font-size: 1.1em;
   cursor: pointer;
   border-radius: 4px;
   box-shadow: 0px 3px 5px rgba(0,0,0,0.2);
}

input[type="button"]:hover {
   background-color: #f50057;
}