/**
 * Mapas Games — front-end styles.
 * Minimal, theme-friendly, and namespaced under .mapas-*.
 */

.mapas-catalog {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
}

.mapas-card {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 12px;
	padding: 16px;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mapas-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mapas-card__title { margin: 0; font-size: 1.1rem; }
.mapas-card__desc { color: #555; font-size: 0.9rem; margin: 0; }
.mapas-card__best { font-weight: 600; font-size: 0.85rem; margin: 0; }
.mapas-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; font-size: 0.8rem; }
.mapas-card__actions { margin-top: auto; display: flex; gap: 8px; padding-top: 8px; }

.mapas-chip { padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; background: #eef2ff; color: #3730a3; }
.mapas-chip--practitioner { background: #fef3c7; color: #92400e; }
.mapas-chip--expert { background: #fee2e2; color: #991b1b; }
.mapas-stars { color: #f59e0b; letter-spacing: 1px; }
.mapas-badge--new { background: #10b981; color: #fff; padding: 1px 7px; border-radius: 999px; font-size: 0.68rem; }

.mapas-btn {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	background: #f8fafc;
	color: #111;
	text-decoration: none;
	font-size: 0.9rem;
	cursor: pointer;
}
.mapas-btn-primary { background: #4f46e5; border-color: #4f46e5; color: #fff; }

.mapas-gate { border: 1px dashed rgba(0, 0, 0, 0.2); border-radius: 12px; padding: 24px; text-align: center; }

/* Play screen */
.mapas-play { position: relative; }
.mapas-play__hud { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; font-weight: 600; }
.mapas-play__name small { color: #888; font-weight: 400; }
.mapas-play__stage { position: relative; width: 100%; }
.mapas-play__frame { width: 100%; min-height: 720px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 12px; background: #fff; }

/* Overlay */
.mapas-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.mapas-overlay[hidden] { display: none; }
.mapas-overlay__panel { background: #fff; border-radius: 16px; padding: 28px; max-width: 420px; width: 90%; text-align: center; }
.mapas-overlay__title { margin: 0 0 12px; }
.mapas-ov__score { font-size: 2.6rem; font-weight: 800; margin: 4px 0; }
.mapas-ov__pb { color: #059669; font-weight: 700; }
.mapas-ov__pb.muted { color: #64748b; font-weight: 500; }
.mapas-ov__rank { color: #4f46e5; font-weight: 600; }
.mapas-ov__xp { font-weight: 600; }
.mapas-ov__streak { color: #ea580c; font-weight: 600; }
.mapas-ov__error { color: #b91c1c; }
.mapas-overlay__actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.mapas-overlay__rating { margin-top: 12px; }
.mapas-rate__star { font-size: 1.6rem; background: none; border: none; color: #cbd5e1; cursor: pointer; }
.mapas-rate__star.is-on { color: #f59e0b; }
.mapas-overlay__rating.is-done::after { content: "Thanks for rating!"; display: block; color: #059669; font-size: 0.85rem; }

/* Leaderboard */
.mapas-board__tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.mapas-board__tab { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: #333; background: #f1f5f9; }
.mapas-board__tab.is-active { background: #4f46e5; color: #fff; }
.mapas-board__table { width: 100%; border-collapse: collapse; }
.mapas-board__table th, .mapas-board__table td { padding: 8px 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); text-align: left; }
.mapas-board__table tr.is-you { background: #eef2ff; font-weight: 700; }

/* Profile */
.mapas-profile__stats { list-style: none; padding: 0; display: flex; gap: 24px; }
.mapas-profile__stats strong { display: block; font-size: 1.5rem; }
.mapas-progress { height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; max-width: 420px; }
.mapas-progress__fill { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #a855f7); }

.mapas-empty { padding: 16px; color: #555; }
