body {
	margin: 0;
	padding-top: 50px !important;
	background-color: #ffffff !important;
	background: url(/hunt/29/view/puzzle_bg.png);
	background-attachment: fixed;
	height: auto;
}

.main-bg {
	background-size: 100%;
	background-repeat: repeat;
	text-align: center;
}

.content-bg {
	display: inline-block;
	height: auto;
	margin-bottom: 100px;
	background-color: transparent;
}

#title-region {
	width: 100%;
	text-align: center;
	padding-top: 30px;
}

#hunt-title {
	width: 100%;
	max-width: 600px;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.main-region {
	background-color: transparent;
	width: 100%;
	text-align: center;
}

.white-bg {
	background-color: rgba(255, 255, 255, 0.9);
	max-width: 750px;
	text-align: center;
	margin-left: auto;
	margin-right: auto;
	padding: 20px
}

.header {
	font-size: 40px;
	font-style: italic;
	padding-top: 10px;
}

.puzzle-box {
	height: 150px;
	width: 200px;
	border: 1px solid black;
	text-align: center;
	margin: 10px;
	position: relative;
	display: inline-block;
	vertical-align: bottom;
	background-color: #D2B48C; 
	background-image: url("{% hunt_static %}frame.png"); /* TODO: fix this url */
	background-size: cover; 
	background-position: center;
	background-repeat: no-repeat;
	transition: transform 0.2s ease-in-out;
	/* Force background images on mobile */
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
}

/* Specific layout for puzzle arrangement: 3-2-1 pattern */
.puzzle-box {
	display: block;
}

.puzzle-box:hover {
	transform: scale(1.05); 
}

.puzzle-area {
	font-size: 18px;
	text-align: center;
}

.puzzle-table {
	margin: 0 auto;
	border-spacing: 0;
	border-collapse: separate;
}

.puzzle-table td {
	text-align: center;
	vertical-align: top;
	padding: 5px 0;
}

.row-content {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

/* Responsive behavior for narrow screens */
@media (max-width: 700px) {
	.row-content {
		flex-direction: column;
		align-items: center;
	}
	
	/* Ensure background images work on mobile */
	.puzzle-box {
		background-attachment: scroll !important;
		-webkit-transform: translateZ(0);
		transform: translateZ(0);
	}
	
	/* Fix main background image on mobile - override main_style.css */
	body {
		background-attachment: scroll !important;
		background-size: cover !important;
	}
}

/* Complete CSS reset for puzzle box links */
a:has(.puzzle-box) {
	all: unset !important;
	display: block !important;
	cursor: pointer !important;
	text-decoration: none !important;
}

/* Style the puzzle box container */
a .puzzle-box {
	position: relative !important;
	height: 150px !important;
	width: 200px !important;
	display: block !important;
}

/* Reset all text inside puzzle boxes */
a .puzzle-box p {
	all: unset !important;
	display: block !important;
	color: #000000 !important;
	font-size: 18px !important;
	text-align: center !important;
	text-decoration: none !important;
	margin: 0 !important;
}

/* Position puzzle name at top */
a .puzzle-box p:first-child {
	position: absolute !important;
	top: 10px !important;
	left: 0 !important;
	right: 0 !important;
}

/* Position answer at bottom */
a .puzzle-box p.answer {
	position: absolute !important;
	bottom: 5px !important;
	left: 0 !important;
	right: 0 !important;
	font-size: 20px !important;
}

/* Force normal text appearance for all puzzle box content */
a .puzzle-box *, 
a .puzzle-box p {
	color: #000000 !important;
	text-decoration: none !important;
	border-bottom: none !important;
	text-decoration-line: none !important;
	text-decoration-color: transparent !important;
	text-decoration-style: none !important;
	box-shadow: none !important;
	outline: none !important;
	border: none !important;
	background-image: none !important;
}

/* Override any pseudo-element underlines */
a .puzzle-box::before, 
a .puzzle-box::after, 
a .puzzle-box p::before, 
a .puzzle-box p::after {
	content: none !important;
	border-bottom: none !important;
	text-decoration: none !important;
	display: none !important;
}

/* Completely eliminate focus states that might cause underlines */
.puzzle-box a:focus, 
.puzzle-box a:focus-visible {
	outline: none !important;
	box-shadow: none !important;
	text-decoration: none !important;
	border: none !important;
}

.puzzle-box:hover p {
	text-shadow: none !important;
	color: #000000 !important;
}

.puzzle-box:hover p:first-child {
	text-decoration: underline;
}

.puzzle-box:hover .answer {
	text-decoration: none !important;
}

.victory {
	font-size: 25px;
}

.victory:hover {
	text-shadow: none !important;
	color: #000000 !important;
	text-decoration: underline;
}