html, body {
    margin: 0; padding: 0;
    height: 100%; width: 100%;
    overflow: hidden;
    /*-webkit-touch-callout: none;*/
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: Helvetica, Arial, sans-serif;
    /*background: #000 url('ludo_splash.png') center/cover no-repeat fixed;*/
    /*background-color: #353072;*/
    background-color: white;
    display: flex; justify-content: center; align-items: center;
}

/*body::before {*/
/*    content: "";*/
/*    position: fixed; inset: 0;*/
/*    backdrop-filter: blur(3px);*/
/*    z-index: -1;*/
/*}*/

.webgl-content {
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    flex-direction: column;
    position: relative;
}

#unity-container {
    display: flex; justify-content: center; align-items: center;
    width: 100%; height: 100%;
    background: #353072;
    /*background: linear-gradient(to bottom left, #353072 0%, #2b16a6 50%, #353072 100%);*/
    position: relative;
}

#repeated-overlay{
    position: absolute;
    background-color:#303572 ;
    background-image:  url("Assets/board_new.png"), url("Assets/board_new.png");
    opacity: 0.2;
    background-size: 150px 150px;
    background-position: 0 0, 75px 75px;
    height: 100%;
    width: 100%;
}

#unity-canvas {
    /* border-radius: 8px; */
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    /*object-fit: contain;*/
    background: #353072; /* helps during load */
}

.fullscreen-overlay{
    position: fixed;
    left: 0; top: 0;
    height: 100%; width: 100vw;
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 2rem;
    font-weight:  bold;
    display: flex;
    flex-direction:  column;
    justify-content:  center;
    align-items:  center;
}

.shown{
    opacity: 1;
    pointer-events: auto;
}

.hidden{
    opacity: 0;
    pointer-events:  none;
}


/* Mobile: canvas fills the screen completely (portrait) */
@media screen and (max-width: 768px) {
    #unity-canvas {
        width: 100vw; height: 100vh;
    }
}

/* Desktop: 90% height with 9:16 ratio, centered */
@media screen and (min-width: 769px) {
    #unity-canvas {
        height: 100vh;
        width: calc(90vh * 3 / 4); /* maintain 9:16 */
    }
}

.loader-bg{
    background-color: white;
    padding: .9rem;
    border-radius:  1rem;
}

/* HTML: <div class="loader"></div> */
/*.loader {*/
/*    width: 8vh;*/
/*    aspect-ratio: 1;*/
/*    --_g: no-repeat radial-gradient(farthest-side,#000 90%,#0000);*/
/*    background: var(--_g), var(--_g), var(--_g), var(--_g);*/
/*    background-size: 40% 40%;*/
/*    animation: l46 1s infinite;*/
/*}*/

.pop-appear {
    animation:
            pop-appear .7s ease-out forwards,
            nudge 3s ease infinite;
    animation-delay: 0s, 1s;
}

.pop-disappear {
    animation: pop-disappear .7s ease;
    animation-delay: 2.8s;
}

@keyframes pop-appear {
    0% {scale: 0; opacity: 0}
    100% {scale: 100%; opacity: 1}
}

@keyframes pop-disappear {
    0% {scale: 100%; opacity: 1}
    100% {scale: 0; opacity: 0}
}

@keyframes l46 {
    0%  {background-position: 0 0      ,100% 0,100% 100%,0 100%}
    40%,
    50% {background-position: 100% 100%,100% 0,0    0   ,0 100%}
    90%,
    100%{background-position: 100% 100%,0 100%,0    0   ,100% 0}
}

@keyframes nudge {
    0% { transform: scale(1); }
    50% { transform: scale(.9); }
    100% { transform: scale(1); }
}

/* Loading bar (keep simple) */
#unity-loading-bar {
    position: absolute; bottom: 24px; left: 50%;
    transform: translateX(-50%);
    width: min(420px, 70vw);
}
#unity-progress-bar-empty {
    width: 100%; height: 8px; background: rgba(255,255,255,0.2); border-radius: 999px;
    overflow: hidden;
}
#unity-progress-bar-full {
    width: 0; height: 100%; background: white; border-radius: 999px;
    transition: width .2s ease;
}

#unity-warning {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    color: #fff; font-size: 14px; text-align: center;
    padding: 6px 10px; background: rgba(0,0,0,0.4); border-radius: 6px;
    display: none;
}

#unity-footer {
    position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px;
    align-items: center;
}

#unity-fullscreen-button {
    width: 32px; height: 32px; background: rgba(255,255,255,0.9);
    border-radius: 8px; cursor: pointer;
    display: none;
}
