@charset "utf-8";

.game-container {
	position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    width:100%;
    margin-bottom:15px;
}

/* 컴퓨터 아이콘 */
.player_box {
    display:flex;
    justify-content:space-between;
    width:100%;
	margin:0;
}

.player_box > div:nth-child(1) {margin-right:10px;}
.player_box > div:nth-child(2) {margin-left:10px;}

.player {
    flex:1;
	position:relative;
    text-align:center;
    margin:0;
    padding:0;
    border-radius:8px;
    box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-com {
    top:0%;
    left:50%;
    transform:translate(-50%, -50%);
	position:absolute;
	white-space:nowrap;
    margin:0 auto 15px;
    text-align:center;
    padding:0 20px;
	font-weight:bold;
	color:#fff;
    background:#333;
	height:30px;
	line-height:28px;
    border-radius:15px;
}

.player img {
    width:200px;
    height:auto;
    margin:30px 0 15px;
	border-radius:50%;
}

/* 사용자 입력 폼 박스 */
.player_form {
	position:relative;
	width:100%;
    margin-top:20px;
    text-align:center;
    padding:20px 0 0;
    border-radius:8px;
    box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);
}

.player_form form {
    margin-top:10px;
}

/* 선택 아이콘 */
.rps-options-title {
    top:0%;
    left:50%;
    transform:translate(-50%, -50%);
	position:absolute;
	white-space:nowrap;
    margin:0 auto 15px;
    text-align:center;
    padding:0 20px;
	font-weight:bold;
    background:#333;
	color:#fff;
	height:30px;
	line-height:28px;
    border-radius:15px;
}

.rps-options {
    display:flex;
    justify-content:center;
    gap:20px;
	padding:15px 0;
}

.rps-options label {
    cursor:pointer;
    display:inline-block;
}

.rps-options input[type="radio"] {
    display:none;
}

.rps-options img {
    width:90px;
    height:auto;
}

/* 참여 포인트 select */
.player_form select {
    padding:10px;
    font-size:16px;
    border-radius:5px;
    cursor:pointer;
    width:150px;
    transition:all 0.3s ease;
}

.player_form select:focus {
    outline: none;
}

.player_form select option {
    padding:10px;
    font-size:14px;
}

.player_form select:hover {
}

.guide {
	width:100%;
	margin-top:20px;
	padding:15px;
    border-radius:0 0 8px 8px;
}

/* 게임시작 버튼 */
.player_form button {
    margin-top:5px;
    padding:10px 20px;
    background:#007bff;
	font-weight:bold;
    color:#fff;
    border:none;
    border-radius:4px;
    cursor:pointer;
    font-size:1em;
    transition:background-color 0.3s;
}

.player_form button:hover {
    background:#0056b3;
}

/* 게임결과 로딩 팝업 */
.loading-overlay {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0, 0, 0, 0.7);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:10;
}

.loading-message {position:absolute;
	top:50%;
	left:50%;
	transform:translate(-50%, -50%);
    color:#fff;
    font-size:12px;
    font-weight:bold;
	z-index:11;
}

.spinner {
	border:10px solid #fff;
	border-top:10px solid #ef0638;
	border-radius:50%;
	width:130px;
	height:130px;
	animation:spin 1s linear infinite;
	margin:0 auto;
}

@keyframes spin {
    0% {transform:rotate(0deg);}
    100% {transform:rotate(360deg);}
}

/* 게임결과 팝업 */
.result-popup {
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    background:#000;
	color:#fff;
    padding:20px 20px 30px;
    border-radius:10px;
    box-shadow:0 4px 10px rgba(0, 0, 0, 0.2);
    z-index:1000;
    width:80%;
    max-width:400px;
    text-align:center;
}

.result-message {
    font-size:16px;
    margin-bottom:20px;
}

.close-popup {
    padding:10px 20px;
    background:#007bff;
    color:#fff;
    border:none;
    cursor:pointer;
}

.close-popup:hover {
    background:#0056b3;
}

.message_mt {
	width:100%;
	background:#333;
	font-weight:bold;
    color:#fff;
	margin-bottom:10px;
	padding:10px;
	border-radius:10px;
}

.message_md {
	width:100%;
	background:#333;
	font-weight:bold;
    color:#fff;
	margin-top:10px;
	padding:10px;
	border-radius:10px;
}

/* 게임 리스트 */
#rps-history {
	margin-bottom:20px;
}

.rps-history-box {
	flex-direction:column;
    border-radius:8px;
    width:100%;
    margin:0 auto;
	font-size:0.9em;
	overflow:hidden;
}

.rps-history-box img {
    max-width:20px;
}

.list_box {
	display:flex;
	flex-wrap:wrap;
	justify-content:space-between;
	border-bottom:none;
}

.list_box_title {
	font-weight:bold;
}

.list_box > div {
	flex:1 1 calc(100% / 7);
	text-align:center;
	padding:10px 5px;
	box-sizing:border-box;
	border-right: 1px solid var(--bs-border-color);
	border-bottom: 1px solid var(--bs-border-color);
}

.list_box > div:nth-child(7n) {
	border-right:none;
}

.list_box > div:nth-child(2) {
	flex:0 0 20%;
}

.list_box > div:not(:nth-child(2)) {
	flex:1 1 calc((100% - 20%) / 6);
}

/* 화면 너비가 768px 이하일 때 */
@media (max-width:768px) {
	.player img {
		width:100px;
		height:auto;
		margin:30px 0 15px;
		border-radius:50%;
	}

	.rps-options img {
		width:70px;
		height:auto;
	}
.list_box > div {
    border-right: 1px solid var(--bs-border-color);
  }
	.list_box > div {
		flex:1 1 calc(100% / 3);
	}

	.list_box > div:nth-child(n + 4) {
		flex:1 1 calc(100% / 4);
	}

	.list_box > div:nth-child(2) {
		flex:0 0 50%;
	}

	.list_box > div:not(:nth-child(2)) {
		flex:1 1 calc((100% - 50%) / 2);
	}

	.list_box > div:nth-child(3) {
		border-right: none;
	}
}

.list_btn {
	width:100%;
	text-align:center;
	margin:0;
}

.list_btn div {
	display:inline-block;
}
