/* Galgenmännchen (js/galgenui.js): a chalkboard with the gallows, letter tiles and a keyboard. */

.gl { display: flex; flex-direction: column; gap: 18px; max-width: 900px; margin: 0 auto; padding: 22px 16px 30px; }
.gl-top { display: flex; justify-content: center; gap: 22px; color: #a9b4c2; font-weight: 700; }
.gl-top b { color: #fff; font-size: 18px; }
.gl-main { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: center; padding: 22px; border-radius: 22px;
	background: radial-gradient(600px 300px at 30% 20%, #2f4a3d, #1e3329); border: 8px solid #6b4a2a; box-shadow: inset 0 0 40px rgba(0, 0, 0, .45), 0 20px 40px rgba(0, 0, 0, .4); }
.gl-gallows { width: 100%; max-width: 220px; }
.gl-gallows g { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.gl-gallows g.on { stroke: #f4efe2; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .4)); }
.gl-cat { margin: 0 0 12px; color: #c7d6cf; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.gl-word { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-word i { width: clamp(24px, 4.4vw, 42px); height: clamp(34px, 6vw, 54px); display: grid; place-items: center; font: 900 clamp(18px, 3.4vw, 32px) 'Nunito', sans-serif;
	font-style: normal; color: #f4efe2; border-bottom: 4px solid rgba(244, 239, 226, .7); }
.gl-word i.on { animation: gl-pop .3s; }
.gl-word i.lost { color: #ff9c8a; }
.gl-word i.sp { border: 0; width: 12px; }
@keyframes gl-pop { from { transform: translateY(-6px); opacity: 0; } }
.gl-solve { display: flex; gap: 8px; margin-top: 16px; max-width: 360px; }
.gl-solve input { flex: 1; min-width: 0; padding: 9px 14px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .25); color: #fff;
	font: 700 15px 'Nunito', sans-serif; text-transform: uppercase; }
.gl-keys { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.gl-keys div { display: flex; gap: 6px; }
.gl-keys button { width: clamp(28px, 7.4vw, 50px); height: 50px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font: 900 18px 'Nunito', sans-serif; }
.gl-keys button:hover:not([disabled]) { background: var(--accent); }
.gl-keys button.hit { background: #2ea44f; }
.gl-keys button.miss { background: rgba(255, 255, 255, .04); color: #5e6976; }
.gl-keys button[disabled] { cursor: default; }
.gl-after { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.gl-after p { margin: 0; font-weight: 800; }
.gl-after p.ok { color: #7ff07a; font-size: 20px; }
.gl-after p.bad { color: #ff9c8a; font-size: 20px; }
.gl-rivals h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.gl-rivals ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gl-rivals li { display: grid; grid-template-columns: 140px 1fr 80px 50px; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-weight: 700; }
.gl-rivals li.me { background: rgba(255, 255, 255, .1); }
.gl-rivals li b { color: color-mix(in srgb, var(--pc) 45%, #fff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-rivals li em { font-style: normal; font-size: 13px; color: #a9b4c2; }
.gl-rivals li strong { text-align: right; }
.gl-prog { height: 8px; border-radius: 999px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.gl-prog i { display: block; height: 100%; background: var(--accent); }
kbd { font: 700 11px system-ui; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .3); }

@media (max-width: 720px) {
	.gl-main { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	.gl-gallows { max-width: 150px; }
	.gl-solve { margin-left: auto; margin-right: auto; }
	.gl-word { justify-content: center; }
	.gl-rivals li { grid-template-columns: 1fr 70px 40px; }
	.gl-rivals li .gl-prog { display: none; }
}
