@charset "utf-8";

.game-container {
    padding:20px;
    background:#f9f9f9;
    border:1px solid #ddd;
    border-radius:8px;
    width:100%;
    margin:10px auto;
}

/* 회전판 전체 */
#game-wheel-bg {
    max-width:400px;
    max-height:400px;
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
    margin:0 auto;
}

/* 회전판 박스 */
#game-wheel {
    width:100%;
    max-width:500px;
    aspect-ratio:1;
    border-radius:50%;
    position:relative;
    overflow:hidden;
    display:flex;
    justify-content:center;
    align-items:center;
	z-index:3;
}

/* 회전 */
#wheel-segments {
    top:0;
    left:0;
    width:100%;
    height:100%;
    position:absolute;
    transition:transform 3s ease-out;
    transform-origin:center;
}

/* 회전 이미지 */
#wheel-segments img {
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* 회전 가운데 이미지 */
#spinner {
	top:50%;
    left:50%;
	width:44%;
	height:44%;
	position:absolute;
	transform:translate(-50%, -50%);
	border-radius:50%;
	z-index:10;
}

#rps-gif {
	width:100%;
	height:100%;
}

/* 핀 이미지 */
.pin {
	top:14%;
	right:13.2%;
	width:30px;
	height:30px;
	position:absolute;
	z-index:9;
}

.pin img {
	width:100%;
	height:100%;
	display:block;
}

/* 결과 팝업 */
#result-popup {
    top:50%;
    left:50%;
	width:100%;
    max-width:200px;
	display:none;
    position:absolute;
    transform:translate(-50%, -50%);
    background:rgba(0, 0, 0, 0.8);
    padding:20px 20px 30px;
    border-radius:10px;
    box-shadow:0 4px 10px rgba(0, 0, 0, 0.2);
    text-align:center;
	font-size:0.9em;
	color:#fff;
	z-index:999;
}

#result-popup img {
	max-width:20px;
}

#result-popup span {
	font-weight:bold;
	font-size:1.5em;
}

#close-popup {
	margin-top:10px;
    padding:10px 20px;
    background:#007bff;
    color:#fff;
    border:none;
    cursor:pointer;
	border-radius:5px;
	z-index:1000;
}

#close-popup:hover {
    background:#0056b3;
}

.message_mt {
	width:100%;
	background:#777;
	font-weight:bold;
    color:#fff;
	margin-bottom:10px;
	padding:10px;
	border-radius:10px;
}

/* 결과 배경 이미지 */
.tw1 {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
	z-index:1;
}

.tw1 img {
	width:100%;
	height:100%;
	display:block;
}

/* 사용자 입력 폼 박스 */
.player_form {
	position:relative;
	width:100%;
    margin-top:25px;
    text-align:center;
    padding:0;
    background:#ffffff;
    border:1px solid #ccc;
    border-radius:8px;
    box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 포인트 선택 */
.rps-options2 {
    display:flex;
    justify-content:center;
    gap:10px;
	padding:30px 0 10px;
}

.rps-options2 label {
    cursor:pointer;
    display:inline-block;
}

.rps-options2 input[type="radio"] {
    display:none;
}

.rps-options2 div {
	border-radius:10px;
	background:#f1f1f1;
	color: #555;
	padding:0 10px;
	display:inline-block;
	height:20px;
	line-height:20px;
}

.rps-options2 div.selected-div {
	border-radius:10px;
	background:#333;
	color: #fff;
	padding:0 10px;
	display:inline-block;
	height:20px;
	line-height:20px;
}

/* 선택 아이콘 */
.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;
    background:#333;
	color:#fff;
    border:1px solid #ccc;
	height:30px;
	line-height:28px;
    border-radius:15px;
}

.rps-options {
    display:flex;
    justify-content:center;
    gap:0 20px;
	padding:0 0 10px;
}

.rps-options label {
    cursor:pointer;
    display:inline-block;
}

.rps-options input[type="radio"] {
    display:none;
}

.rps-options img {
    width:90px;
    height:auto;
}

.guide {
	width:100%;
	background:#f9f9f9;
	margin-top:15px;
	padding:15px;
	border-top:1px solid #ccc;
    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;
}

/* 게임 리스트 */
#rps-history {
	display:flex;
}

.rps-history-box {
	display:flex;
	flex-direction:column;
	padding:5px;
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
    width:100%;
    margin:0 auto;
	font-size:0.9em;
}

.rps-history-box img {
    max-width:20px;
}

.list_box {
	display:flex;
	flex-wrap:wrap;
	justify-content:space-between;
	border-bottom:none;
}

.list_box_title {
	background:#ddd;
	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 #ddd;
	border-bottom:1px solid #ddd;
}

.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) {
	#game-wheel-bg {
		max-width:250px;
		max-height:250px;
		position:relative;
		display:flex;
		justify-content:center;
		align-items:center;
		overflow:hidden;
		margin:0 auto;
	}

	.player img {
		width:100px;
		height:auto;
		margin-top:10px;
	}

	.rps-options img {
		width:60px;
		height:auto;
	}

	.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(3n) {
		border-right:none;
	}

	/* 포인트 선택 */
	.rps-options2 {
		display:flex;
		justify-content:center;
		gap:5px;
		padding-bottom:10px;
	}

	/* 핀 이미지 */
	.pin {
		top:13%;
		right:11%;
		width:28px;
		height:28px;
		position:absolute;
		z-index:999;
	}

	.pin img {
		width:100%;
		height:100%;
		display:block;
	}
}

.list_box:last-child {
	border-bottom:1px solid #ddd;
}

.list_btn {
	width:100%;
	text-align:center;
	margin:15px 0 10px;
}

.list_btn div {
	display:inline-block;
}