/* ==========================================================================
   色カード 記憶ゲーム 専用スタイル
   ========================================================================== */

/* 3Dカードグリッド */
.card-grid {
	display: grid;
	gap: 10px;
	width: 100%;
	max-width: 400px;
	aspect-ratio: 1 / 1;
	margin: 20px auto;
	perspective: 1000px;
}

/* カード要素本体 */
.card {
	position: relative;
	width: 100%;
	height: 100%;
	cursor: default;
	transform-style: preserve-3d;
	transition: transform 0.3s ease-in-out;
}

/* 裏向き（通常）から表向きへフリップ */
.card.flipped {
	transform: rotateY(180deg);
}

.card-face {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 8px;
	backface-visibility: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
}

/* カード裏面 (デフォルト・回答待ち時) */
.card-back {
	background: #151a28;
	border: 2px solid #2d3748;
	box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
	transition: all 0.2s ease;
}

/* カード表面（色表示） */
.card-front {
	border: 2px solid rgba(255, 255, 255, 0.35);
	transform: rotateY(180deg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 出題位置の点滅 */
.card.card-blink .card-back {
	animation: card-blink-pulse 0.7s ease-in-out infinite;
	border-color: #00D2FF;
	background: #1c2a44;
}

@keyframes card-blink-pulse {
	0%, 100% {
		box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(0, 210, 255, 0.2);
		border-color: #2d3748;
		opacity: 1;
	}
	50% {
		box-shadow: inset 0 0 8px rgba(0, 210, 255, 0.35), 0 0 18px 4px rgba(0, 210, 255, 0.55);
		border-color: #00D2FF;
		opacity: 0.85;
	}
}

/* 「この場所の色は？」問題表示 */
#game-instruction.is-question {
	font-size: 2rem;
	line-height: 1.3;
	margin-bottom: 12px;
}

/* 色の選択肢 */
.color-choices {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
}

.color-choice-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 72px;
	padding: 10px 12px;
	background: #1a202c;
	border: 2px solid #2d3748;
	border-radius: 10px;
	color: #e2e8f0;
	cursor: pointer;
	transition: border-color 0.15s ease, transform 0.1s ease;
}

.color-choice-btn:hover {
	border-color: #4a5568;
	transform: translateY(-1px);
}

.color-choice-btn:active {
	transform: translateY(1px);
}

.color-choice-btn:disabled {
	opacity: 0.55;
	cursor: default;
	transform: none;
}

.color-choice-swatch {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.color-choice-label {
	font-size: 0.95rem;
	font-weight: bold;
	line-height: 1;
}

.color-choice-btn.is-correct {
	border-color: #00FA9A;
	box-shadow: 0 0 12px rgba(0, 250, 154, 0.35);
}

.color-choice-btn.is-wrong {
	border-color: #ff4d4d;
	box-shadow: 0 0 12px rgba(255, 77, 77, 0.35);
}

/* 出現する色一覧 */
.color-pool-demo-note {
	margin: 0 0 14px;
	font-size: 0.9rem;
	color: #718096;
	line-height: 1.5;
}

.color-pool-demo-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 12px;
}

.color-pool-demo-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	background: #1a202c;
	border: 1px solid #2d3748;
	border-radius: 10px;
}

.color-pool-demo-swatch {
	width: 100%;
	aspect-ratio: 1.4 / 1;
	border-radius: 8px;
	border: 2px solid rgba(255, 255, 255, 0.25);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.color-pool-demo-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.color-pool-demo-name {
	font-weight: bold;
	font-size: 0.95rem;
	color: #e2e8f0;
}

.color-pool-demo-hex {
	font-size: 0.8rem;
	color: #a0aec0;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	word-break: break-all;
}
