/**
 * Estilo unificado Biblioteca: monstruos (monster_loot.php) + ítems (items.php).
 * Inspirado en el panel de game_library de htdocs1; no altera el mapeo PHP/XML.
 */

.library-browser {
	max-width: 980px;
	margin: 0 auto;
	background: linear-gradient(180deg, #faf6ec 0%, #f0e8d8 100%);
	border: 1px solid #a89272;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
	border-radius: 4px;
	padding: 18px 16px 22px;
	box-sizing: border-box;
}

.library-browser .items-hub {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	max-width: none;
	margin: 0;
}

/* --- monster_loot.php --- */
.library-browser .ml-inner {
	padding: 0;
}

.library-browser .ml-main-title {
	font-family: Georgia, "Times New Roman", Times, serif;
	text-align: center;
	font-size: 22pt;
	font-weight: 700;
	color: #3d2410;
	margin: 0 0 14px;
	text-shadow: 0 1px 0 #fff6e8;
}

.library-browser .ml-controls {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px 16px;
	background: linear-gradient(180deg, #e8dcc8 0%, #dccfb8 100%);
	border: 1px solid #7a6548;
	border-radius: 2px;
	padding: 12px 14px;
	margin-bottom: 14px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.library-browser .ml-controls label {
	display: block;
	font-weight: 700;
	font-size: 9pt;
	color: #4a2810;
	margin-bottom: 4px;
	font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.library-browser .ml-controls select {
	min-width: 88px;
	height: 30px;
	font-size: 10pt;
	font-family: Verdana, Geneva, Tahoma, sans-serif;
	border: 1px solid #7a6548;
	border-radius: 2px;
	background: #fff8ec;
	color: #2a1810;
}

.library-browser .ml-legend {
	font-size: 9pt;
	font-weight: 600;
	color: #5a4a38;
	line-height: 1.5;
	font-family: Verdana, Geneva, Tahoma, sans-serif;
	flex: 1 1 200px;
}

.library-browser .ml-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin: 0 3px 0 8px;
	vertical-align: middle;
}

.library-browser .d-always {
	background: #7a7a7a;
}
.library-browser .d-common {
	background: #47b35a;
}
.library-browser .d-uncommon {
	background: #3399ee;
}
.library-browser .d-rare {
	background: #e14b45;
}
.library-browser .d-veryrare {
	background: #9238d6;
}

.library-browser .ml-table-wrap {
	overflow-x: auto;
	margin-top: 4px;
}

.library-browser .ml-table {
	width: 100%;
	border-collapse: collapse;
	font-family: Verdana, Geneva, Tahoma, sans-serif;
	font-size: 10pt;
}

.library-browser .ml-table th {
	background: #505050;
	color: #f5f5f5;
	padding: 8px 10px;
	font-size: 10pt;
	font-weight: 700;
	text-align: left;
	border-bottom: 2px solid #3d3d3d;
}

.library-browser .ml-table td {
	padding: 10px 8px;
	vertical-align: top;
	border-bottom: 1px solid #b9a684;
}

.library-browser .ml-table tr:nth-child(even) td {
	background: #f1e0c6;
}

.library-browser .ml-table tr:nth-child(odd) td {
	background: #e8d4b4;
}

.library-browser .ml-creature-name {
	font-size: 11pt;
	font-weight: 700;
	color: #1a4d8c;
	line-height: 1.2;
	max-width: 280px;
	word-break: break-word;
}

.library-browser .ml-creature-img {
	display: block;
	max-width: 96px;
	height: auto;
	margin-top: 8px;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	image-rendering: crisp-edges;
}

.library-browser .ml-stat {
	font-size: 10pt;
	font-weight: 600;
	color: #3d2418;
	line-height: 1.45;
	white-space: nowrap;
}

.library-browser .ml-loot-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: flex-start;
}

.library-browser .ml-loot-cell {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	min-height: 34px;
	padding: 3px;
	background: #c8baa2;
	border: 2px solid #7a7a7a;
	box-sizing: border-box;
	border-radius: 2px;
}

.library-browser .ml-loot-cell.common {
	border-color: #47b35a;
}
.library-browser .ml-loot-cell.uncommon {
	border-color: #3399ee;
}
.library-browser .ml-loot-cell.rare {
	border-color: #e14b45;
}
.library-browser .ml-loot-cell.veryrare {
	border-color: #9238d6;
}
.library-browser .ml-loot-cell.always {
	border-color: #7a7a7a;
}

.library-browser .ml-loot-cell img {
	display: block;
	max-width: 32px;
	max-height: 32px;
	width: auto;
	height: auto;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	image-rendering: crisp-edges;
}

.library-browser .ml-loot-count {
	position: absolute;
	right: 1px;
	bottom: 0;
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	text-shadow: 1px 1px 1px #000;
	line-height: 1;
}

.library-browser .ml-pager {
	margin-top: 12px;
	font-size: 10pt;
	color: #5a4a38;
	font-family: Verdana, Geneva, Tahoma, sans-serif;
}

@media (max-width: 720px) {
	.library-browser .ml-legend {
		flex-basis: 100%;
		white-space: normal;
	}
}

/* --- game_library.php (enciclopedia) --- */
.library-browser .library-guide-section {
	margin-bottom: 22px;
	padding: 16px 18px;
	border: 1px solid rgba(255, 180, 90, 0.18);
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.22);
	box-sizing: border-box;
}

.library-browser .library-guide-section__title {
	color: #ffc801;
	font-size: 18px;
	margin: 0 0 10px;
	font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.library-browser .library-guide-section__body {
	color: #c7b5a9;
	line-height: 1.55;
	font-size: 14px;
}

.library-browser .library-guide-links {
	color: #8a7f7c;
	font-size: 12px;
	margin: 8px 0 0;
}

.library-browser .library-guide-links a {
	color: #ff9c00;
	font-weight: 700;
	text-decoration: none;
}

.library-browser .library-guide-links a:hover {
	text-decoration: underline;
}

.library-browser .library-guide-links__sep {
	margin: 0 6px;
	opacity: 0.7;
}
