/******************************************
/* CSS
/*******************************************/

/* Box Model Hack */
*{
  box-sizing: border-box;
}

.hidden{
  display: none;
}
/******************************************
/* LAYOUT
/*******************************************/
img{
  display: inline;
}

header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 80px;
}

header *{
  width: auto;
}
header > img{
  margin-right: 40%;
}

main{
  display: flex;
  margin: 30px 80px;
}

.active-game{
  flex-basis: 75%;
  margin-right: 30px;
}

aside{
  flex-basis: 25%;
}
.game-functions{
  display: flex;
  justify-content: space-between;
}
.player-input{
  flex-basis: 75%;
}

.instructions {
  display: flex;
  align-items: center;
}
.stats-tracking{
  flex-basis: auto;
  display:flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  align-self: flex-start;
}

ul{
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

table{
  width: 100%;
  border-collapse: collapse;
}
/******************************************
/* ADDITIONAL STYLES
/*******************************************/
button{
  padding:13px 30px;
  background: linear-gradient(145deg, #3498db, rgb(40, 40, 156));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  margin: 10px;
  transition: all 0.3x ease;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

body {
  background-color: lightyellow;
  font-family: 'Arial', sans-serif;
}

h1 {
  color: rgb(40, 40, 156);
}

header, .active-game, aside {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 10px 40px;
}

.stats-tracking{
  border: 2px solid rgb(40, 40, 156);
  border-radius: 10px;
}
.stats-tracking span{
  font-size: large;
  font-weight: bold;
}

.lives {
  color: red;
}
aside {
  text-align: center;
}
th, td{
  padding: 10px 5px;
}

td{
  background: linear-gradient(180deg, #f7db41, #f1d221);
}

tr{
  border-bottom: 3px solid white;
}

tr td:first-child{
  border-radius: 20px 0 0 20px;
  border-right: none;
}
tr td:last-child{
  border-radius: 0 20px 20px 0;
  border-right: none;
  width: 20px;
}

.player-input input{
  font-size: 18px;
}

.card {
  padding: 5px;
  text-align: center;
  border: 1px solid black;
  border-radius: 10px;
  max-width: 80px;
  margin: 10px;
  img{
    width: 60px;
  }
  h3{
    font-size: .8em;
    margin: 0 0 5px 0; 
    font-weight: 100;
  }
}

.modal-error-message{
  color: #e74c3c;
  font-size: 14px;
  margin-top:-8px;
  margin-bottom:10px;
  min-height: 18px;
  opacity:0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.modal-error-message.show{
  opacity:1;
  transform: translateY(0);
}

/******************************************
/* MODAL OVERLAYS
/*******************************************/

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Modal Content */
.modal {
  background: linear-gradient(145deg, rgb(40, 40, 156), rgb(46, 46, 175));
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
  transform: scale(0.7);
  animation: popIn 0.3s ease-out forwards;
  border: 2px solid #f1d221;
}

.modal p{
  color: #ecf0f1;
  margin-bottom: 20px;
}

.modal h2 {
  color: #ecf0f1;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal input, .modal select, .player-input input{
  padding: 12px;
  margin: 10px 0;
  border: none;
  border-radius: 10px;
  background-color: #ecf0f1;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.modal input, .modal select{
  width: 100%;
  font-size: 16px;
}

.modal input:focus, .modal select:focus {
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(52, 152, 219, 0.3);
  transform: translateY(-2px);
}

.modal-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-btn.confirm {
  background: linear-gradient(145deg, #27ae60, #2ecc71);
  color: white;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.modal-btn.confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.modal-btn.cancel {
  background: linear-gradient(145deg,#555555, #7a7a7a);
  color: white;
  /*box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);*/
}

.modal-btn.cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Animations */
  @keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}