.code-window {
    width: 90%;
    max-width: 800px;
    margin: 3.5rem auto;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.window-header {
    background: #2d2d2d;
    padding: 0.8rem;
    display: flex;
    gap: 0.5rem;
}

.window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.code-content {
    padding: 1.5rem;
    position: relative;
    min-height: 200px;
}

.typing-text {
    margin: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #d4d4d4;
}

.cursor {
    position: absolute;
    width: 2px;
    height: 1.2em;
    background-color: #fff;
    animation: blink 0.7s infinite;
    display: inline-block;
    pointer-events: none;
}

/* 程式碼高亮樣式 */
.keyword { color: #569cd6; }    /* 關鍵字，如 let, const, if */
.string { color: #ce9178; }     /* 字串 */
.comment { 
    color: #6A9955;             /* 註解文字顏色 */
    font-style: italic;         /* 斜體 */
    opacity: 0.8;               /* 稍微透明 */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}