/* Mots cachés - phpBB extension */
.motscaches-title .small { font-weight: normal; font-size: 0.7em; }

.motscaches-columns { display: flex; flex-wrap: wrap; gap: 12px; }
.motscaches-main { flex: 2 1 420px; min-width: 0; }
.motscaches-side { flex: 1 1 260px; min-width: 0; }
/* prosilver reserves 440px for the columns of a forum list: not wanted in the narrow side column */
.motscaches-side ul.topiclist dt, .motscaches-side ul.topiclist li.header dt { width: auto; margin-right: 0; float: none; }
.motscaches-side ul.topiclist .list-inner, .motscaches-side ul.topiclist li.header .list-inner { margin-right: 0; padding-right: 0; }

.motscaches-level { display: block; margin-bottom: 6px; }
.motscaches-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.motscaches-stats li { flex: 1 1 110px; text-align: center; padding: 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.04); }
.motscaches-stats li span { display: block; font-size: 0.9em; opacity: 0.8; }
.motscaches-stats li strong { font-size: 1.5em; }

.motscaches-rank-line { padding: 6px 8px; }
.motscaches-right { float: right; }
.motscaches-pos { display: inline-block; min-width: 1.8em; text-align: center; font-weight: bold; }
.motscaches-pos-1 { color: #c9a400; }
.motscaches-pos-2 { color: #8a8a8a; }
.motscaches-pos-3 { color: #a0612a; }
.motscaches-last { list-style: none; margin: 0; padding: 0; }
.motscaches-last li { padding: 4px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.motscaches-periods { float: left; }
.motscaches-active { font-weight: bold; box-shadow: inset 0 0 0 2px #105289; }

/* Game */
.motscaches-game { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.motscaches-board { flex: 1 1 360px; max-width: 640px; }
.motscaches-toolbar { display: flex; justify-content: space-between; font-size: 1.2em; margin-bottom: 6px; }
.motscaches-grid-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; user-select: none; -webkit-user-select: none; touch-action: none; }
.motscaches-grid { position: absolute; inset: 0; display: grid; border: 2px solid #105289; border-radius: 6px; background: #fff; }
.motscaches-cell {
	display: flex; align-items: center; justify-content: center;
	font: bold clamp(11px, 2.6vw, 22px) "Trebuchet MS", Arial, sans-serif;
	color: #222; cursor: pointer; position: relative; z-index: 2;
}
.motscaches-cell:hover { background: rgba(16, 82, 137, 0.08); }
.motscaches-cell.motscaches-anchor { background: rgba(16, 82, 137, 0.25); border-radius: 50%; }
.motscaches-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.motscaches-over .motscaches-cell { cursor: default; }
.motscaches-shake { animation: motscaches-shake 0.35s; }
@keyframes motscaches-shake {
	25% { transform: translateX(-4px); }
	50% { transform: translateX(4px); }
	75% { transform: translateX(-2px); }
}

.motscaches-words { flex: 0 1 240px; }
.motscaches-words ul { list-style: none; margin: 0 0 8px; padding: 0; columns: 2; }
.motscaches-words li { padding: 2px 0; font-size: 1.15em; text-transform: uppercase; }
.motscaches-words li.found { text-decoration: line-through; opacity: 0.5; }

.motscaches-message { margin-top: 10px; padding: 10px; border-radius: 6px; background: #f1fbef; border: 1px solid #9fd89a; color: #1f3d1c; font-size: 1.15em; font-weight: bold; text-align: center; }
.motscaches-message.motscaches-error { background: #fbe3e3; color: #8f1d1d; }
.motscaches-actions { margin-top: 12px; }

@media (max-width: 700px) {
	.motscaches-words { flex-basis: 100%; }
	.motscaches-words ul { columns: 3; }
}

/* Ranking: explicit colours so the table stays readable whatever the board style */
.motscaches-table { width: 100%; border-collapse: collapse; background: #ffffff; color: #222222; }
.motscaches-table th { padding: 8px 6px; background: #105289; color: #ffffff; font-weight: bold; }
.motscaches-table td { padding: 7px 6px; color: #222222; border-bottom: 1px solid #e3e8ee; }
.motscaches-table tbody tr:nth-child(even) td { background: #f5f8fb; }
.motscaches-table tbody tr:hover td { background: #eaf2fa; }
.motscaches-table td a { color: inherit; }
.motscaches-table td a.username-coloured { text-shadow: none; }
.motscaches-table .motscaches-score { display: inline-block; min-width: 3em; padding: 2px 8px; border-radius: 10px; background: #e8f0fb; color: #0b3a66; font-weight: bold; }
.motscaches-table tr.motscaches-me td, .motscaches-side li.motscaches-me { background: #fff7d1 !important; color: #222222; }
.motscaches-table tr.motscaches-me td:first-child { box-shadow: inset 4px 0 0 #e0a800; }
.motscaches-side li.motscaches-me { box-shadow: inset 4px 0 0 #e0a800; }

/* Sound button */
.motscaches-sound { border: 1px solid #c7d3df; background: #ffffff; color: #105289; border-radius: 4px; padding: 2px 6px; cursor: pointer; font-size: 0.9em; }
.motscaches-sound[aria-pressed="false"] { color: #8a8a8a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* Invite friends */
.motscaches-share { display: flex; flex-wrap: wrap; gap: 6px; }
.motscaches-share-btn {
	display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 4px; border: 0;
	font-size: 1em; font-weight: bold; line-height: 1.2; color: #ffffff !important; text-decoration: none !important; cursor: pointer;
}
.motscaches-share-btn:hover { filter: brightness(1.1); }
.motscaches-share-forum { background: #105289; }
.motscaches-share-whatsapp { background: #128c4a; }
.motscaches-share-telegram { background: #1f88c9; }
.motscaches-share-facebook { background: #1665d8; }
.motscaches-share-x { background: #111111; }
.motscaches-share-mail { background: #6b6b6b; }
.motscaches-share-copy, .motscaches-share-native { background: #4c5d6e; }
#motscaches-invite-after { margin-top: 12px; }
.motscaches-table-wrap { overflow-x: auto; border: 1px solid #c7d3df; border-radius: 6px; margin-bottom: 10px; }

/* 2.0: navigation tabs */
.motscaches-nav { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid #105289; }
.motscaches-nav li { margin: 0; }
.motscaches-nav a { display: inline-flex; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 6px 6px 0 0; background: #eef3f8; color: #105289; font-weight: bold; text-decoration: none; }
.motscaches-nav a:hover { background: #dce7f2; text-decoration: none; }
.motscaches-nav a.active { background: #105289; color: #ffffff; }
.motscaches-badge-count { display: inline-block; min-width: 1.4em; padding: 0 4px; border-radius: 9px; background: #d0342c; color: #fff; font-size: 0.85em; text-align: center; }

/* Home cards */
.motscaches-cards { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.motscaches-card { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 8px; border: 1px solid #c7d3df; background: #ffffff; color: #222 !important; text-decoration: none !important; }
.motscaches-card:hover { border-color: #105289; box-shadow: 0 2px 6px rgba(16, 82, 137, 0.15); }
.motscaches-card > .icon { font-size: 1.8em; color: #105289; }
.motscaches-card strong { font-size: 1.15em; }
.motscaches-card-daily > .icon { color: #16a085; }
.motscaches-card-challenge > .icon { color: #d35400; }
.motscaches-card-xp > .icon { color: #b8860b; }
.motscaches-streak { color: #d35400; font-weight: bold; }
.motscaches-season-line { padding: 6px 10px; border-left: 4px solid #b8860b; background: #fff9e6; color: #222; }
.motscaches-banner { padding: 8px 10px; border-radius: 6px; background: #fdf0e6; border: 1px solid #f0b27a; color: #222; font-weight: bold; }
.motscaches-big-button { display: inline-block; padding: 10px 18px !important; font-size: 1.2em !important; }

/* Progress bar (experience) */
.motscaches-progress { display: block; height: 8px; border-radius: 4px; background: #e3e8ee; overflow: hidden; }
.motscaches-progress span { display: block; height: 100%; background: linear-gradient(90deg, #f1c40f, #e67e22); }
.motscaches-progress-big { height: 14px; border-radius: 7px; margin: 6px 0; }

/* Hints and mystery word */
.motscaches-hintbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.motscaches-cell.motscaches-hinted { background: #fff1a8; border-radius: 50%; box-shadow: inset 0 0 0 2px #e0a800; }
.motscaches-words li.hinted:not(.found) { color: #b07d00; }
.motscaches-mystery { border-top: 1px solid #dde3ea; }
.motscaches-mystery-letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.motscaches-mystery-letters span { display: inline-flex; align-items: center; justify-content: center; width: 1.9em; height: 1.9em; border-radius: 4px; border: 2px solid #9b59b6; background: #ffffff; color: #4a235a; font-weight: bold; font-size: 1.1em; }
.motscaches-mystery-letters span.motscaches-pop { animation: motscaches-pop 0.4s; }
@keyframes motscaches-pop { 50% { transform: scale(1.3); } }
.motscaches-mystery-form { display: flex; gap: 6px; flex-wrap: wrap; }
.motscaches-ok { color: #1e7a1e; font-weight: bold; }
.motscaches-ko { color: #a52a2a; }
.motscaches-new-badges { margin-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.motscaches-new-badges span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 14px; background: #ffffff; border: 1px solid #c7d3df; color: #222; font-size: 0.9em; }
.motscaches-new-badges i { color: #fff; border-radius: 50%; padding: 4px; }

/* Badges page */
.motscaches-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.motscaches-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 8px; border-radius: 8px; border: 1px solid #c7d3df; background: #ffffff; color: #222; }
.motscaches-badge > .icon { font-size: 1.8em; width: 1.9em; height: 1.9em; line-height: 1.9em; border-radius: 50%; background: #e3e8ee; color: #9aa5b1; }
.motscaches-badge-locked { opacity: 0.55; }
.motscaches-badge-date { color: #667; }
.motscaches-badges-mini .icon { font-size: 1.05em; }
.motscaches-postprofile a { text-decoration: none; }
.motscaches-xp-mini { display: block; font-weight: bold; }
.motscaches-profile .details dt { width: 40%; }

/* Challenges */
.motscaches-table tr.motscaches-won td { background: #eef9ee !important; }
.motscaches-table tr.motscaches-lost td { background: #fbeeee !important; }
.motscaches-actions-cell .button { margin: 2px 0; }
.motscaches-podium ol { margin: 0 0 0 1.5em; }
.motscaches-podium h4 { margin: 0 0 4px; }
