/* Football Heroes: page shell and HUD. Sizes are in em off the HUD's font-size, which follows the screen. */
@font-face { font-family: "FH Italic"; src: url("./assets/fonts/InterDisplay-BlackItalic.otf"); font-display: swap; }
@font-face { font-family: "FH Black"; src: url("./assets/fonts/InterDisplay-Black.otf"); font-display: swap; }
@font-face { font-family: "FH Bold"; src: url("./assets/fonts/Inter-Bold.otf"); font-display: swap; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1a55; overscroll-behavior: none; }
*, svg text { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
html, body, body * { touch-action: none; }
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
#hud { position: fixed; inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); pointer-events: none;
	font: 16px/1.1 "FH Bold", system-ui, sans-serif; font-size: clamp(10.5px, 1.95vmin, 22px); color: #fff; }
#hud button { font: inherit; color: inherit; border: 0; cursor: pointer; pointer-events: auto; }

#loading { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vmin;
	background: radial-gradient(ellipse 85% 65% at 50% 46%, #1440a6 0%, #0b2a7c 42%, #071c5c 72%, #041245 100%); transition: opacity 0.4s; }
#loading.done { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 0.4s, visibility 0s 0.4s; }
.ld-logo, .fh-title .logo { font-family: "FH Italic", "Arial Black", sans-serif; text-align: center; line-height: 0.86; letter-spacing: -0.01em; transform: skewY(-4deg);
	text-shadow: 0 0.06em 0 #06123a, 0.05em 0 0 #06123a, -0.05em 0 0 #06123a, 0 -0.05em 0 #06123a, 0 0.14em 0.12em rgba(0,0,20,0.5); }
.ld-logo span, .fh-title .logo span { display: block; font-size: 11vmin; color: #fff; }
.ld-logo b, .fh-title .logo b { display: block; font-size: 17vmin; color: #ffd23f; font-weight: normal; }
.ld-bar { width: min(52vw, 420px); height: 14px; border: 3px solid #f7c400; border-radius: 99px; background: #08184c; padding: 2px; box-sizing: border-box; }
.ld-fill { height: 100%; width: 70%; border-radius: 99px; background: linear-gradient(#ffe066, #f5b800 60%, #e09a00); animation: ld 1.2s ease-in-out infinite alternate; }
@keyframes ld { from { width: 20%; } to { width: 96%; } }

/* --- scorebug */
.fh-bug { position: absolute; top: 0.7em; left: 50%; transform: translateX(-50%); display: none; grid-template-columns: auto auto auto; filter: drop-shadow(0 0.25em 0.3em rgba(0,0,20,0.45)); }
.fh-bug.on { display: grid; }
.fh-team { display: flex; align-items: center; gap: 0.7em; padding: 0.35em 0.9em; font-family: "FH Black", sans-serif; border: 0.16em solid #06123a; }
.fh-team .ab { font-size: 1.25em; letter-spacing: 0.03em; opacity: 0.95; }
.fh-team .sc { font-size: 2.1em; min-width: 1.2em; text-align: center; }
.fh-home { border-radius: 0.7em 0 0 0; border-right: 0; } .fh-away { border-radius: 0 0.7em 0 0; border-left: 0; }
.fh-mid { background: #06123a; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.2em 1em; border-top: 0.16em solid #06123a; }
.fh-mid .q { font: 0.95em "FH Black", sans-serif; color: #ffd23f; } .fh-mid .ck { font: 1.5em "FH Black", sans-serif; font-variant-numeric: tabular-nums; }
.fh-sit { grid-column: 1 / 4; background: #0e1f66; border: 0.16em solid #06123a; border-top: 0; border-radius: 0 0 0.7em 0.7em; text-align: center; padding: 0.35em 1em; font: 1.02em "FH Italic", sans-serif; letter-spacing: 0.03em; color: #ffd23f; white-space: nowrap; }
.fh-mute { position: absolute; top: 0.7em; right: 0.7em; width: 2.6em; height: 2.6em; border-radius: 0.6em; background: #0e1f66; border: 0.16em solid #06123a !important; }
.fh-mute::before { content: "\266A"; font-size: 1.4em; } .fh-mute.off { opacity: 0.55; } .fh-mute.off::before { content: "\266A"; text-decoration: line-through; }

/* --- banners */
.fh-banner { position: absolute; left: 0; right: 0; top: 24%; text-align: center; opacity: 0; transform: scale(0.8); pointer-events: none; }
.fh-banner.on { animation: fh-ban 0.28s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes fh-ban { from { opacity: 0; transform: scale(0.6) skewY(-3deg); } to { opacity: 1; transform: scale(1) skewY(-3deg); } }
.fh-banner .t { font: 5.2em/0.95 "FH Italic", sans-serif; text-shadow: 0 0.07em 0 #06123a, 0.05em 0 0 #06123a, -0.05em 0 0 #06123a, 0 -0.05em 0 #06123a, 0 0.16em 0.14em rgba(0,0,20,0.5); }
.fh-banner .s { margin-top: 0.5em; display: inline-block; font: 1.35em "FH Italic", sans-serif; letter-spacing: 0.04em; background: #06123a; padding: 0.3em 0.9em; border-radius: 0.5em; }
.fh-banner .s:empty { display: none; }
.fh-pop { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font: 2.2em "FH Italic", sans-serif; color: #ffd23f; opacity: 0; text-shadow: 0 0.08em 0 #06123a, 0.06em 0 0 #06123a, -0.06em 0 0 #06123a, 0 -0.06em 0 #06123a; }
.fh-pop.on { animation: fh-pop 1.1s ease-out forwards; }
@keyframes fh-pop { 0% { opacity: 0; transform: translateY(0.6em) scale(0.7); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-1em); } }
.fh-hint { position: absolute; left: 50%; bottom: 1.1em; transform: translateX(-50%); max-width: 92%; text-align: center; font: 1.05em/1.3 "FH Bold", sans-serif; background: rgba(6,18,58,0.82); padding: 0.5em 1.1em; border-radius: 0.7em; opacity: 0; transition: opacity 0.25s; }
.fh-hint.on { opacity: 1; }
.fh-press { position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s; box-shadow: inset 0 0 9em 1em rgba(255,40,30,0.55); }
.fh-press.on { opacity: 1; }
.fh-press span { position: absolute; left: 50%; bottom: 17%; transform: translateX(-50%); font: 1.7em "FH Italic", sans-serif; color: #ff5a4a; text-shadow: 0 0.08em 0 #06123a, 0.06em 0 0 #06123a, -0.06em 0 0 #06123a, 0 -0.06em 0 #06123a; animation: fh-blink 0.4s steps(2) infinite; }
@keyframes fh-blink { 50% { opacity: 0.35; } }

/* --- the play sheet */
.fh-plays { position: absolute; left: 0; right: 0; bottom: 0; display: none; flex-direction: column; align-items: center; padding: 0 0.6em 0.7em; background: linear-gradient(transparent, rgba(4,12,48,0.82) 38%); pointer-events: none; }
.fh-plays.on { display: flex; }
.fh-tabs { display: flex; gap: 0.4em; margin-bottom: 0.45em; }
.fh-tab { font: 1.1em "FH Italic", sans-serif !important; letter-spacing: 0.04em; padding: 0.45em 1.3em; border-radius: 0.6em 0.6em 0 0; background: #0e1f66; border: 0.16em solid #06123a !important; opacity: 0.8; }
.fh-tab.on { background: #ffd23f; color: #06123a !important; opacity: 1; } .fh-tab.kick { background: #a01f1f; } .fh-tab.kick.on { background: #ff6a3d; }
.fh-cards { display: flex; gap: 0.6em; justify-content: center; width: 100%; }
.fh-card { flex: 0 1 15em; min-width: 0; max-width: 31vw; background: linear-gradient(#17309a, #0e1f66); border: 0.2em solid #06123a !important; border-radius: 0.9em; padding: 0.5em 0.5em 0.6em; box-shadow: 0 0.3em 0 #06123a; text-align: center; transition: transform 0.08s; }
.fh-card:active { transform: translateY(0.2em); box-shadow: 0 0.1em 0 #06123a; }
.fh-card .nm { font: 1.3em "FH Italic", sans-serif; color: #ffd23f; letter-spacing: 0.02em; white-space: nowrap; }
.fh-card .tip { font-size: 0.82em; line-height: 1.2; opacity: 0.85; min-height: 2.4em; }
.fh-card .big { font: 4em "FH Black", sans-serif; line-height: 1.2; } .fh-card.dis { opacity: 0.45; }
.fh-dia { width: 100%; height: auto; display: block; background: #2f8a3a; border-radius: 0.4em; margin: 0.35em 0; }
.fh-dia .los { stroke: rgba(255,255,255,0.75); stroke-width: 0.8; } .fh-dia .ol { fill: #fff; }
.fh-dia .pl { fill: #fff; stroke: #06123a; stroke-width: 0.7; } .fh-dia .pl.qb { fill: #ffd23f; }
.fh-dia .rt { fill: none; stroke: #ffe45c; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; } .fh-dia .rt-RB { stroke: #ff9a4a; } .fh-dia .rt-TE { stroke: #8fe3ff; }

/* --- their drive, the kick, title, final */
.fh-drive, .fh-final, .fh-title { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; }
.fh-drive.on, .fh-final.on, .fh-title.on { display: flex; }
.fh-drive .box, .fh-final .box { width: min(30em, 88vw); background: linear-gradient(#17309a, #0b1a55); border: 0.22em solid #06123a; border-radius: 1em; padding: 1em 1.2em; box-shadow: 0 0.5em 1.4em rgba(0,0,20,0.5); text-align: center; }
.fh-drive .hd { font: 1.5em "FH Italic", sans-serif; margin-bottom: 0.6em; } .fh-drive .hd i, .fh-title .vs i, .fh-final .score i { font-style: normal; padding: 0.1em 0.5em; border-radius: 0.3em; border: 0.12em solid #06123a; }
.fh-drive .log { min-height: 9.5em; text-align: left; } .fh-drive .ln { font-size: 1.05em; padding: 0.22em 0.3em; border-bottom: 1px solid rgba(255,255,255,0.12); animation: fh-in 0.2s ease-out; }
@keyframes fh-in { from { opacity: 0; transform: translateX(-0.6em); } }
.fh-drive .res { margin-top: 0.7em; font: 1.35em "FH Italic", sans-serif; opacity: 0; min-height: 1.2em; } .fh-drive .res.on { opacity: 1; } .fh-drive .res.bad { color: #ff7a66; } .fh-drive .res.good { color: #6fe38a; }
.fh-kick { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); width: min(30em, 86vw); display: none; flex-direction: column; align-items: center; gap: 0.7em; }
.fh-kick.on { display: flex; }
.fh-kick .lbl { font: 1.15em "FH Italic", sans-serif; background: rgba(6,18,58,0.85); padding: 0.4em 0.9em; border-radius: 0.6em; }
.fh-kick .bar { position: relative; width: 100%; height: 2em; background: #a01f1f; border: 0.2em solid #06123a; border-radius: 0.6em; overflow: hidden; }
.fh-kick .zone { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); background: #3fcf62; }
.fh-kick .needle { position: absolute; top: -0.2em; bottom: -0.2em; width: 0.5em; margin-left: -0.25em; background: #fff; border: 0.14em solid #06123a; border-radius: 0.3em; }
.fh-btn { font: 2em "FH Italic", sans-serif !important; letter-spacing: 0.03em; padding: 0.4em 1.6em; border-radius: 0.6em; background: linear-gradient(#3fdc6a, #1fa845); border: 0.14em solid #06123a !important; box-shadow: 0 0.2em 0 #06123a; text-shadow: 0 0.06em 0 rgba(0,0,0,0.35); }
.fh-btn:active { transform: translateY(0.12em); box-shadow: 0 0.08em 0 #06123a; }
.fh-title { background: linear-gradient(rgba(4,12,48,0.35), rgba(4,12,48,0.1) 40%, rgba(4,12,48,0.7)); gap: 1.4em; }
.fh-title .vs { font: 1.2em "FH Italic", sans-serif; } .fh-title .vs em { display: block; margin-top: 0.5em; font-style: normal; color: #ffd23f; }
.fh-title .how { max-width: 90%; text-align: center; font-size: 0.98em; line-height: 1.55; background: rgba(6,18,58,0.78); padding: 0.7em 1.2em; border-radius: 0.8em; } .fh-title .how b { color: #ffd23f; } .fh-title .kb { opacity: 0.7; font-size: 0.9em; }
@media (hover: none) { .fh-title .kb { display: none; } }
.fh-final { background: rgba(4,12,48,0.55); } .fh-final .hd { font: 3em "FH Italic", sans-serif; margin-bottom: 0.3em; }
.fh-final .score { display: flex; gap: 0.5em; justify-content: center; font: 1.5em "FH Black", sans-serif; margin-bottom: 0.7em; } .fh-final .score b { color: #ffd23f; margin-left: 0.3em; }
.fh-final .stats { margin-bottom: 1em; } .fh-final .stats div { display: flex; justify-content: space-between; padding: 0.28em 0.2em; border-bottom: 1px solid rgba(255,255,255,0.14); } .fh-final .stats b { color: #ffd23f; }
.fh-fade { position: absolute; inset: -5em; background: #040c30; opacity: 0; transition: opacity 0.22s; } .fh-fade.on { opacity: 1; }
