/* css/jiami_style.css */

body.jiami-tool-body { background: var(--light-gray-color); }
.jiami-container { max-width: 1600px; margin: 40px auto; padding: 0 20px; }
.jiami-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 40px; text-align: center; border-radius: var(--border-radius) var(--border-radius) 0 0; }
.jiami-header h1 { font-size: 2em; margin-bottom: 10px; }
.jiami-header p { opacity: 0.9; }
.jiami-content { background: #fff; border-radius: 0 0 var(--border-radius) var(--border-radius); box-shadow: var(--box-shadow); padding: 30px; }
.jiami-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 30px; }
.tab-link { padding: 10px 20px; cursor: pointer; border: none; background: none; font-size: 1em; font-weight: 500; color: var(--text-color-secondary); border-bottom: 3px solid transparent; transition: all 0.2s ease; }
.tab-link:hover { color: var(--primary-color); }
.tab-link.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.form-group { margin-bottom: 20px; }
.label-group { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.label-group label { margin-bottom: 0; }
label { display: block; margin-bottom: 8px; font-weight: 500; color: #333; }
input[type="text"], textarea, select { width: 100%; padding: 12px; border: 1px solid #dfe4ea; border-radius: var(--border-radius); font-size: 14px; transition: border-color 0.3s, box-shadow 0.3s; }
input[type="text"]:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(38, 125, 255, 0.2); }
textarea { resize: vertical; min-height: 120px; font-family: 'Courier New', monospace; }
.button-group { margin-top: 20px; }
.btn { background: var(--primary-color); color: white; border: none; padding: 12px 24px; border-radius: var(--border-radius); cursor: pointer; font-size: 16px; font-weight: 500; transition: all 0.2s; margin-right: 10px; margin-bottom: 10px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-secondary { background: #6c757d; }
.btn-success { background: var(--success-color); }
.result-area { background: #f8f9fa; border: 1px solid var(--border-color); padding: 15px; border-radius: var(--border-radius); font-family: 'Courier New', monospace; font-size: 14px; white-space: pre-wrap; word-break: break-all; margin-top: 15px; position: relative; }
.copy-btn { position: absolute; top: 10px; right: 10px; background: #6c757d; color: white; border: none; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 12px; opacity: 0.7; transition: opacity 0.2s; }
.result-area:hover .copy-btn { opacity: 1; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.drop-zone { border: 2px dashed #dfe4ea; border-radius: var(--border-radius); padding: 40px; text-align: center; color: var(--text-color-secondary); cursor: pointer; transition: all 0.3s ease; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--primary-color); background-color: #f8f9fa; }
.image-preview-container { margin-top: 20px; text-align: center; }
.image-preview-container h4 { margin-bottom: 10px; text-align: left; }
#image-preview { max-width: 100%; max-height: 300px; border: 1px solid var(--border-color); border-radius: var(--border-radius); }
#image-result-container { margin-top: 20px; }
#image-result-container h4 { margin-bottom: 10px; }
#image-result .result-content { max-height: 200px; overflow-y: auto; }

/* --- 核心修改：自定义下拉菜单样式 --- */
.history-btn { background: none; border: none; color: var(--text-color-secondary); font-size: 12px; cursor: pointer; padding: 2px 5px; }
.history-btn:hover { color: var(--primary-color); text-decoration: underline; }
.key-input-wrapper { position: relative; }
.key-history-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.key-history-dropdown.show { display: block; }
.key-history-item { padding: 10px 12px; cursor: pointer; font-size: 14px; }
.key-history-item:hover { background-color: #f0f0f0; }

@media (max-width: 768px) {
    .jiami-container { margin: 20px auto; padding: 0 10px; }
    .grid { grid-template-columns: 1fr; }
    .jiami-tabs { flex-wrap: wrap; }
    .tab-link { margin-bottom: 5px; }
}