* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; background: #f5f5f5; } .container { width: 400px; padding: 20px; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } h1 { font-size: 20px; color: #333; margin-bottom: 20px; text-align: center; font-weight: 600; } .tab { display: flex; gap: 8px; margin-bottom: 20px; background: #f5f5f5; padding: 5px; border-radius: 8px; min-height: 45px; } .tab button { flex: 1; padding: 8px 4px; border: none; background: transparent; color: #666; cursor: pointer; border-radius: 6px; transition: all 0.3s ease; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; min-width: 80px; } .tab button:hover { background: rgba(0,0,0,0.05); } .tab button.active { background: #1a73e8; color: white; } .input-group { display: flex; gap: 10px; margin-bottom: 20px; } input[type="text"] { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color 0.3s ease; } input[type="text"]:focus { outline: none; border-color: #1a73e8; } button { padding: 12px 20px; background: #1a73e8; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; transition: background 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 8px; } button:hover { background: #1557b0; } .result-container { background: #f8f9fa; border-radius: 8px; padding: 20px; display: flex; justify-content: center; align-items: center; } .file-upload { margin-bottom: 15px; } .file-label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: #f8f9fa; border: 2px dashed #ddd; border-radius: 6px; cursor: pointer; transition: all 0.3s ease; } .file-label:hover { border-color: #1a73e8; background: #f0f7ff; } .preview-container { margin: 15px 0; max-height: 300px; overflow-y: auto; padding: 15px; background: #f8f9fa; border-radius: 6px; border: 1px solid #ddd; } .download-btn { width: 100%; background: #34a853; } .download-btn:hover { background: #2d8a46; } .icon { font-size: 16px; flex-shrink: 0; } /* 美化滚动条 */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } ::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #555; } /* 预览区域的样式 */ #preview { font-size: 14px; line-height: 1.6; } #preview h1, #preview h2, #preview h3 { margin: 16px 0 8px 0; color: #333; } #preview p { margin-bottom: 8px; } #preview table { border-collapse: collapse; width: 100%; margin: 10px 0; } #preview td, #preview th { border: 1px solid #ddd; padding: 8px; } #preview img { max-width: 100%; height: auto; } .status-message { margin: 10px 0; padding: 10px; border-radius: 6px; font-size: 14px; display: none; animation: fadeIn 0.3s ease; } .status-message.success { display: block; background-color: #e6f4ea; color: #1e8e3e; border: 1px solid #1e8e3e; } .status-message.loading { display: block; background-color: #e8f0fe; color: #1a73e8; border: 1px solid #1a73e8; } .status-message.error { display: block; background-color: #fce8e6; color: #d93025; border: 1px solid #d93025; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .file-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 翻译设置样式 */ .translate-settings { padding: 15px; } .setting-item { margin-bottom: 15px; display: flex; align-items: center; } .setting-label { margin-left: 10px; } /* 开关按钮样式 */ .switch { position: relative; display: inline-block; width: 50px; height: 24px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; } .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; } input:checked + .slider { background-color: #2196F3; } input:checked + .slider:before { transform: translateX(26px); } /* 下拉菜单样式 */ select { padding: 5px; border-radius: 4px; border: 1px solid #ddd; margin-left: 10px; }