@font-face {
    font-family: 'Pixel32ChineseFont';
    src: url('../Pixel32ChinesePixelFont-Book.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

.home-link {
    text-decoration: none;
    color: inherit;
}

.text-input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 300px;
}

canvas#resultCanvas {
    border: 1px solid #ccc;
    background-color: #ffffff;
    
    /* Aggressive anti-aliasing prevention */
    image-rendering: -moz-crisp-edges !important;
    image-rendering: -webkit-crisp-edges !important;
    image-rendering: pixelated !important;
    image-rendering: crisp-edges !important;
    image-rendering: -o-crisp-edges !important;
    -ms-interpolation-mode: nearest-neighbor !important;
    
    /* Prevent any browser scaling or smoothing */
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    transform: none !important;
    zoom: 1 !important;
    object-fit: none !important;
    filter: none !important;
    
    /* Additional properties to prevent smoothing */
    -webkit-font-smoothing: none !important;
    -moz-osx-font-smoothing: unset !important;
    font-smooth: never !important;
    text-rendering: optimizeSpeed !important;
    
    /* Override any inherited styles that might cause scaling */
    flex: none !important;
    box-sizing: content-box !important;
    
    /* Ensure exact pixel rendering */
    position: relative !important;
    display: block !important;
}

.result {
    height: auto !important;
    min-height: 450px !important;
    max-height: none !important;
    overflow: auto !important;
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

/* 响应式设计 - 手机设备 */
@media screen and (max-width: 768px) {
    .controls-row {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    .control-item {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    .text-input {
        width: 100% !important;
        max-width: none !important;
        font-size: 16px !important; /* 防止iOS自动缩放 */
    }
    
    .button {
        width: 100% !important;
        padding: 12px !important;
        font-size: 16px !important;
    }
    
    .result {
        min-height: 300px !important;
        padding: 10px !important;
    }
    
    h1 {
        font-size: 1.5em !important;
        text-align: center !important;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 10px !important;
    }
    
    .controls-row {
        padding: 10px !important;
        gap: 10px !important;
    }
    
    .result {
        padding: 5px !important;
        min-height: 250px !important;
    }
}
