/* 剥离所有网页特征，还原记事本本色 */
body, html { margin: 0; padding: 0; height: 100%; overflow: hidden; background-color: #ffffff; display: flex; flex-direction: column; }

/* 🚨 新增：伪原生标题栏 */
.title-bar {
    display: flex; align-items: center; height: 32px; 
    background-color: #ffffff; color: #333333;
    font-family: "Segoe UI", sans-serif; font-size: 12px; padding-left: 12px;
    /* 核心黑魔法：留出系统右上角“最小化/关闭”红叉按钮的物理空间 */
    padding-right: env(titlebar-area-width, 140px);
    /* 核心黑魔法：接管整个窗口的拖拽权 */
    -webkit-app-region: drag; user-select: none;
}
.title-bar-icon { margin-right: 8px; font-size: 14px; }
.title-bar-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 伪造 Windows 顶部菜单栏 */
.menu-bar {
    background-color: #f0f0f0; border-bottom: 1px solid #cccccc; padding: 2px 8px;
    display: flex; justify-content: space-between; font-family: "Segoe UI", sans-serif; font-size: 12px; color: #333; user-select: none;
    /* 🚨 确保菜单栏不参与拖拽，保证点击正常 */
    -webkit-app-region: no-drag; 
}

/* 🚨 补充丢失的横向排版核心代码 */
.menu-left { display: flex; }
.menu-item { padding: 4px 8px; cursor: default; position: relative; }
.menu-item:hover { background-color: #e5e5e5; }

/* 原生风格下拉菜单 */
.dropdown-content {
    display: none; position: absolute; top: 100%; left: 0; background-color: #f2f2f2;
    min-width: 200px; box-shadow: 2px 2px 5px rgba(0,0,0,0.2); border: 1px solid #ccc; z-index: 100;
    padding: 2px 0;
}
.dropdown-content div { padding: 5px 15px; display: flex; justify-content: space-between; cursor: default; }
.dropdown-content div:hover:not(.disabled):not(.separator) { background-color: #91c9f7; color: black; }
.dropdown-content .disabled { color: #999; }
.dropdown-content .separator { border-top: 1px solid #ccc; margin: 3px 0; padding: 0; height: 0; }

.shortcut { color: #666; } /* 快捷键灰字显示 */

/* 纯粹的打字机输入区 */
.editor-area {
    flex-grow: 1; border: none; outline: none; padding: 5px 8px;
    font-family: "Consolas", "Courier New", monospace; font-size: 14px;
    resize: none; box-sizing: border-box; background-color: #ffffff;
}

/* 打印时隐藏菜单栏，只打印文本区域 */
@media print {
    .menu-bar { display: none; }
    .editor-area { height: auto; overflow: visible; font-size: 12pt; }
}

/* 🚨 终极潜行密码暗箱 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.85); z-index: 1000; justify-content: center; align-items: center; }
#pwd-input { width: 300px; padding: 10px; background: transparent; border: none; border-bottom: 2px solid #333; outline: none; font-family: "Consolas", monospace; font-size: 24px; letter-spacing: 5px; text-align: center; color: #000; }


/* ==========================================
   📱 响应式与移动端装甲 (Responsive & Touch Adapters)
   ========================================== */

/* 当屏幕宽度小于 600px 时的形态突变 */
@media (max-width: 600px) {
    /* 菜单栏允许折行，防止小屏幕挤压破版 */
    .menu-bar { 
        flex-wrap: wrap; 
        padding: 4px; 
    }
    
    /* 增大手指触摸热区，防止误触 */
    .menu-item { 
        padding: 10px 12px; 
        font-size: 14px; 
    }
    
    /* 下拉菜单加宽，适应大拇指的操作逻辑 */
    .dropdown-content { 
        width: 100%; 
        left: 0; 
        top: 100%; 
        box-shadow: 0 8px 16px rgba(0,0,0,0.3); 
    }
    .dropdown-content div { 
        padding: 15px 15px; 
        font-size: 15px; 
    }
    
    /* 手机上没有实体键盘，隐藏多余的快捷键提示文本 */
    .shortcut { 
        display: none; 
    }
    
    /* 增大文本框的基础字号，保护视力 */
    .editor-area { 
        font-size: 16px; 
        padding: 10px;
    }
}
