/* Tesla's Ascent — the platform game (wwwroot/3d/platform.js). Night blue and gold, like the rest of Lumazel. */
body.zplat-active footer, body.zplat-active #sc-robot, body.zplat-active .zassist-fab { display: none !important; }   /* no footer, and the site's walking robot stays out of the game */
#zplat { position: relative; width: 100%; height: calc(100vh - 92px); height: calc(100dvh - 92px); min-height: 420px; overflow: hidden;
    border-radius: 14px; border: 1px solid rgba(242, 200, 90, .35); background: #0b0a24; touch-action: none; user-select: none; -webkit-user-select: none; }
#zplat-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.zplat-hud { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    color: #ffe8a8; font-weight: 800; letter-spacing: .03em; text-shadow: 0 0 8px rgba(255, 190, 80, .6); pointer-events: none; z-index: 2; }
.zplat-hud > * { pointer-events: auto; }
.zplat-hud__level { padding: 4px 12px; border: 1px solid rgba(242, 200, 90, .6); border-radius: 999px; background: rgba(20, 14, 50, .6); }
.zplat-hud__he { font-family: "Times New Roman", serif; font-size: 1.25em; }
.zplat-hud__lives { color: #ff9cb5; letter-spacing: .12em; }
.zplat-hud__time { margin-left: auto; font-variant-numeric: tabular-nums; }
.zplat-hud__btn { background: rgba(20, 14, 50, .6); border: 1px solid rgba(242, 200, 90, .5); color: #ffe8a8; border-radius: 10px; width: 38px; height: 34px; cursor: pointer; }

.zplat-load { position: absolute; inset: 0; display: grid; place-items: center; color: #ffe8a8; font-weight: 700; letter-spacing: .05em; z-index: 3; }
.zplat-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, 90%); max-height: 88%; overflow: auto; z-index: 4;
    padding: 22px 24px; border-radius: 18px; text-align: center; color: #efe6ff;
    background: radial-gradient(circle at 50% 0%, rgba(80, 60, 160, .92), rgba(16, 12, 44, .95)); border: 1px solid rgba(242, 200, 90, .7);
    box-shadow: 0 0 30px rgba(255, 186, 74, .35), inset 0 0 18px rgba(255, 224, 142, .12); }
.zplat-panel h1, .zplat-panel h2 { color: #ffd774; font-weight: 900; letter-spacing: .04em; text-shadow: 0 0 12px rgba(255, 190, 80, .6); margin: 0 0 6px; }
.zplat-panel h1 { font-size: 1.9rem; }
.zplat-sub { color: #c9b8ff; font-weight: 700; margin: 0 0 10px; }
.zplat-keys { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; font-size: .95rem; }
kbd { display: inline-block; min-width: 26px; padding: 1px 7px; border: 1px solid rgba(242, 200, 90, .7); border-bottom-width: 3px; border-radius: 6px; background: rgba(0, 0, 0, .3); color: #ffe8a8; font: 700 .85rem/1.5 system-ui, sans-serif; }
.zplat-touchhint { display: none; color: #c9b8ff; }
.zplat-go { display: inline-block; margin: 8px 6px 0; padding: .7rem 1.4rem; border-radius: 999px; border: 1px solid rgba(255, 201, 94, .9); cursor: pointer;
    background: radial-gradient(circle at 50% 25%, rgba(150, 110, 30, .95), rgba(60, 42, 10, .95)); color: #ffe8a8; font-weight: 900; letter-spacing: .06em;
    box-shadow: 0 0 16px rgba(255, 186, 74, .55); }
.zplat-go:hover, .zplat-go:focus { filter: brightness(1.12); }
.zplat-go--quiet { background: rgba(20, 14, 50, .7); }
.zplat-stars { font-size: 2.4rem; color: #ffd774; letter-spacing: .2em; margin: 4px 0 8px; text-shadow: 0 0 14px rgba(255, 200, 90, .8); }
.zplat-score { display: grid; grid-template-columns: auto auto; gap: 4px 14px; justify-content: center; margin: 0 0 12px; }
.zplat-score dt { color: #c9b8ff; text-align: right; } .zplat-score dd { margin: 0; text-align: left; font-weight: 800; color: #ffe8a8; }

/* touch: shown on phones and tablets */
.zplat-pad { display: none; position: absolute; left: 0; right: 0; bottom: 14px; padding: 0 14px; justify-content: space-between; align-items: flex-end; z-index: 3; pointer-events: none; }
.zplat-pad > div { display: flex; gap: 12px; align-items: flex-end; pointer-events: auto; }
.zplat-pad button { width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(242, 200, 90, .75); background: rgba(30, 20, 70, .55); color: #ffe8a8;
    font-size: 1.7rem; font-weight: 900; box-shadow: 0 0 12px rgba(255, 186, 74, .35); touch-action: none; }
.zplat-pad button.is-on { background: rgba(170, 120, 30, .75); }
.zplat-pad__small { width: 54px !important; height: 54px !important; font-size: 1.3rem !important; }
.zplat-pad__jump { width: 86px !important; height: 86px !important; }
@media (pointer: coarse) {
    .zplat-pad { display: flex; }
    .zplat-touchhint { display: block; }
    .zplat-keys { display: none; }
}
@media (max-width: 600px) {
    #zplat { border-radius: 0; margin: 0 -12px; width: calc(100% + 24px); }   /* the height is set by platform.js */
    .zplat-hud { gap: 8px; font-size: .9rem; }
}

.zplat-hud__score { font-variant-numeric: tabular-nums; }
.zplat-hud__close { font-weight: 900; border-color: rgba(255, 150, 170, .7) !important; color: #ffd0da !important; }
.zplat-warn { color: #ffb3c4; font-weight: 700; font-size: .92rem; margin: 6px 0; }
.zplat-calm { display: block; margin: 4px 0 6px; color: #d9ccff; font-size: .92rem; cursor: pointer; }
.zplat-calm input { margin-right: 6px; vertical-align: -1px; }
a.zplat-go { text-decoration: none; }
/* the haunted house: a short flash when lightning strikes (never strobing: at most one every few seconds) */
.zplat-flash { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(circle at 60% 20%, rgba(220,230,255,.9), rgba(160,170,255,.35) 55%, rgba(0,0,0,0)); opacity: 0; }
/* the ✕ always sits in the top-right corner of the playing field; the bar leaves room for it */
.zplat-hud { padding-right: 46px; }
.zplat-hud__close { position: absolute; top: 0; right: 0; }
@media (max-width: 600px) {
    .zplat-hud { gap: 6px 8px; font-size: .82rem; }
    .zplat-hud__level { padding: 3px 9px; }
    .zplat-hud__btn { width: 34px; height: 32px; }
    .zplat-pad { padding: 0 10px; }
    .zplat-pad > div { gap: 8px; }
    .zplat-pad button { width: 60px; height: 60px; font-size: 1.45rem; }
    .zplat-pad__small { width: 46px !important; height: 46px !important; font-size: 1.1rem !important; }
    .zplat-pad__jump { width: 72px !important; height: 72px !important; }
}

/* the level picker, the high scores, the volume sliders and the announcement at the start of a level */
.zplat-levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 4px; }
.zplat-levels button { padding: 6px 2px; border-radius: 10px; border: 1px solid rgba(242, 200, 90, .55); background: rgba(20, 14, 50, .7); color: #ffe8a8; font-weight: 800; font-size: .78rem; line-height: 1.2; cursor: pointer; }
.zplat-levels button small { display: block; font-weight: 600; color: #c9b8ff; font-size: .7rem; }
.zplat-levels button.is-sel { background: rgba(170, 120, 30, .8); box-shadow: 0 0 10px rgba(255, 190, 80, .6); }
.zplat-levels button:disabled { opacity: .45; cursor: not-allowed; }
.zplat-vol { display: grid; gap: 4px; margin: 6px 0 4px; font-size: .9rem; color: #d9ccff; }
.zplat-vol label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zplat-vol input[type=range] { flex: 1; accent-color: #d9b25c; max-width: 220px; }
.zplat-table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: .9rem; }
.zplat-table th, .zplat-table td { padding: 3px 6px; border-bottom: 1px solid rgba(242, 200, 90, .2); text-align: left; }
.zplat-table td:not(:first-child), .zplat-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.zplat-toast { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); z-index: 3; max-width: min(520px, 90%); text-align: center; pointer-events: none;
    padding: 12px 18px; border-radius: 14px; background: rgba(16, 12, 44, .78); border: 1px solid rgba(242, 200, 90, .6); color: #efe6ff;
    box-shadow: 0 0 24px rgba(255, 186, 74, .35); animation: zplatToast 4.5s ease forwards; }
.zplat-toast b { display: block; color: #ffd774; font-size: 1.35rem; letter-spacing: .04em; text-shadow: 0 0 10px rgba(255, 190, 80, .6); }
.zplat-toast em { display: block; color: #ffd0da; font-style: normal; font-weight: 800; margin-top: 4px; }
@keyframes zplatToast { 0% { opacity: 0; transform: translate(-50%, 8px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
/* the start panel fits a laptop screen: wider, the keys in two columns, tighter spacing; no touch pad over an open panel */
#zplat-start { width: min(600px, 92%); padding: 16px 20px; }
#zplat-start p { margin: 4px 0; }
#zplat-start .zplat-keys { grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 8px 0; font-size: .88rem; text-align: left; }
#zplat-start .zplat-vol { grid-template-columns: 1fr 1fr; gap: 4px 16px; }
#zplat-start .zplat-go { margin-top: 6px; }
#zplat:has(.zplat-panel:not([hidden])) .zplat-pad { display: none; }
@media (max-width: 600px) {
    #zplat-start { padding: 14px 12px; }
    #zplat-start .zplat-vol { grid-template-columns: 1fr; }
    .zplat-levels button { font-size: .7rem; overflow: hidden; text-overflow: ellipsis; }
}
/* difficulty: easy, normal, hard — the harder, the bigger the bonus */
.zplat-diff { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 6px; }
.zplat-diff button { padding: 6px 4px; border-radius: 10px; border: 1px solid rgba(242, 200, 90, .55); background: rgba(20, 14, 50, .7); color: #ffe8a8; font-weight: 800; font-size: .88rem; line-height: 1.25; cursor: pointer; }
.zplat-diff button small { display: block; font-weight: 600; color: #c9b8ff; font-size: .72rem; }
.zplat-diff button.is-sel { background: rgba(170, 120, 30, .8); box-shadow: 0 0 10px rgba(255, 190, 80, .6); }
#zplat-start h1 { font-size: 1.5rem; margin-bottom: 2px; }
#zplat-start .zplat-keys { grid-template-columns: repeat(3, auto); justify-content: center; gap: 3px 14px; margin: 6px 0; font-size: .82rem; }
#zplat-start .zplat-warn, #zplat-start .zplat-calm { font-size: .84rem; margin: 2px 0; }
/* the preview before a level: the camera flies over it; a banner at the top says so and how to skip it */
.zplat-preview { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 3; width: max-content; max-width: min(560px, 92%); text-align: center; pointer-events: none;
    padding: 10px 18px; border-radius: 14px; background: rgba(16, 12, 44, .8); border: 1px solid rgba(242, 200, 90, .6); color: #efe6ff; box-shadow: 0 0 24px rgba(255, 186, 74, .35); }
.zplat-preview b { color: #ffd774; font-size: 1.2rem; letter-spacing: .03em; }
.zplat-preview > span:not(.zplat-preview__eye) { display: block; color: #c9b8ff; font-weight: 700; font-size: .92rem; }
.zplat-preview em { display: block; color: #ffd0da; font-style: normal; font-weight: 800; margin-top: 4px; }
.zplat-preview small { display: block; margin-top: 4px; color: #ffe8a8; opacity: .8; animation: zplatBlink 1.6s ease-in-out infinite; }
@keyframes zplatBlink { 50% { opacity: .35; } }

/* the dark around the edges, in each sefira's own colour (set by platform.js: --zv) */
.zplat-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse 75% 70% at 50% 48%, rgba(0,0,0,0) 52%, var(--zv, rgba(6,4,16,.75)) 100%); transition: background .8s; }

/* credits: a quiet link on the start screen, a list on its own panel */
.zplat-credits-link { display: block; margin: 8px auto 0; background: none; border: 0; color: #c9b8ff; font-size: .8rem; text-decoration: underline; cursor: pointer; }
.zplat-credits { text-align: left; font-size: .86rem; line-height: 1.45; padding-left: 18px; margin: 8px 0; }
.zplat-credits a, #zplat-credits .zplat-sub a { color: #ffd774; }
/* the score pulses gold when something is picked up */
.zplat-hud__score { display: inline-block; transition: color .3s; }
.zplat-hud__score.is-bump { animation: zplatBump .55s ease-out; }
@keyframes zplatBump { 0% { transform: scale(1); color: #ffe8a8; } 30% { transform: scale(1.45); color: #fff6c8; text-shadow: 0 0 14px rgba(255, 210, 110, .95); } 100% { transform: scale(1); } }
/* the sword button glows like the blade */
.zplat-pad__sword { border-color: rgba(255, 140, 70, .9) !important; color: #ffd2a8 !important; box-shadow: 0 0 12px rgba(255, 120, 40, .55); }
/* the higher sefirot, for members: the panel that says so, and the locked levels in the picker */
.zplat-unlock-tree { font-size: 2.6rem; color: #ffd774; text-shadow: 0 0 18px rgba(255, 200, 90, .8); margin: 0 0 6px; }
#zplat-unlock p { line-height: 1.5; }
.zplat-levels button.is-members { opacity: .7; border-style: dashed; }
/* the shared top 10 */
.zplat-world-h { margin: 14px 0 6px; color: #ffd774; font-size: 1.05rem; }
.zplat-world-levels { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-bottom: 6px; }
.zplat-world-levels button { min-width: 30px; padding: 3px 6px; border-radius: 8px; border: 1px solid rgba(242, 200, 90, .5); background: rgba(20, 14, 50, .7); color: #ffe8a8; font-weight: 800; cursor: pointer; }
.zplat-world-levels button.is-sel { background: rgba(170, 120, 30, .8); }
.zplat-table tr.is-me td { color: #fff4c8; font-weight: 800; }
.zplat-world-note { font-size: .82rem; }
.zplat-lead { color: #ffd774; white-space: nowrap; }
.zplat-lead b { color: #fff4c8; }
/* who appears on the top 10: a note for guests, a confirmation for members */
.zplat-who { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(242, 200, 90, .45); background: rgba(20, 14, 50, .55); font-size: .86rem; line-height: 1.45; color: #e6dcff; }
.zplat-who p { margin: 0 0 6px; }
.zplat-who b { color: #ffd774; }
.zplat-who .zplat-go { margin-top: 4px; padding: .5rem 1rem; font-size: .85rem; }
.zplat-who--member { color: #ffe8a8; }
