/* WeWeed Run — stile arcade, palette verde weweed */

#weweed-run-app { margin: 0 auto; }

.wwr-wrap {
	max-width: 960px;
	margin: 0 auto;
	font-family: "Courier New", monospace;
	-webkit-user-select: none;
	user-select: none;
}

/* barra superiore */
.wwr-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #0e3b28;
	color: #f4eeda;
	padding: 8px 12px;
	border-radius: 8px 8px 0 0;
	font-size: 13px;
	font-weight: bold;
	letter-spacing: 1px;
}
.wwr-title { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #7bd77b; }

.wwr-btn {
	background: #3fa34d;
	color: #f4eeda;
	border: 0;
	border-radius: 6px;
	font: inherit;
	font-size: 14px;
	line-height: 1;
	padding: 6px 10px;
	cursor: pointer;
	touch-action: manipulation;
}
.wwr-btn:active { transform: translateY(1px); }
.wwr-btn.wwr-off { opacity: 0.4; text-decoration: line-through; }

/* scena */
.wwr-stage {
	position: relative;
	background: #0d1117;
	border-radius: 0 0 8px 8px;
	padding: 6px;
}
.wwr-canvas {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 960 / 544;
	border-radius: 4px;
	touch-action: none;
	background: #8ee8ff;
}

/* ---- schermo intero ---- */
.wwr-wrap.wwr-fs {
	position: fixed;
	inset: 0;
	max-width: none;
	margin: 0;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	background: #0d1117;
}
.wwr-fs .wwr-bar { border-radius: 0; }
.wwr-fs .wwr-stage {
	flex: 1 1 auto;
	min-height: 0;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wwr-fs .wwr-canvas {
	width: 100%;
	height: 100%;
	object-fit: contain;
	aspect-ratio: auto;
}
.wwr-fs .wwr-ver { display: none; }

/* invito a ruotare: solo touch in verticale */
.wwr-rotate { display: none; }
@media (orientation: portrait) {
	.wwr-touchon .wwr-rotate {
		display: flex;
		position: absolute;
		inset: 6px;
		z-index: 6;
		background: rgba(13, 17, 23, 0.96);
		color: #f4eeda;
		align-items: center;
		justify-content: center;
		text-align: center;
		font-size: 17px;
		font-weight: bold;
		letter-spacing: 1px;
		border-radius: 4px;
		padding: 20px;
	}
}

/* controlli touch: visibili solo su puntatori "coarse" (dita) */
.wwr-touch { display: none; }
@media (pointer: coarse) {
	.wwr-touchon .wwr-touch { display: block; }
}
.wwr-pad {
	position: absolute;
	bottom: 3%;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(16, 42, 24, 0.16);
	border: 2px solid rgba(255, 255, 255, 0.35);
	color: rgba(255, 255, 255, 0.85);
	font-size: 22px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
	z-index: 5;
}
.wwr-pad:active, .wwr-pad.wwr-lit {
	background: rgba(63, 163, 77, 0.5);
	border-color: rgba(255, 255, 255, 0.7);
}
.wwr-stick {
	position: absolute;
	left: 2%;
	bottom: 2%;
	display: flex;
	gap: 14px;
	padding: 8px 12px 12px;
	pointer-events: auto;
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
	z-index: 5;
}
.wwr-stick .wwr-pad { position: static; pointer-events: none; }
.wwr-pj { right: 2%; width: 72px; height: 72px; }
.wwr-px { right: calc(2% + 88px); }
.wwr-pz {
	right: 10px;
	top: 46px;
	bottom: auto;
	width: 58px;
	height: 34px;
	border-radius: 17px;
	font-size: 13px;
}

/* pannelli sopra il canvas */
.wwr-panel {
	position: absolute;
	inset: 6px;
	background: rgba(10, 26, 16, 0.94);
	color: #f4eeda;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	z-index: 7;
	text-align: center;
	padding: 12px;
}
.wwr-panel[hidden] { display: none; }
.wwr-panel-title { font-size: 17px; font-weight: bold; letter-spacing: 2px; color: #7bd77b; }

/* schermata premi (prima della partita) */
.wwr-tiers { display: flex; flex-direction: column; gap: 8px; width: min(360px, 92%); }
.wwr-tier {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: rgba(244, 238, 218, 0.07);
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 12px;
	text-align: left;
	line-height: 1.35;
}
.wwr-tier b { white-space: nowrap; letter-spacing: 1px; }
.wwr-t20 { color: #d8dfe6; background: rgba(216, 223, 230, 0.10); }
.wwr-t30 { color: #ffd75e; background: rgba(255, 215, 94, 0.12); }
.wwr-tg  { color: #f4eeda; background: rgba(255, 215, 94, 0.20); border: 1px dashed #ffd75e; }
.wwr-tg b { white-space: normal; text-align: right; font-size: 11px; color: #ffd75e; }
.wwr-intro-note { font-size: 10px; opacity: 0.65; max-width: 88%; line-height: 1.6; }
.wwr-go { font-size: 16px; padding: 10px 26px; letter-spacing: 2px; }

/* nome giocatore */
.wwr-namer-stats { font-size: 14px; font-weight: bold; }
.wwr-namer-label { font-size: 11px; opacity: 0.8; letter-spacing: 1px; }
.wwr-name {
	width: 150px;
	background: #0a120d;
	color: #f4eeda;
	border: 2px solid #3fa34d;
	border-radius: 8px;
	font-family: inherit;
	font-size: 24px;
	font-weight: bold;
	letter-spacing: 8px;
	text-align: center;
	text-transform: uppercase;
	padding: 8px 4px 8px 12px;
	outline: none;
}
.wwr-name:focus { border-color: #f4eeda; }

/* classifica */
.wwr-board-list {
	width: min(340px, 88%);
	max-height: 46%;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.wwr-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 13px;
	background: rgba(244, 238, 218, 0.06);
}
.wwr-r-pos { width: 18px; text-align: right; opacity: 0.7; }
.wwr-r-name { flex: 1 1 auto; text-align: left; font-weight: bold; letter-spacing: 2px; }
.wwr-r-score { white-space: nowrap; }
.wwr-r-time { width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* podio: oro, argento, bronzo */
.wwr-gold, .wwr-silver, .wwr-bronze { font-size: 15px; padding: 6px 10px; }
.wwr-gold   { color: #ffd75e; background: rgba(255, 215, 94, 0.14); }
.wwr-silver { color: #d8dfe6; background: rgba(216, 223, 230, 0.12); }
.wwr-bronze { color: #e09a63; background: rgba(224, 154, 99, 0.12); }
.wwr-gold .wwr-r-pos, .wwr-silver .wwr-r-pos, .wwr-bronze .wwr-r-pos { opacity: 1; font-weight: bold; }

.wwr-board-note { font-size: 10px; opacity: 0.6; max-width: 88%; line-height: 1.5; }

/* banner premio in classifica */
.wwr-coupon {
	width: min(340px, 88%);
	background: rgba(244, 238, 218, 0.08);
	border: 1px dashed rgba(244, 238, 218, 0.4);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 11px;
	line-height: 1.6;
}
.wwr-coupon[hidden] { display: none; }
.wwr-coupon-won {
	background: rgba(255, 215, 94, 0.12);
	border-color: #ffd75e;
	color: #ffd75e;
}
.wwr-code {
	display: block;
	font-size: 17px;
	font-weight: bold;
	letter-spacing: 2px;
	color: #f4eeda;
	margin: 2px 0;
	user-select: text;
	-webkit-user-select: text;
}
.wwr-wa {
	display: inline-block;
	margin-top: 6px;
	background: #25d366;
	color: #0a120d;
	font-weight: bold;
	text-decoration: none;
	border-radius: 6px;
	padding: 7px 12px;
}
.wwr-wa:hover { filter: brightness(1.1); }

/* etichetta versione */
.wwr-ver {
	text-align: right;
	font-size: 10px;
	letter-spacing: 1px;
	color: #0e3b28;
	opacity: 0.6;
	padding: 4px 4px 0;
}

/* sezione SEO sotto il gioco */
.wwr-seo { max-width: 960px; margin: 28px auto 0; }
.wwr-seo-note { font-size: 0.85em; opacity: 0.75; }

/* FIX pagina gioco: il banner cookie (Astro/GCM) perde il suo left:50% e il
 * translateX(-50%) lo spinge fuori dallo schermo a sinistra. Ripristino il
 * centraggio (questo CSS carica SOLO sulla pagina del gioco). */
#gcm-banner {
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%) !important;
	max-width: calc(100vw - 16px) !important;
	box-sizing: border-box !important;
}

@media (max-width: 480px) {
	.wwr-btn { padding: 5px 7px; font-size: 12px; }
	.wwr-bar { gap: 5px; padding: 7px 8px; font-size: 11px; }
	.wwr-tier { font-size: 11px; }
}
