body {
    background-color: #e9e7fd;
}

/* Main Container */
#main-container {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

/* Player Details */
#player {
    background-color: #d5deff;
    border: 8px solid #4f3ff0;
    border-radius: 10px;
    margin-top: 50px;
    padding: 20px;
    width: 80%;
    max-width: 550px;
}
fieldset {
	height: 40vh;
	border:#3f2fd0 2px solid;
	box-shadow: 2px 3px 7px grey;
}
#player-type {
    color: #4f3ff0;
    font-family: "Poppins", sans-serif;
    letter-spacing: 5px;
    text-align: center;
    text-transform: uppercase;
}
#grid-config {
	background-color: #d5deff;
    border: 3px solid #4f3ff0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 80%;
    max-width: 550px;
    position: absolute;
    align-items: flex-end;
  }
  .input-group {
	display: flex;
	flex-direction: column;
	margin: 10px;
  }
  
  .input-group label {
	margin-bottom: 5px;
	color: #4f3ff0;
	font-family: "Poppins", sans-serif;
  }
  
  .input-group input {
	width: 60px;
	padding: 5px;
	border: 1px solid #4f3ff0;
	border-radius: 4px;
  }
  
  #update-grid {
	background-color: #4f3ff0;
	color: #d5deff;
	border: none;
	border-radius: 5px;
	padding: 10px 20px;
	font-family: "Poppins", sans-serif;
	cursor: pointer;
	transition: 0.3s;
  }
  
  #update-grid:hover {
	background-color: #3f2fd0;
  }
/* Grid */
#grid {
    background-color: #4f3ff0;
    border: 3.5px solid #d5deff;
    border-radius: 8px;
    box-shadow: 2px 3px 7px grey;
    margin-top: 20px;
    padding: 3px;
    width: 80vmin;
    height: 80vmin;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
}

.row {
    display: flex;
    flex-grow: 1;
    margin: 0 -1px; /* 负边距可以帮助处理间隙问题 */
}

.col {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    background-color: #d5deff;
    border: 1px solid #4f3ff0;
    border-radius: 5px;
    margin: 1px;
}

.btn {
    background-color: transparent;
    border: none;
    color: transparent;
    height: 100%;
    padding: 0;
    width: 100%;
}

#reset-btn {
    background-color: transparent;
    border: 2px solid #4f3ff0;
    border-radius: 5px;
    color: #4f3ff0;
    font-family: "Poppins", sans-serif;
    font-size: 1.5rem;
    margin: 50px 0;
    padding: 10px 40px;
    text-transform: uppercase;
    transition: 0.7s;
}

#reset-btn:hover {
    background-color: #4f3ff0;
    color: #d5deff;
    cursor: pointer;
    transition: 0.7s;
}

/* Player - 1 Buttons */
.btn-player-1 {
    background-color: #34c471;
    border-radius: 50%;
    color: red;
}

/* Player - 2 Buttons */
.btn-player-2 {
    background-color: #df3670;
    border-radius: 50%;
    color: red;
}

/* Media Queries */
@media (max-width: 800px) {
    #player {
        max-width: 450px;
    }

    #reset-btn {
        font-size: 1.2rem;
    }
}

@media (max-width: 550px) {
    #player {
        max-width: 350px;
    }

    #reset-btn {
        font-size: 1rem;
    }
}

@media (max-width: 450px) {
    #player {
        align-items: center;
        display: flex;
        border-width: 5px;
        justify-content: center;
        height: 30px;
        width: 78%;
    }

    #player-type {
        font-size: 1.2rem;
    }

    #reset-btn {
        font-size: 0.8rem;
    }
}