@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-full.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NotoSans';
    src: url('fonts/noto-sans-v42-latin-regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NotoSansKR';
    src: url('fonts/noto-sans-kr.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NotoSansJP';
    src: url('fonts/noto-sans-jp.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NotoSansTC';
    src: url('fonts/noto-sans-tc.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NotoSansSC';
    src: url('fonts/noto-sans-sc.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background-color: #000;
}

#embed-html {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
}

#embed-html table,
#embed-html td {
    width: 100% !important;
    height: 100% !important;
}

canvas {
    display: block;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    cursor: default;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-family: monospace;
    font-size: 16px;
    text-align: center;
}

/* Hide loading message once the game canvas appears */
canvas ~ #loading,
#embed-html:not(:empty) ~ #loading {
    display: none;
}

/* ============================
   Custom Preloader Styles
   ============================ */

#custom-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: monospace;
}

#preloader-title {
    text-align: center;
    margin-bottom: 40px;
}

#preloader-title img {
    image-rendering: pixelated;
}

#preloader-bar-container {
    width: 200px;
    height: 6px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 1px;
    overflow: hidden;
    position: relative;
}

#preloader-bar-fill {
    height: 100%;
    background: linear-gradient(
        to right,
        #CC4400,
        #FF6633,
        #FF8844
    );
    box-shadow: 0 0 6px rgba(255, 102, 51, 0.6);
    transition: width 0.15s ease-out;
    display: block;
}

#preloader-text {
    color: #666;
    font-size: 11px;
    margin-top: 12px;
    letter-spacing: 2px;
}

/* Hide preloader once game canvas is active */
canvas ~ #custom-preloader {
    display: none !important;
}

/* Override default GDX preloader styles (in case they leak) */
.gdx-preloader {
    display: none !important;
}
