

._dictionary-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px;
    backdrop-filter: blur(4px);
}

._dictionary-modal-overlay._dictionary-active {
    display: flex;
    animation: _dictionary-fadeIn 0.3s ease;
}

@keyframes _dictionary-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 弹窗样式 */
._dictionary-modal {
    width: 100%;
    max-width: 500px;
    height: 800px;
    /*max-height: 90vh;*/
    max-height: 95%;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: _dictionary-slideUp 0.3s ease;
}

@keyframes _dictionary-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 弹窗头部 */
._dictionary-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

._dictionary-modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* 预览输入框 */
._dictionary-preview-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    color: #333;
    background-color: white;
    margin-top: 8px;
    resize: none;
    min-height: 60px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

._dictionary-preview-input:focus {
    outline: none;
    border-color: #000;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

._dictionary-preview-input::placeholder {
    color: var(--text-color-2);
}

/* 输入提示 */
._dictionary-input-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    margin-left: 4px;
    display: flex;
    align-items: center;
}

._dictionary-input-hint::before {
    content: "💡";
    margin-right: 6px;
    font-size: 14px;
}

/* 分类标签 - 修改为底部横线样式 */
._dictionary-category-tabs {
    display: flex;
    padding: 0 20px;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 1px solid #f0f0f0;
    scrollbar-width: none; /* Firefox */
    flex-shrink: 0;
}

._dictionary-category-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

._dictionary-category-tab {
    padding: 16px 20px;
    margin-right: 4px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    border: none;
    background: transparent;
}

._dictionary-category-tab:hover {
    color: #333;
}

._dictionary-category-tab._dictionary-active {
    /*color: #7c3aed;*/
    font-weight: 600;

}

._dictionary-category-tab._dictionary-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 2px;
    background-color: #000;
    border-radius: 3px 3px 0 0;
}

/* 选项内容区域 */
._dictionary-options-container {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

._dictionary-subcategory-section {
    margin-bottom: 28px;
}

._dictionary-subcategory-title {
    font-size: 18px;
    font-weight: 600;
    color: #444;
    margin-bottom: 16px;
    padding-left: 4px;
}

/* 修改选项布局为自适应宽度 */
._dictionary-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 选项自适应宽度，自动换行 */
._dictionary-option-item {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    background-color: #f8f8f8;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #eee;
    word-break: keep-all;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    position: relative;
}

._dictionary-option-item:hover {
    /*background-color: #f0f0f0;*/
    /*transform: translateY(-2px);*/
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);*/
}

._dictionary-option-item._dictionary-active {
    background : var(--theme-color-0-2);
    /*color: #7c3aed;*/
    color: var(--text-color);
    border-color: var(--theme-color);
    font-weight: 500;
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);*/
}


/* 按钮区域 */
._dictionary-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
}

._dictionary-modal-button {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

._dictionary-cancel-button {
    background-color: #f5f5f7;
    color: #666;
}

._dictionary-cancel-button:hover {
    background-color: #eaeaea;
}

._dictionary-confirm-button {
    background: var(--primary-btn-bg);
    color: var(--primary-btn-text-color);
}


/* 响应式调整 */
@media (max-width: 480px) {
    ._dictionary-modal-overlay {
        padding: 10px;
    }

    ._dictionary-modal-header, ._dictionary-modal-footer {
        padding: 20px 16px;
    }

    ._dictionary-options-container {
        padding: 16px;
    }

    ._dictionary-category-tabs {
        padding: 0 16px;
    }

    ._dictionary-category-tab {
        padding: 14px 16px;
        font-size: 14px;
    }

    ._dictionary-option-item {
        padding: 8px 14px;
        font-size: 13px;
    }

    ._dictionary-modal-button {
        padding: 12px 24px;
    }

    ._dictionary-subcategory-title {
        font-size: 16px;
    }

    ._dictionary-input-hint {
        font-size: 11px;
    }
}

/* 对于更小的屏幕 */
@media (max-width: 360px) {
    ._dictionary-option-item {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 6px;
    }

    ._dictionary-category-tab {
        padding: 12px 14px;
        font-size: 13px;
    }

    ._dictionary-category-tab._dictionary-active::after {
        left: 4px;
        right: 4px;
    }

    ._dictionary-preview-input {
        font-size: 15px;
        padding: 12px 14px;
    }
}