/* ============================================================
   叶芳俊 (Quinn Ye) — FC Super Mario Style Personal Homepage
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000000;
    font-family: "Courier New", Consolas, "Microsoft YaHei", monospace;
    touch-action: manipulation;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100dvh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    overflow: hidden;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* 极简角落像素控制栏（半透明，不遮挡游戏画面） */
#controls {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 20;
    display: flex;
    gap: 8px;
    opacity: 0.55;
    transition: opacity 0.25s ease;
}

#controls:hover,
#controls:focus-within {
    opacity: 0.95;
}

.fc-btn {
    appearance: none;
    border: 2px solid #ffffff;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-family: "Courier New", Consolas, monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 6px 10px;
    cursor: pointer;
    box-shadow: 2px 2px 0 #000000;
    transition: transform 0.08s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fc-btn:hover {
    background: #c84c0c;
    border-color: #fc9838;
}

.fc-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.fc-btn.active {
    background: #00a800;
    border-color: #80d010;
}

/* 移动端适配 */
@media (max-width: 640px) {
    #controls {
        right: 10px;
        bottom: 10px;
        gap: 6px;
    }

    .fc-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
}
