/* ===== WePang 模拟经营 Demo — Base Styles ===== */
/* 像素风 2D 模拟经营 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: #0f1020;
    font-family: 'Courier New', Courier, monospace;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

canvas#gameCanvas {
    display: block;
    margin: 0 auto;
    cursor: pointer;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* ── 加载画面 ─────────────────────────────────── */
#loadingScreen {
    position: fixed;
    inset: 0;
    background: #1a1c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-content {
    text-align: center;
    color: #e8e8e8;
}

.game-title {
    font-size: 22px;
    font-family: 'Courier New', monospace;
    color: #f7d51d;
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-shadow: 2px 2px 0 #7b5ea7;
}

.game-subtitle {
    font-size: 11px;
    color: #8b8fa8;
    margin-bottom: 24px;
    letter-spacing: 4px;
}

.loading-bar-wrap {
    width: 200px;
    height: 12px;
    background: #2d2b55;
    border: 1px solid #5a578e;
    margin: 0 auto 8px;
    position: relative;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #7b5ea7, #f7d51d);
    width: 0%;
    transition: width 0.3s ease;
    image-rendering: pixelated;
}

.loading-percent {
    font-size: 11px;
    color: #8b8fa8;
    display: block;
    margin-bottom: 8px;
}

.loading-tip {
    font-size: 10px;
    color: #5a578e;
    letter-spacing: 1px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ── 横屏警告 ─────────────────────────────────── */
#landscapeWarning {
    display: none;
    position: fixed;
    inset: 0;
    background: #1a1c2c;
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.rotate-icon {
    font-size: 48px;
    animation: rotate90 1s ease-in-out infinite alternate;
}

@keyframes rotate90 {
    from { transform: rotate(0deg); }
    to   { transform: rotate(90deg); }
}

.landscape-content {
    text-align: center;
    color: #e8e8e8;
    font-size: 14px;
}

@media (orientation: landscape) and (max-width: 900px) {
    body:not(.is-desktop) #landscapeWarning {
        display: flex;
    }
}

/* ── 版本标记 ─────────────────────────────────── */
#versionTag {
    position: fixed;
    bottom: 4px;
    right: 8px;
    font-size: 10px;
    color: rgba(90, 87, 142, 0.6);
    pointer-events: none;
    font-family: 'Courier New', monospace;
}
