/* GrindFest look on top of Unity's default WebGL template.
 *
 * The stock page is a white sheet with a letterboxed canvas, a Unity logo and a footer link. This replaces that
 * with the game's own palette, a canvas that fills the viewport, and an honest note about the first download -
 * the build is ~565 MB, so a silent page looks broken rather than slow.
 *
 * Loaded after Unity's own TemplateData/style.css, and everything here is !important so the order cannot bite.
 */

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: #0b0d12;
    color: #cfc9bd;
}

/* Fill the window instead of Unity's letterboxed box.
 * Unity's own style.css has `#unity-container.unity-desktop { left:50%; top:50%; transform: translate(-50%,-50%) }`,
 * which is MORE specific than a plain `#unity-container` rule - combining that centering with a full-size box is
 * what produced a small square in the top-left corner. Every property below therefore needs !important. */
#unity-container,
#unity-container.unity-desktop,
#unity-container.unity-mobile {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
}
/* Unity's template pins the game box with an INLINE style in its JS:
 *   fullscreenContainer.style.width = "960px";  // 960px in a built page
 * so a plain stylesheet rule loses. An !important declaration in a stylesheet does beat a non-important inline
 * style, which is the only reason this works - without it the game sits in a fixed 960x600 box in the corner. */
#unity-fullscreen-container {
    width: 100% !important;
    height: 100% !important;
}

#unity-canvas {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #0b0d12 !important;
    display: block;
}

/* no Unity branding */
#unity-logo,
#unity-logo-title-footer,
#unity-footer,
#unity-build-title { display: none !important; }

/* progress bar in the game's colours */
#unity-progress-bar-empty {
    background: #161a22 !important;
    border-color: #3a3f4b !important;
    box-shadow: none !important;
}
#unity-progress-bar-full {
    background: linear-gradient(90deg, #c8a24a, #e6c477) !important;
}

/* one honest line about what is happening, gone on the first click */
#grindfest-hint {
    position: fixed;
    left: 50%;
    bottom: 7%;
    transform: translateX(-50%);
    max-width: 36rem;
    padding: 0 1rem;
    text-align: center;
    font: 13px/1.6 system-ui, "Segoe UI", sans-serif;
    color: #7f8592;
    pointer-events: none;
}
#grindfest-hint b { color: #cfc9bd; font-weight: 600; }
#grindfest-hint .small { font-size: 12px; color: #5f6673; }
#grindfest-hint.gone { display: none; }
