:root {
    --black: #282a35;
    --grey: #bcba90;
    --red: #a33635;
    --orange: #c96937;
    --blue: #60bec7;
    --green: #70ac4c;
    --white: #d4d4d4;
    --yellow: #eae174;
    /* 简体中文时整体缩放，调大则中文更大，调小则更小 */
    --font-scale-zh: 1.12;
}

@font-face {
    font-family: 'PressStart2P';
    src: url('./src/assets/fonts/PressStart2P.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* PixelMPlus and NGC fonts not bundled; JP/KR use PressStart2P fallback */

@font-face {
    font-family: 'Zpix';
    src: url('./src/assets/fonts/zpix.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    size-adjust: 100%;
}

/*
 * 字体大小设置位置：
 * - 本文件：.loading-text font-size、.tooltip-achievement font-size；Zpix 的 size-adjust（相对缩放）
 * - src/css/ui.css：左侧队伍、顶部按钮、伤害统计等 UI（8px / 10px 等）
 * - src/css/scenes.css：菜单、盒子、宝可梦详情弹窗等场景（大量 font-size）
 * - UI.js、BoxScene.js：少量内联 font-size
 * 中文整体缩放：body.lang-zh 时 #screen-root 使用 --font-scale-zh
 */

html, body {
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

body {
    user-select: none;
    font-family: "PressStart2P", sans-serif;
    font-weight: 400;
    font-style: normal;
    background: #111;
}

body.lang-zh #screen-root {
    transform: scale(var(--font-scale-zh, 1.12));
    transform-origin: center center;
}

input {
    all: unset;
    box-sizing: border-box;
}

#view-port {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#screen-root {
    position: absolute;
    width: 1146px;
    height: 624px;

}

#screen {
    position: absolute;
    width: 1146px;
    height: 624px;
    background: #1d2b3b;

    overflow: hidden;
}

canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

.stroke {
    text-shadow:
    -1px -1px 0 #000,
     0   -1px 0 #000,
     1px -1px 0 #000,
     1px  0   0 #000,
     1px  1px 0 #000,
     0    1px 0 #000,
    -1px  1px 0 #000,
    -1px  0   0 #000;
}

.notification-container {
    position: absolute;
    bottom: 0;
    left: 213px;
    right: 213px;
    height: 46px;
    line-height: 56px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.8);
    text-align: center;
}

.link-red {
    cursor: pointer;
    font-weight: 800;
    color: var(--red);
    text-decoration: none;
}

.link-blue {
    cursor: pointer;
    font-weight: 800;
    color: var(--blue);
    text-decoration: none;
}

.pos-right {
    position: absolute;
    right: 0px;
}

.tooltip {
    position: absolute;
    width: 200px;
    height: auto;

    background: rgba(0, 0, 0, 0.9);

    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    outline: 1px solid var(--white);

    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: opacity 0.2s ease;

    pointer-events: none;
    display: none;
    z-index: 9999;
    text-align: center;
}

.tooltip-achievement {
    font-size: 8px;
    text-shadow: 1px 1px 1px black;
    line-height: 15px;
}

.loading-text {
    position: absolute;
    width: 100%;
    top: 48%;
    transform: translate(0, -50%);
    text-align: center;
    font-size: 12px;
    color: var(--white);
    pointer-events: none;
}

.loading-bar-bg {
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 20px;
    background-color: #1b1b19;
    outline: 2px solid black;
    overflow: hidden;
    pointer-events: none;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background-color: var(--red);
    border-right: 1px solid black;
    transition: width 0.3s ease;
    pointer-events: none;
}