/* DOSGames - browser-based MS-DOS game pages */

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
}

body.dosgames-page {
	font-family: Arial, "Times New Roman", Helvetica, Geneva, sans-serif;
	color: #0000AA;
	background-color: #CCCCCC;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.dosgames-header {
	flex: 0 0 auto;
	padding: 0.75rem 1rem;
	background: #BBBBBB;
	border-bottom: 2px solid #888888;
}

.dosgames-header h1 {
	margin: 0 0 0.25rem 0;
	font-size: 1.5rem;
}

.dosgames-header p {
	margin: 0;
	font-size: 0.95rem;
}

.dosgames-nav {
	margin-top: 0.5rem;
	font-size: 0.9rem;
}

.dosgames-nav a {
	color: #0000AA;
}

.dosgames-player-wrap {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: #111111;
}

#dos {
	flex: 1 1 auto;
	width: 100%;
	min-height: 480px;
	position: relative;
	overflow: hidden;
}

/* js-dos sizes/centering the canvas via inline styles (see Ga() in js-dos.js).
   Do not use !important on width/height — that overrides js-dos sizing but leaves
   its left/top centering offsets, which shifts the image right in Chromium. */
#dos .jsdos-rso,
#dos .emulator-root {
	width: 100%;
	height: 100%;
}

/* Fallback when games switch VGA modes and inline styles are cleared (js-dos issue #78).
   Without !important so js-dos inline styles take precedence when present. */
#dos canvas,
#dos .emulator-canvas,
.jsdos-rso canvas {
	display: block;
	width: 100%;
	height: 100%;
	min-width: 640px;
	min-height: 400px;
	max-width: 100%;
	max-height: 100%;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

.dosgames-footer {
	flex: 0 0 auto;
	padding: 0.75rem 1rem;
	font-size: 0.85rem;
	background: #BBBBBB;
	border-top: 2px solid #888888;
}

.dosgames-footer h2 {
	margin: 0 0 0.35rem 0;
	font-size: 1rem;
}

.dosgames-controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dosgames-controls li {
	margin: 0;
}

.dosgames-index {
	max-width: 900px;
	margin: 0 auto;
	padding: 1rem;
}

.dosgames-index ul {
	padding-left: 1.25rem;
}

.dosgames-index li {
	margin: 0.5rem 0;
}

.dosgames-tag {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: bold;
	padding: 0.1rem 0.45rem;
	margin-left: 0.35rem;
	background: #888888;
	color: #FFFFFF;
	border-radius: 3px;
	vertical-align: middle;
}

@media (max-width: 768px) {
	.dosgames-header h1 {
		font-size: 1.2rem;
	}

	#dos {
		min-height: 60vh;
	}
}
