@media screen and (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
        background: #000;
        min-height: 100vh;
    }

    body::before,
    body::after,
    .container::before,
    .container::after {
        display: none;
    }

    .container {
        height: 100vh;
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
        background: #000;
    }

    /* éšè—ä¸éœ€è¦çš„å…ƒç´ å’Œæ•ˆæžœ */
    .header,
    .col-seed,
    .terminal-box::before,
    .terminal-box::after,
    .grid-lines,
    .terminal-heading,
    .grid-overlay,
    .glow-effect {
        display: none;
    }

    /* é¡¶éƒ¨ä¸‰ä¸ªé¢æ¿ */
    .top-grid {
        height: 25vh;
        min-height: 150px;
        max-height: 180px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1px;
        background: rgba(0, 255, 255, 0.1);
        border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    }

    .col-sentiment,
    .col-processes,
    .col-data {
        height: 100%;
        border: none;
        background: #000;
        padding: 8px;
        position: relative;
        overflow: hidden;
    }

    /* æ³¢å½¢å›¾è°ƒæ•´ */
    #waveCanvas {
        width: 100%;
        height: 100%;
    }

    /* è¿›ç¨‹åˆ—è¡¨è°ƒæ•´ */
    .process-item {
        font-size: 11px;
        line-height: 1.4;
        margin-bottom: 4px;
        padding-left: 8px;
        color: var(--cyan);
    }

    /* æ•°æ®æ˜¾ç¤ºè°ƒæ•´ */
    .data-timer {
        font-size: 13px;
        margin-bottom: 8px;
        font-family: monospace;
        color: var(--cyan);
    }

    .data-bar-container {
        margin-bottom: 6px;
        position: relative;
        background: rgba(0, 255, 255, 0.1);
        height: 3px;
    }

    .data-bar {
        height: 100%;
        background: var(--cyan);
        transition: width 0.3s ease-out;
    }

    .data-value {
        font-size: 11px;
        position: absolute;
        right: 0;
        top: -14px;
        color: var(--cyan);
    }

    /* ç»ˆç«¯åŒºåŸŸ */
    .bottom-grid {
        flex: 1;
        background: #000;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .terminal-box {
        flex: 1;
        border: none;
        border-radius: 0;
        padding: 20px;
        display: flex;
        flex-direction: column;
        background: #000;
        min-height: 0;
    }

    /* ç»ˆç«¯è¾“å‡ºåŒºåŸŸ */
    #terminal-output {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 15px;
        overflow-y: auto;
        min-height: 0;
        padding: 10px 0;
    }

    /* ASCII art å®¹å™¨ */
    .ascii-art-container {
        width: 100%;
        overflow: hidden;
        margin: 20px 0;
        display: flex;
        justify-content: center;
        padding: 0 10px;
        box-sizing: border-box;
    }

    /* ASCII art æ˜¾ç¤º */
    .ascii-art {
        color: #ffa500;
        font-family: monospace;
        white-space: pre;
        display: inline-block;
        line-height: 1;
        transform-origin: center top;
        transform: scale(var(--scale-ratio, 0.7));
        width: max-content;
        margin: 0;
        padding: 0;
        font-size: 14px;
    }

    /* CA åœ°å€æ˜¾ç¤º */
    .ca-address {
        color: #FFD700;
        font-size: 16px;
        padding: 10px 0;
        word-break: break-all;
        text-align: left;
        border-bottom: 1px solid rgba(255, 215, 0, 0.2);
        margin-bottom: 15px;
        font-family: monospace;
        letter-spacing: 1px;
    }

    .system-message {
        color: var(--cyan);
        font-size: 14px;
        margin-bottom: 8px;
        line-height: 1.4;
        text-align: left;
    }

    .command {
        color: #ffa500;
    }

    #terminal-input {
        margin-top: auto;
        display: flex;
        align-items: center;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 255, 255, 0.1);
    }

    .prompt {
        color: var(--yellow);
        font-size: 18px;
        margin-right: 10px;
    }

    #cmd-input {
        background: transparent;
        border: none;
        color: var(--yellow);
        font-family: monospace;
        font-size: 18px;
        width: 100%;
        height: 36px;
        outline: none;
    }

    /* ç§»é™¤æ‰€æœ‰é˜´å½±å’Œè¾‰å…‰æ•ˆæžœ */
    * {
        text-shadow: none !important;
        box-shadow: none !important;
    }

    /* æ»šåŠ¨æ¡æ ·å¼ */
    ::-webkit-scrollbar {
        width: 4px;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--cyan);
        border-radius: 2px;
    }

    ::-webkit-scrollbar-track {
        background: rgba(0, 255, 255, 0.1);
    }
}

<script>
    function adjustAsciiArt() {
        const container = document.querySelector('.terminal-box');
        const ascii = document.querySelector('.ascii-art');
        if (!ascii || !container) return;

        const containerWidth = container.clientWidth - 20; // å‡å°‘å†…è¾¹è·
        const asciiWidth = ascii.scrollWidth;
        const scale = Math.min(1, (containerWidth / asciiWidth) * 1.2); // å¢žåŠ  20% çš„å¤§å°
        
        ascii.style.setProperty('--scale-ratio', scale);
    }

    // ç›‘å¬çª—å£å¤§å°å˜åŒ–
    window.addEventListener('resize', adjustAsciiArt);
    // åˆå§‹åŒ–æ—¶è°ƒç”¨
    document.addEventListener('DOMContentLoaded', adjustAsciiArt);
</script>
