body {
	margin: 0;
	padding: 20px 10px;
	background: #111111;
	font-family: "Segoe UI", sans-serif;
	color: #fff;
	animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* ===== 共通ヘッダー ===== */
.game-thumb {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.thumb-left img {
	max-width: 700px;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.image-title {
	text-align: center;
	margin: 0;
	font-size: 20px;
	color: #fff;
	text-shadow: 0 0 6px #ffa500;
}

.sub-title1,
.sub-title2 {
	text-align: center;
	margin: 0;
	font-size: 13px;
	color: rgb(255, 142, 233);
	text-shadow: 0 0 8px #ff00cc;
}

@media (min-width: 768px) {

	.sub-title1,
	.sub-title2 {
		font-size: 19px;
	}
}

/* ボタン群 */
.button-group {
	margin-top: 20px;
	display: flex;
	gap: 20px;
}

/*スタートボタン*/
#startBtn {
	align-items: center;
	margin: 15px auto;
	padding: 15px 30px;
	font-size: 25px;
	font-family: 'Segoe UI', sans-serif;
	background-color: #00ffe7;
	border: none;
	color: #fff;
	font-weight: bold;
	border-radius: 10px;
	box-shadow: 0 0 12px #00ffe7, 0 0 24px #00ffe7;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	text-shadow:
		1px 1px 0 #a9a9a9,
		-1px 1px 0 #a9a9a9,
		1px -1px 0 #a9a9a9,
		-1px -1px 0 #a9a9a9,
		1px 0 0 #a9a9a9,
		-1px 0 0 #a9a9a9,
		0 1px 0 #a9a9a9,
		0 -1px 0 #a9a9a9;
}

#startBtn:hover {
	transform: scale(1.05);
	box-shadow: 0 0 16px #00ffe7, 0 0 32px #00ffe7;
}

/*プレイ中は非活性*/
#startBtn.dissabled {
	background: #a9a9a9;
	color: black;
	border: none;
	box-shadow: none;
	pointer-events: none;
}

@media (min-width: 768px) {

	.sub-title1,
	.sub-title2 {
		font-size: 19px;
	}
}

#levelDisplay {
	text-align: center;
	color: orange;
	font-weight: bold;
	font-size: 45px;
	text-shadow: 0 0 8px orange;
	margin-top: 3px;
}

:root {
	--hover-glow: #ffe08a;
}

#gameContainer {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 5px;
	margin: 10px auto;
	padding: 20px;
	border: 2px solid #00ffe7;
	box-shadow: 0 0 25px #00ffe7;
	background: #111;
	border-radius: 20px;
	max-width: 350px;
}

.pad {
	width: 100%;
	border-radius: 20%;
	background: #000;
	border: 2px solid #ffb000;
	cursor: pointer;
	box-shadow: inset 0 0 4px #000;
	opacity: 0.95;
	transition: 0.15s;
	position: relative;
	aspect-ratio: 1 / 1;
	perspective: 1000px;
	cursor: pointer;
	outline: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	cursor: pointer;
}

.pad.active {
	background: #ffd16f;
	transform: scale(1.1);
	opacity: 1;
	box-shadow: 0 0 20px #ffb000,
		0 0 35px #ffb000;
}

/* 入力無効 */
#gameContainer.inactive .pad {
	pointer-events: none;
	cursor: default;
}

/* PCだけhover */
@media (hover: hover) and (pointer: fine) {
	.pad:hover {
		box-shadow: 0 0 15px var(--hover-glow),
			0 0 30px var(--hover-glow);
		border-color: var(--hover-glow);
		opacity: 1;
	}
}

/* スマホ対策：activeを無効化 */
@media (hover: none) {
	.pad:active {
		transform: none;
		box-shadow: inset 0 0 4px #000;
		opacity: 0.95;
	}

	button:active {
		transform: none;
		box-shadow: 0 0 12px #00ffe7, 0 0 24px #00ffe7;
	}
}

.pad.correct {
	background: #de3838;
	border: 2px solid #ff4040;
	box-shadow: 0 0 20px #ff4040,
		0 0 35px #ff4040;
}

.pad.incorrect {
	background: #3864de;
	border: 2px solid #4173ff;
	box-shadow: 0 0 20px #4173ff,
		0 0 35px #4173ff;
}

#gameContainer.inactive {
	opacity: 0.6;
}

.logo-footer {
	text-align: center;
	margin-top: 30px;
}

.logo-footer a {
	display: inline-block;
}

.logo-footer img {
	max-width: 75px;
	width: 100%;
	height: auto;
	opacity: 0.6;
	transition: opacity 0.3s;
}

.logo-footer img:hover {
	opacity: 1;
}

@media (min-width: 768px) {

	#startButton,
	#retryButton {
		font-size: 20px;
		padding: 14px 28px;
	}
}

.game-description {
    background: rgba(128, 128, 128, 0.5);
    padding: 15px 20px;
    border-radius: 10px;
    text-align: left;
    font-size: 12px;
    max-width: 80%;
    color: #fff;
    text-shadow: 0 0 10px rgb(255, 242, 253), 0 0 20px rgb(255, 242, 253);
	grid-column: 1 / -1;
    justify-self: center;
}

.description-title {
    text-align: center !important;
    font-size: 14px !important;
    margin-top: 5px;
}

.closing-phrase {
    text-align: center !important;
    font-size: 16px !important;
	font-weight: bold;
}

.game-description ul {
    width: fit-content;
    margin: 0 auto;
    padding-left: 0;
    text-align: left;
    list-style: none;
}

.game-description li {
    margin-bottom: 6px;
}